Commit c9a9cd41 authored by huangjie's avatar huangjie

Merge branch 'dev20230707' of http://192.168.60.201/root/dsk-operate-sys into dev20230707

parents a549fdd9 d6320625
...@@ -28,7 +28,7 @@ public class ContactInfoController extends BaseController { ...@@ -28,7 +28,7 @@ public class ContactInfoController extends BaseController {
/** /**
* 联系人列表 * 联系人列表
*/ */
// @PreAuthorize("@ss.hasPermi('contact:list')") // @PreAuthorize("@ss.hasPermi('contact:info:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo selectPageList(ContactInfoSearchDto dto){ public TableDataInfo selectPageList(ContactInfoSearchDto dto){
startPage(); startPage();
...@@ -47,7 +47,7 @@ public class ContactInfoController extends BaseController { ...@@ -47,7 +47,7 @@ public class ContactInfoController extends BaseController {
/** /**
* 添加用户联系人 * 添加用户联系人
*/ */
// @PreAuthorize("@ss.hasPermi('contact:add')") // @PreAuthorize("@ss.hasPermi('contact:info:add')")
@PostMapping() @PostMapping()
@RepeatSubmit() @RepeatSubmit()
public AjaxResult add(@RequestBody ContactInfo baen){ public AjaxResult add(@RequestBody ContactInfo baen){
...@@ -57,7 +57,7 @@ public class ContactInfoController extends BaseController { ...@@ -57,7 +57,7 @@ public class ContactInfoController extends BaseController {
/** /**
* 编辑用户联系人 * 编辑用户联系人
*/ */
// @PreAuthorize("@ss.hasPermi('contact:edit')") // @PreAuthorize("@ss.hasPermi('contact:info:edit')")
@PutMapping() @PutMapping()
@RepeatSubmit() @RepeatSubmit()
public AjaxResult edit(@RequestBody ContactInfo baen){ public AjaxResult edit(@RequestBody ContactInfo baen){
...@@ -67,7 +67,7 @@ public class ContactInfoController extends BaseController { ...@@ -67,7 +67,7 @@ public class ContactInfoController extends BaseController {
/** /**
* 删除用户联系人 * 删除用户联系人
*/ */
// @PreAuthorize("@ss.hasPermi('contact:del')") // @PreAuthorize("@ss.hasPermi('contact:info:del')")
@DeleteMapping("/{id}") @DeleteMapping("/{id}")
@RepeatSubmit() @RepeatSubmit()
public AjaxResult del(@PathVariable("id") Long id){ public AjaxResult del(@PathVariable("id") Long id){
......
...@@ -51,6 +51,48 @@ export function getYear() { ...@@ -51,6 +51,48 @@ export function getYear() {
}) })
} }
//全国商机项目分析-全国土地交易项目
export function countLandMarketByType(param) {
return request({
url: '/marketAnalysis/countLandMarketByType',
method: 'POST',
data: param
})
}
//全国商机项目分析-全国土地交易项目地区TOP10
export function countLandMarketByProvince(param) {
return request({
url: '/marketAnalysis/countLandMarketByProvince',
method: 'POST',
data: param
})
}
//全国商机项目分析-全国各地区招标统计TOP10
export function countNewsBidByProvince(param) {
return request({
url: '/marketAnalysis/countNewsBidByProvince',
method: 'POST',
data: param
})
}
//全国商机项目分析-全国土地交易项目年份统计
export function countLandMarketByYear() {
return request({
url: '/marketAnalysis/countLandMarketByYear',
method: 'POST',
})
}
//全国商机项目分析-全国土地交易项目年份统计
export function countBidGroupByProvince(param) {
return request({
url: '/marketAnalysis/countBidGroupByProvince',
method: 'POST',
data: param
})
}
//全国建筑企业概览-资质等级按照行业、等级类型分组 //全国建筑企业概览-资质等级按照行业、等级类型分组
export function certGroupByMajorAndLevel() { export function certGroupByMajorAndLevel() {
......
...@@ -36,12 +36,12 @@ ...@@ -36,12 +36,12 @@
</el-table-column> </el-table-column>
<el-table-column prop="gdp" label="GDP(亿元)" sortable width="120" :formatter="formatStatus"/> <el-table-column prop="gdp" label="GDP(亿元)" sortable width="120" :formatter="formatStatus"/>
<el-table-column prop="gdpGrowth" label="GDP增速" sortable width="100" :formatter="formatStatus"/> <el-table-column prop="gdpGrowth" label="GDP增速(%)" sortable width="100" :formatter="formatStatus"/>
<el-table-column prop="gdpPerCapita" label="人均GDP(元)" sortable width="130" :formatter="formatStatus"/> <el-table-column prop="gdpPerCapita" label="人均GDP(元)" sortable width="130" :formatter="formatStatus"/>
<el-table-column prop="population" label="人口(万人)" sortable width="120" :formatter="formatStatus"/> <el-table-column prop="population" label="人口(万人)" sortable width="120" :formatter="formatStatus"/>
<el-table-column prop="fixedInvestment" label="固定资产投资 (亿元) " sortable width="200" :formatter="formatStatus"/> <el-table-column prop="fixedInvestment" label="固定资产投资 (亿元) " sortable width="200" :formatter="formatStatus"/>
<el-table-column prop="gbr" label="一般公共预算收入(亿元)" sortable width="200" :formatter="formatStatus"/> <el-table-column prop="gbr" label="一般公共预算收入(亿元)" sortable width="200" :formatter="formatStatus"/>
<el-table-column prop="gbe" label="一般公共预算支出(亿 元)" sortable width="200" :formatter="formatStatus"/> <el-table-column prop="gbe" label="一般公共预算支出(亿元)" sortable width="200" :formatter="formatStatus"/>
<el-table-column prop="govFundIncome" label="政府性基金收入(亿元)" sortable width="200" :formatter="formatStatus"/> <el-table-column prop="govFundIncome" label="政府性基金收入(亿元)" sortable width="200" :formatter="formatStatus"/>
<el-table-column prop="govDebtBalance" label="地方政府债务余额(亿元)" sortable width="200" :formatter="formatStatus"/> <el-table-column prop="govDebtBalance" label="地方政府债务余额(亿元)" sortable width="200" :formatter="formatStatus"/>
<el-table-column prop="uipInterestBearingDebt" label="城投平台有息债务(亿元)" sortable width="200" :formatter="formatStatus"/> <el-table-column prop="uipInterestBearingDebt" label="城投平台有息债务(亿元)" sortable width="200" :formatter="formatStatus"/>
......
...@@ -66,8 +66,8 @@ ...@@ -66,8 +66,8 @@
<div class="content content2"> <div class="content content2">
<div class="common-title">经济信息</div> <div class="common-title">经济信息</div>
<div class="content-box"> <div class="content-box">
<span class="text" @click="childMethod(1)" style="cursor: pointer;"><img src="@/assets/images/economies/icon_1.png"><span>下属辖区</span> <label>{{recentlyYear.subordinateJurisdiction}}<i></i></label></span> <span class="text hover" @click="childMethod(1)" style="cursor: pointer;"><img src="@/assets/images/economies/icon_1.png"><span>下属辖区</span> <label>{{recentlyYear.subordinateJurisdiction}}<i></i></label></span>
<span class="text" @click="childMethod(2)" style="cursor: pointer;"><img src="@/assets/images/economies/icon_2.png"><span>城投平台</span> <label>{{recentlyYear.urbanInvestmentPlatform}}<i></i></label></span> <span class="text hover" @click="childMethod(2)" style="cursor: pointer;"><img src="@/assets/images/economies/icon_2.png"><span>城投平台</span> <label>{{recentlyYear.urbanInvestmentPlatform}}<i></i></label></span>
<span class="text"><img src="@/assets/images/economies/icon_3.png"><span>城投平台授信余额</span> <label>{{recentlyYear.creditBalance}}<i>亿</i></label></span> <span class="text"><img src="@/assets/images/economies/icon_3.png"><span>城投平台授信余额</span> <label>{{recentlyYear.creditBalance}}<i>亿</i></label></span>
<span class="text"><img src="@/assets/images/economies/icon_4.png"><span>城投平台应收账款</span> <label>{{recentlyYear.accountsReceivable}}<i>亿</i></label></span> <span class="text"><img src="@/assets/images/economies/icon_4.png"><span>城投平台应收账款</span> <label>{{recentlyYear.accountsReceivable}}<i>亿</i></label></span>
<span class="text"><img src="@/assets/images/economies/icon_5.png"><span>城投平台有息债务</span> <label>{{recentlyYear.uipInterestBearingDebt}}<i>亿</i></label></span> <span class="text"><img src="@/assets/images/economies/icon_5.png"><span>城投平台有息债务</span> <label>{{recentlyYear.uipInterestBearingDebt}}<i>亿</i></label></span>
...@@ -163,6 +163,10 @@ export default { ...@@ -163,6 +163,10 @@ export default {
prop: 'industryTotalValue', prop: 'industryTotalValue',
label: '工业总产值(亿元)', label: '工业总产值(亿元)',
}, },
{
prop: 'fixedInvestment',
label: '固定资产投资(亿元)',
},
{ {
prop: 'realEstateInvestment', prop: 'realEstateInvestment',
label: '房地产开发投资(亿元)', label: '房地产开发投资(亿元)',
...@@ -376,7 +380,7 @@ export default { ...@@ -376,7 +380,7 @@ export default {
grid: { grid: {
top:20, top:20,
// right:15, // right:15,
bottom:0, bottom:5,
}, },
series: [ series: [
{ {
...@@ -388,7 +392,7 @@ export default { ...@@ -388,7 +392,7 @@ export default {
focus: 'none' focus: 'none'
}, },
label: { label: {
show: true, show: this.valData[1] ? true : false,
position: 'top' position: 'top'
}, },
//设置折线颜色和粗细 //设置折线颜色和粗细
...@@ -438,7 +442,7 @@ export default { ...@@ -438,7 +442,7 @@ export default {
}, },
grid: { grid: {
top:20, top:20,
bottom:0, bottom:5,
}, },
series: [ series: [
{ {
...@@ -450,7 +454,7 @@ export default { ...@@ -450,7 +454,7 @@ export default {
focus: 'none' focus: 'none'
}, },
label: { label: {
show: true, show: this.valData1[1] ? true : false,
position: 'top' position: 'top'
}, },
itemStyle:{ itemStyle:{
...@@ -500,7 +504,7 @@ export default { ...@@ -500,7 +504,7 @@ export default {
}, },
grid: { grid: {
top:20, top:20,
bottom:0, bottom:5,
}, },
series: [ series: [
{ {
...@@ -512,7 +516,7 @@ export default { ...@@ -512,7 +516,7 @@ export default {
focus: 'none' focus: 'none'
}, },
label: { label: {
show: true, show: this.valData2[1] ? true : false,
position: 'top' position: 'top'
}, },
//设置折线颜色和粗细 //设置折线颜色和粗细
...@@ -562,7 +566,7 @@ export default { ...@@ -562,7 +566,7 @@ export default {
}, },
grid: { grid: {
top:20, top:20,
bottom:0, bottom:5,
}, },
series: [ series: [
{ {
...@@ -574,7 +578,7 @@ export default { ...@@ -574,7 +578,7 @@ export default {
focus: 'none' focus: 'none'
}, },
label: { label: {
show: true, show: this.valData3[1] ? true : false,
position: 'top' position: 'top'
}, },
//设置折线颜色和粗细 //设置折线颜色和粗细
...@@ -625,7 +629,7 @@ export default { ...@@ -625,7 +629,7 @@ export default {
grid: { grid: {
top:20, top:20,
// left:5, // left:5,
bottom:0, bottom:5,
}, },
series: [ series: [
{ {
...@@ -637,7 +641,7 @@ export default { ...@@ -637,7 +641,7 @@ export default {
focus: 'none' focus: 'none'
}, },
label: { label: {
show: true, show: this.valData4[1] ? true : false,
position: 'top', position: 'top',
}, },
//设置折线颜色和粗细 //设置折线颜色和粗细
...@@ -793,6 +797,14 @@ export default { ...@@ -793,6 +797,14 @@ export default {
.content2{ .content2{
.content-box{ .content-box{
margin-top: 18px; margin-top: 18px;
.hover:hover{
label{
color:#0081ff;
i{
color:#0081ff;
}
}
}
.text{ .text{
border-right: 1px solid #E4E4E4; border-right: 1px solid #E4E4E4;
display: inline-block; display: inline-block;
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="全国经济大全" name="first"></el-tab-pane> <el-tab-pane label="全国经济大全" name="first"></el-tab-pane>
<el-tab-pane label="全国商机项目分析" name="second"></el-tab-pane> <el-tab-pane label="全国商机项目分析" name="second"></el-tab-pane>
<el-tab-pane label="全国中标市场分析" name="third"></el-tab-pane> <!--<el-tab-pane label="全国中标市场分析" name="third"></el-tab-pane>-->
<el-tab-pane label="全国建筑企业分析" name="fourth"></el-tab-pane> <el-tab-pane label="全国中标市场分析" name="fourth"></el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<Economic v-if="activeName === 'first'"></Economic> <Economic v-if="activeName === 'first'"></Economic>
<Sjxmfx v-if="activeName === 'second'"></Sjxmfx> <Sjxmfx v-if="activeName === 'second'"></Sjxmfx>
<Zhongbiao v-if="activeName === 'third'"></Zhongbiao> <!--<Zhongbiao v-if="activeName === 'third'"></Zhongbiao>-->
<Jzqyfx v-if="activeName === 'fourth'"></Jzqyfx> <Jzqyfx v-if="activeName === 'fourth'"></Jzqyfx>
</div> </div>
</template> </template>
...@@ -28,7 +28,7 @@ export default { ...@@ -28,7 +28,7 @@ export default {
}, },
data() { data() {
return { return {
activeName: 'first' activeName: 'second'
} }
}, },
created() { created() {
......
...@@ -162,8 +162,8 @@ ...@@ -162,8 +162,8 @@
<el-table-column prop="companyName" label="公司名称" width="300" fixed> <el-table-column prop="companyName" label="公司名称" width="300" fixed>
<template slot-scope="scope"> <template slot-scope="scope">
<router-link :to="`/enterprise/${encodeStr(scope.row.companyId)}`" tag="a" class="a-link companyName" v-html="scope.row.companyName" ></router-link> <router-link :to="`/enterprise/${encodeStr(scope.row.companyId)}`" tag="a" class="a-link companyName" v-html="scope.row.companyName" ></router-link>
<span @click="handleClick(scope.row)" class="table-span" style="color: #3D3D3D;cursor: pointer;" v-if="scope.row.claimStatus === 0"><img src="@/assets/images/urban/rl_icon1.png"/>认领</span> <span @click="handleClick(scope.row)" class="table-span" style="color: #3D3D3D;cursor: pointer;" v-if="scope.row.claimStatus === null || scope.row.claimStatus === 1"><img src="@/assets/images/urban/rl_icon1.png"/>认领</span>
<span @click="cancelClaim(scope.row.companyName)" class="table-span" style="color: rgba(35,35,35,0.4);cursor: pointer;" v-if="scope.row.claimStatus === 1"><img src="@/assets/images/urban/rl_icon2.png"/>已认领</span> <span @click="cancelClaim(scope.row.companyName)" class="table-span" style="color: rgba(35,35,35,0.4);cursor: pointer;" v-if="scope.row.claimStatus === 0"><img src="@/assets/images/urban/rl_icon2.png"/>已认领</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="city" label="区域" :formatter="formatStatus" width="150"> <el-table-column prop="city" label="区域" :formatter="formatStatus" width="150">
...@@ -785,8 +785,7 @@ export default { ...@@ -785,8 +785,7 @@ export default {
registerAddress:registerAddress, registerAddress:registerAddress,
creditCode:res.data.creditCode, creditCode:res.data.creditCode,
} }
customerStatus(item.companyName.replace(/<[^>]+>/g, '')).then(res => { if(item.claimStatus === 1){
if(res.data === 1){
this.claimVisible1=true; this.claimVisible1=true;
}else { }else {
claim(params).then(res => { claim(params).then(res => {
...@@ -796,9 +795,10 @@ export default { ...@@ -796,9 +795,10 @@ export default {
this.querySubmit() this.querySubmit()
} }
}) })
} }
}) // customerStatus(item.companyName.replace(/<[^>]+>/g, '')).then(res => {
//
// })
} }
}) })
} }
......
...@@ -100,11 +100,4 @@ public interface IBusinessInfoService ...@@ -100,11 +100,4 @@ public interface IBusinessInfoService
List<CustomerBusinessListVo> selectCustomerBusinessList(CustomerBusinessSearchDto dto); List<CustomerBusinessListVo> selectCustomerBusinessList(CustomerBusinessSearchDto dto);
/**
* 查询企业的城投id和建设库id
* @param companyName
* @return
*/
Map queryUipIdOrCid (String companyName);
} }
...@@ -26,6 +26,7 @@ import com.dsk.system.domain.customer.vo.CustomerVo; ...@@ -26,6 +26,7 @@ import com.dsk.system.domain.customer.vo.CustomerVo;
import com.dsk.system.domain.business.vo.BusinessBrowseVo; import com.dsk.system.domain.business.vo.BusinessBrowseVo;
import com.dsk.system.domain.business.vo.BusinessLabelVo; import com.dsk.system.domain.business.vo.BusinessLabelVo;
import com.dsk.system.domain.business.vo.BusinessListVo; import com.dsk.system.domain.business.vo.BusinessListVo;
import com.dsk.system.dskService.EnterpriseService;
import com.dsk.system.mapper.BusinessInfoMapper; import com.dsk.system.mapper.BusinessInfoMapper;
import com.dsk.system.mapper.BusinessLabelMapper; import com.dsk.system.mapper.BusinessLabelMapper;
import com.dsk.system.mapper.BusinessRelateCompanyMapper; import com.dsk.system.mapper.BusinessRelateCompanyMapper;
...@@ -66,6 +67,8 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService { ...@@ -66,6 +67,8 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
private DskOpenApiUtil dskOpenApiUtil; private DskOpenApiUtil dskOpenApiUtil;
@Autowired @Autowired
private ICustomerService customerService; private ICustomerService customerService;
@Autowired
private EnterpriseService enterpriseService;
/** /**
...@@ -98,8 +101,8 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService { ...@@ -98,8 +101,8 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
List<BusinessListVo> businessListVos = businessInfoMapper.selectBusinessInfoList(dto); List<BusinessListVo> businessListVos = businessInfoMapper.selectBusinessInfoList(dto);
if (!CollectionUtils.isEmpty(businessListVos) && ObjectUtil.isNotEmpty(dto.getProjectName())) { if (!CollectionUtils.isEmpty(businessListVos) && ObjectUtil.isNotEmpty(dto.getProjectName())) {
for (BusinessListVo vo : businessListVos) { for (BusinessListVo vo : businessListVos) {
vo.setProjectName(StringUtils.markInRed(vo.getProjectName(),dto.getProjectName())); vo.setProjectName(StringUtils.markInRed(vo.getProjectName(), dto.getProjectName()));
vo.setOwnerCompany(StringUtils.markInRed(vo.getOwnerCompany(),dto.getProjectName())); vo.setOwnerCompany(StringUtils.markInRed(vo.getOwnerCompany(), dto.getProjectName()));
} }
} }
return businessListVos; return businessListVos;
...@@ -144,7 +147,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService { ...@@ -144,7 +147,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
if (!CollectionUtils.isEmpty(list)) { if (!CollectionUtils.isEmpty(list)) {
for (Map<String, Object> map : list) { for (Map<String, Object> map : list) {
BusinessLikeProjectNameListVo vo = new BusinessLikeProjectNameListVo(); BusinessLikeProjectNameListVo vo = new BusinessLikeProjectNameListVo();
vo.setProjectName(StringUtils.markInRed(MapUtil.getStr(map, "projectName"),dto.getProjectName())); vo.setProjectName(StringUtils.markInRed(MapUtil.getStr(map, "projectName"), dto.getProjectName()));
vo.setCompanyName(MapUtil.getStr(map, "tenderee")); vo.setCompanyName(MapUtil.getStr(map, "tenderee"));
vo.setInvestmentAmount(Double.parseDouble(MapUtil.getStr(map, "projectContractAmount"))); vo.setInvestmentAmount(Double.parseDouble(MapUtil.getStr(map, "projectContractAmount")));
vo.setProjectType(MapUtil.getStr(map, "projectType")); vo.setProjectType(MapUtil.getStr(map, "projectType"));
...@@ -288,17 +291,12 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService { ...@@ -288,17 +291,12 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
if (!CheckUtils.isPhone(businessInfo.getConstructionPhone()) || !CheckUtils.isPhone(businessInfo.getSupervisorPhone())) if (!CheckUtils.isPhone(businessInfo.getConstructionPhone()) || !CheckUtils.isPhone(businessInfo.getSupervisorPhone()))
throw new BaseException("500", "请输入正确的电话号码"); throw new BaseException("500", "请输入正确的电话号码");
} }
// BusinessInfo info = businessInfoMapper.selectBusinessInfoById(businessInfo.getId());
//查询企业的城投id和建设库id //查询企业的城投id和建设库id
BusinessRelateCompany relateCompany = relateCompanyMapper.selectByProprietor(businessInfo.getId()); BusinessRelateCompany relateCompany = relateCompanyMapper.selectByProprietor(businessInfo.getId());
if (ObjectUtil.isNotEmpty(businessInfo.getConstructionUnit())) { if (ObjectUtil.isNotEmpty(businessInfo.getConstructionUnit())) {
Map map = queryUipIdOrCid(businessInfo.getConstructionUnit()); Map<String, Object> map = enterpriseService.getCidAndUipIdByCompanyName(businessInfo.getConstructionUnit());
if (map.containsKey("jskEid")) { businessInfo.setConstructionUnitUipId(MapUtils.getString(map, "uipId"));
businessInfo.setConstructionUnitCid(MapUtils.getInteger(map, "jskEid", null)); businessInfo.setConstructionUnitCid(MapUtils.getInteger(map, "companyId"));
} else {
businessInfo.setConstructionUnitUipId(MapUtils.getString(map, "uipId", null));
businessInfo.setConstructionUnitCid(MapUtils.getInteger(map, "companyId", null));
}
//相关企业 //相关企业
if (ObjectUtil.isEmpty(relateCompany)) { if (ObjectUtil.isEmpty(relateCompany)) {
relateCompanyMapper.insertBusinessRelateCompany(dealwithCustomer(businessInfo)); relateCompanyMapper.insertBusinessRelateCompany(dealwithCustomer(businessInfo));
...@@ -309,16 +307,6 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService { ...@@ -309,16 +307,6 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
relateCompany.setCompanyName(businessInfo.getConstructionUnit()); relateCompany.setCompanyName(businessInfo.getConstructionUnit());
relateCompanyMapper.updateBusinessRelateCompany(relateCompany); relateCompanyMapper.updateBusinessRelateCompany(relateCompany);
} }
// //客户信息
// if(ObjectUtil.isNotEmpty(info.getCustomerId())){
// CustomerVo customerVo = customerService.info(info.getCustomerId());
// customerVo
// customerService.edit(customerVo);
// }else {
// Customer customer = new Customer();
// customer.setCompanyName()
// customerService.add()
// }
} }
if (ObjectUtil.isNotEmpty(relateCompany) && if (ObjectUtil.isNotEmpty(relateCompany) &&
...@@ -382,43 +370,6 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService { ...@@ -382,43 +370,6 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
return businessInfoMapper.selectCustomerBusinessList(dto); return businessInfoMapper.selectCustomerBusinessList(dto);
} }
@Override
public Map queryUipIdOrCid(String companyName) {
Map<Object, Object> map = MapUtil.builder().build();
if (StringUtils.isEmpty(companyName)) return map;
//查询城投企业
Map<String, Object> paramMap = MapUtil.<String, Object>builder().put("companyName", companyName).build();
Map<String, Object> resultMap = dskOpenApiUtil.requestBody("/urbanInvestment/detailsByCompanyName", paramMap);
Integer code = MapUtils.getInteger(resultMap, "code", 300);
if (code == HttpStatus.SUCCESS) {
Map data = MapUtils.getMap(resultMap, "data", null);
if (data != null) {
map.put("uipId", MapUtils.getString(data, "uipId", null));
map.put("companyId", MapUtils.getInteger(data, "companyId", null));
}
}
if (MapUtil.isEmpty(map)) {
//查村建设库企业
Map<String, Object> jskParamMap = MapUtil.<String, Object>builder()
.put("keyword", companyName)
.put("page", MapUtil.<String, Object>builder().put("page", 1).put("limit", 10).build())
.build();
Map<String, Object> jskResultMap = dskOpenApiUtil.requestBody("/enterprise/index", jskParamMap);
if (MapUtils.getInteger(resultMap, "code", 300).equals(HttpStatus.SUCCESS)) {
Map data = MapUtils.getMap(jskResultMap, "data", null);
if (data != null) {
List<Object> list = CommonUtils.assertAsArray(MapUtils.getObject(data, "list", ""));
if (CollectionUtil.isNotEmpty(list)) {
for (Object obj : list) {
map.put("jskEid", MapUtils.getInteger(BeanUtil.beanToMap(obj, false, false), "jskEid", null));
}
}
}
}
}
return map;
}
private BusinessRelateCompany dealwithCustomer(BusinessInfo bean) { private BusinessRelateCompany dealwithCustomer(BusinessInfo bean) {
BusinessRelateCompany relateCompany = new BusinessRelateCompany(); BusinessRelateCompany relateCompany = new BusinessRelateCompany();
relateCompany.setBusinessId(bean.getId()); relateCompany.setBusinessId(bean.getId());
......
...@@ -7,10 +7,11 @@ import com.dsk.common.exception.base.BaseException; ...@@ -7,10 +7,11 @@ import com.dsk.common.exception.base.BaseException;
import com.dsk.common.utils.CheckUtils; import com.dsk.common.utils.CheckUtils;
import com.dsk.common.utils.DateUtils; import com.dsk.common.utils.DateUtils;
import com.dsk.system.domain.business.dto.BusinessIdDto; import com.dsk.system.domain.business.dto.BusinessIdDto;
import com.dsk.system.dskService.EnterpriseService;
import com.dsk.system.mapper.BusinessRelateCompanyMapper; import com.dsk.system.mapper.BusinessRelateCompanyMapper;
import com.dsk.system.service.IBusinessInfoService;
import com.dsk.system.service.IBusinessRelateCompanyService; import com.dsk.system.service.IBusinessRelateCompanyService;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -26,12 +27,11 @@ import java.util.stream.Collectors; ...@@ -26,12 +27,11 @@ import java.util.stream.Collectors;
* @date 2023-05-17 * @date 2023-05-17
*/ */
@Service @Service
public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyService public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyService {
{
@Resource @Resource
private BusinessRelateCompanyMapper businessRelateCompanyMapper; private BusinessRelateCompanyMapper businessRelateCompanyMapper;
@Resource @Autowired
private IBusinessInfoService businessInfoService; private EnterpriseService enterpriseService;
/** /**
* 查询项目关联单位 * 查询项目关联单位
...@@ -40,8 +40,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS ...@@ -40,8 +40,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
* @return 项目关联单位 * @return 项目关联单位
*/ */
@Override @Override
public BusinessRelateCompany selectBusinessRelateCompanyById(Long id) public BusinessRelateCompany selectBusinessRelateCompanyById(Long id) {
{
return businessRelateCompanyMapper.selectBusinessRelateCompanyById(id); return businessRelateCompanyMapper.selectBusinessRelateCompanyById(id);
} }
...@@ -52,8 +51,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS ...@@ -52,8 +51,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
* @return 项目关联单位 * @return 项目关联单位
*/ */
@Override @Override
public List<BusinessRelateCompany> selectBusinessRelateCompanyList(BusinessRelateCompany businessRelateCompany) public List<BusinessRelateCompany> selectBusinessRelateCompanyList(BusinessRelateCompany businessRelateCompany) {
{
return businessRelateCompanyMapper.selectBusinessRelateCompanyList(businessRelateCompany); return businessRelateCompanyMapper.selectBusinessRelateCompanyList(businessRelateCompany);
} }
...@@ -65,18 +63,14 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS ...@@ -65,18 +63,14 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
*/ */
@Override @Override
@Transactional @Transactional
public int insertBusinessRelateCompany(BusinessRelateCompany businessRelateCompany) public int insertBusinessRelateCompany(BusinessRelateCompany businessRelateCompany) {
{ if (ObjectUtil.isNotEmpty(businessRelateCompany.getPhone()) && !CheckUtils.isPhone(businessRelateCompany.getPhone())) {
// if(!CheckUtils.isPhone(businessRelateCompany.getPhone())) throw new BaseException("500","请输入正确的电话号码"); throw new BaseException("500", "请输入正确的电话号码");
businessRelateCompany.setCreateTime(DateUtils.getNowDate());
//查询企业的城投id和建设库id
Map map = businessInfoService.queryUipIdOrCid(businessRelateCompany.getCompanyName());
if(map.containsKey("jskEid")){
businessRelateCompany.setCompanyId(MapUtils.getInteger(map,"jskEid",null));
}else {
businessRelateCompany.setCompanyUipId(MapUtils.getString(map,"uipId",null));
businessRelateCompany.setCompanyId(MapUtils.getInteger(map,"companyId",null));
} }
//查询企业的城投id和建设库id
Map<String, Object> map = enterpriseService.getCidAndUipIdByCompanyName(businessRelateCompany.getCompanyName());
businessRelateCompany.setCompanyUipId(MapUtils.getString(map, "uipId", null));
businessRelateCompany.setCompanyId(MapUtils.getInteger(map, "companyId", null));
return businessRelateCompanyMapper.insertBusinessRelateCompany(businessRelateCompany); return businessRelateCompanyMapper.insertBusinessRelateCompany(businessRelateCompany);
} }
...@@ -88,20 +82,14 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS ...@@ -88,20 +82,14 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
*/ */
@Override @Override
@Transactional @Transactional
public int updateBusinessRelateCompany(BusinessRelateCompany businessRelateCompany) public int updateBusinessRelateCompany(BusinessRelateCompany businessRelateCompany) {
{ if (ObjectUtil.isNotEmpty(businessRelateCompany.getPhone()) && !CheckUtils.isPhone(businessRelateCompany.getPhone())) {
if(ObjectUtil.isNotEmpty(businessRelateCompany.getPhone())){ throw new BaseException("500", "请输入正确的电话号码");
if(!CheckUtils.isPhone(businessRelateCompany.getPhone())) throw new BaseException("500","请输入正确的电话号码");
} }
businessRelateCompany.setUpdateTime(DateUtils.getNowDate());
//查询企业的城投id和建设库id //查询企业的城投id和建设库id
Map map = businessInfoService.queryUipIdOrCid(businessRelateCompany.getCompanyName()); Map<String, Object> map = enterpriseService.getCidAndUipIdByCompanyName(businessRelateCompany.getCompanyName());
if(map.containsKey("jskEid")){ businessRelateCompany.setCompanyUipId(MapUtils.getString(map, "uipId", null));
businessRelateCompany.setCompanyId(MapUtils.getInteger(map,"jskEid",null)); businessRelateCompany.setCompanyId(MapUtils.getInteger(map, "companyId", null));
}else {
businessRelateCompany.setCompanyUipId(MapUtils.getString(map,"uipId",null));
businessRelateCompany.setCompanyId(MapUtils.getInteger(map,"companyId",null));
}
return businessRelateCompanyMapper.updateBusinessRelateCompany(businessRelateCompany); return businessRelateCompanyMapper.updateBusinessRelateCompany(businessRelateCompany);
} }
...@@ -112,8 +100,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS ...@@ -112,8 +100,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteBusinessRelateCompanyByIds(Long[] ids) public int deleteBusinessRelateCompanyByIds(Long[] ids) {
{
return businessRelateCompanyMapper.deleteBusinessRelateCompanyByIds(ids); return businessRelateCompanyMapper.deleteBusinessRelateCompanyByIds(ids);
} }
...@@ -124,8 +111,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS ...@@ -124,8 +111,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteBusinessRelateCompanyById(Long id) public int deleteBusinessRelateCompanyById(Long id) {
{
return businessRelateCompanyMapper.deleteBusinessRelateCompanyById(id); return businessRelateCompanyMapper.deleteBusinessRelateCompanyById(id);
} }
...@@ -136,6 +122,6 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS ...@@ -136,6 +122,6 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
.eq(BusinessRelateCompany::getBusinessId, dto.getBusinessId()) .eq(BusinessRelateCompany::getBusinessId, dto.getBusinessId())
.groupBy(BusinessRelateCompany::getCompanyRole) .groupBy(BusinessRelateCompany::getCompanyRole)
.orderByDesc(BusinessRelateCompany::getCreateTime)); .orderByDesc(BusinessRelateCompany::getCreateTime));
return roleList.stream().map(p ->p.getCompanyRole()).collect(Collectors.toList()); return roleList.stream().map(p -> p.getCompanyRole()).collect(Collectors.toList());
} }
} }
...@@ -6,14 +6,18 @@ import com.dsk.common.utils.SecurityUtils; ...@@ -6,14 +6,18 @@ import com.dsk.common.utils.SecurityUtils;
import com.dsk.system.domain.customer.ContactInfo; import com.dsk.system.domain.customer.ContactInfo;
import com.dsk.system.domain.customer.dto.ContactInfoSearchDto; import com.dsk.system.domain.customer.dto.ContactInfoSearchDto;
import com.dsk.system.domain.customer.vo.ContactInfoListVo; import com.dsk.system.domain.customer.vo.ContactInfoListVo;
import com.dsk.system.dskService.EnterpriseService;
import com.dsk.system.mapper.ContactInfoMapper; import com.dsk.system.mapper.ContactInfoMapper;
import com.dsk.system.service.IContactInfoService; import com.dsk.system.service.IContactInfoService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 用户联系人(CustomerContact)表服务实现类 * 用户联系人(CustomerContact)表服务实现类
...@@ -28,6 +32,12 @@ public class ContactInfoServiceImpl implements IContactInfoService { ...@@ -28,6 +32,12 @@ public class ContactInfoServiceImpl implements IContactInfoService {
@Resource @Resource
private ContactInfoMapper baseMapper; private ContactInfoMapper baseMapper;
@Autowired
private EnterpriseService enterpriseService;
// @Resource
// private ICustomerService customerService;
@Override @Override
public List<ContactInfoListVo> selectList(ContactInfoSearchDto dto) { public List<ContactInfoListVo> selectList(ContactInfoSearchDto dto) {
return baseMapper.selectPageList(dto); return baseMapper.selectPageList(dto);
...@@ -41,6 +51,7 @@ public class ContactInfoServiceImpl implements IContactInfoService { ...@@ -41,6 +51,7 @@ public class ContactInfoServiceImpl implements IContactInfoService {
@Override @Override
public boolean insert(ContactInfo bean) { public boolean insert(ContactInfo bean) {
verifyParameter(bean); verifyParameter(bean);
bean.setCreateBy(bean.getUpdateBy());
return baseMapper.insert(bean) > 0; return baseMapper.insert(bean) > 0;
} }
...@@ -60,9 +71,18 @@ public class ContactInfoServiceImpl implements IContactInfoService { ...@@ -60,9 +71,18 @@ public class ContactInfoServiceImpl implements IContactInfoService {
* 参数验证 * 参数验证
*/ */
private void verifyParameter(ContactInfo bean) { private void verifyParameter(ContactInfo bean) {
// if (ObjectUtils.isEmpty(bean.getCustomerId())) throw new BeanException("客户id不能为空!"); if (!ObjectUtils.isEmpty(bean.getCompanyName())) {
Map<String, Object> map = enterpriseService.getCidAndUipIdByCompanyName(bean.getCompanyName());
bean.setCompanyId(MapUtils.getInteger(map, "companyId"));
bean.setUipId(MapUtils.getString(map, "uipId"));
}
// if (!ObjectUtils.isEmpty(bean.getCustomerId()) && ObjectUtils.isEmpty(bean.getId())) {
// CustomerVo info = customerService.info(bean.getCustomerId());
// bean.setCompanyName(info.getCompanyName());
// bean.setCompanyId(info.getCompanyId());
// bean.setUipId(info.getUipId());
// }
LoginUser loginUser = SecurityUtils.getLoginUser(); LoginUser loginUser = SecurityUtils.getLoginUser();
bean.setCreateBy(loginUser.getUser().getNickName());
bean.setUpdateId(loginUser.getUserId()); bean.setUpdateId(loginUser.getUserId());
bean.setUpdateBy(loginUser.getUser().getNickName()); bean.setUpdateBy(loginUser.getUser().getNickName());
} }
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
from contact_info cc from contact_info cc
left join business_info bi on cc.project_id = bi.id left join business_info bi on cc.project_id = bi.id
<where> <where>
<if test="cc.customerId != null and cc.customerId !='' "> and (cc.customer_id = #{customerId} or cc.company_name =#{companyName})</if> <if test="customerId != null and customerId !='' "> and (cc.customer_id = #{customerId} or bi.customer_id = #{customerId})</if>
<if test="cc.projectId != null "> and cc.project_id = #{projectId} </if> <if test="projectId != null "> and cc.project_id = #{projectId} </if>
</where> </where>
order by cc.create_time desc order by cc.create_time desc
</select> </select>
......
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