Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
dsk-cr20g
Commits
c174d571
Commit
c174d571
authored
Jul 26, 2023
by
lcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
8414a28f
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
100 additions
and
93 deletions
+100
-93
BusinessInfoController.java
...m/dsk/web/controller/business/BusinessInfoController.java
+1
-1
BusinessRelateCompany.java
.../dsk/common/core/domain/entity/BusinessRelateCompany.java
+2
-32
BusinessListDto.java
.../src/main/java/com/dsk/system/domain/BusinessListDto.java
+1
-1
BusinessRelateCompanyMapper.java
...va/com/dsk/system/mapper/BusinessRelateCompanyMapper.java
+10
-7
BusinessBacklogServiceImpl.java
...m/dsk/system/service/impl/BusinessBacklogServiceImpl.java
+3
-1
BusinessInfoServiceImpl.java
.../com/dsk/system/service/impl/BusinessInfoServiceImpl.java
+55
-21
BusinessRelateCompanyServiceImpl.java
...system/service/impl/BusinessRelateCompanyServiceImpl.java
+6
-1
BusinessInfoMapper.xml
...src/main/resources/mapper/business/BusinessInfoMapper.xml
+4
-16
BusinessRelateCompanyMapper.xml
...resources/mapper/business/BusinessRelateCompanyMapper.xml
+18
-13
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/business/BusinessInfoController.java
View file @
c174d571
...
@@ -90,7 +90,7 @@ public class BusinessInfoController extends BaseController
...
@@ -90,7 +90,7 @@ public class BusinessInfoController extends BaseController
/**
/**
* 新增项目详情
* 新增项目详情
*/
*/
// @PreAuthorize("@ss.hasPermi('system:business:add')")
// @PreAuthorize("@ss.hasPermi('system:business:add')")
Z
// @Log(title = "项目管理", businessType = BusinessType.INSERT)
// @Log(title = "项目管理", businessType = BusinessType.INSERT)
@PostMapping
(
"/add"
)
@PostMapping
(
"/add"
)
public
AjaxResult
add
(
@RequestBody
BusinessAddDto
dto
)
public
AjaxResult
add
(
@RequestBody
BusinessAddDto
dto
)
...
...
dsk-common/src/main/java/com/dsk/common/core/domain/entity/BusinessRelateCompany.java
View file @
c174d571
...
@@ -54,36 +54,6 @@ public class BusinessRelateCompany extends BaseEntity
...
@@ -54,36 +54,6 @@ public class BusinessRelateCompany extends BaseEntity
@Excel
(
name
=
"对接深度/竞争力度"
)
@Excel
(
name
=
"对接深度/竞争力度"
)
private
String
depth
;
private
String
depth
;
/** 企业类型 */
/** 是否业主单位 0:否 1:是 */
@Excel
(
name
=
"企业类型"
)
private
Integer
isProprietor
;
private
String
companyType
;
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"businessId"
,
getBusinessId
())
.
append
(
"companyId"
,
getCompanyId
())
.
append
(
"companyName"
,
getCompanyName
())
.
append
(
"companyRole"
,
getCompanyRole
())
.
append
(
"responsiblePerson"
,
getResponsiblePerson
())
.
append
(
"phone"
,
getPhone
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"depth"
,
getDepth
())
.
append
(
"companyType"
,
getCompanyType
())
.
append
(
"companyUipId"
,
getCompanyUipId
())
.
toString
();
}
public
BusinessRelateCompany
(
Integer
businessId
,
Integer
companyId
,
String
companyName
,
String
companyRole
)
{
this
.
businessId
=
businessId
;
this
.
companyId
=
companyId
;
this
.
companyName
=
companyName
;
this
.
companyRole
=
companyRole
;
}
public
BusinessRelateCompany
(
Integer
businessId
)
{
this
.
businessId
=
businessId
;
}
}
}
dsk-system/src/main/java/com/dsk/system/domain/BusinessListDto.java
View file @
c174d571
...
@@ -24,7 +24,7 @@ public class BusinessListDto {
...
@@ -24,7 +24,7 @@ public class BusinessListDto {
/**
/**
* 用户查看全部他人可见项目标示
* 用户查看全部他人可见项目标示
*/
*/
private
Integer
others
;
private
Long
others
;
/**
/**
* 省id
* 省id
...
...
dsk-system/src/main/java/com/dsk/system/mapper/BusinessRelateCompanyMapper.java
View file @
c174d571
...
@@ -61,4 +61,7 @@ public interface BusinessRelateCompanyMapper extends BaseMapper<BusinessRelateCo
...
@@ -61,4 +61,7 @@ public interface BusinessRelateCompanyMapper extends BaseMapper<BusinessRelateCo
* @return 结果
* @return 结果
*/
*/
public
int
deleteBusinessRelateCompanyByIds
(
Long
[]
ids
);
public
int
deleteBusinessRelateCompanyByIds
(
Long
[]
ids
);
BusinessRelateCompany
selectByProprietor
(
Integer
id
);
}
}
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessBacklogServiceImpl.java
View file @
c174d571
...
@@ -63,7 +63,9 @@ public class BusinessBacklogServiceImpl implements IBusinessBacklogService {
...
@@ -63,7 +63,9 @@ public class BusinessBacklogServiceImpl implements IBusinessBacklogService {
@Override
@Override
@Transactional
@Transactional
public
int
insertBusinessBacklog
(
BusinessBacklog
businessBacklog
)
{
public
int
insertBusinessBacklog
(
BusinessBacklog
businessBacklog
)
{
if
(
ObjectUtil
.
isNotEmpty
(
businessBacklog
.
getDueTime
())){
if
(
businessBacklog
.
getDueTime
().
before
(
new
Date
()))
throw
new
BaseException
(
"到期时间必须大于当前时间"
);
if
(
businessBacklog
.
getDueTime
().
before
(
new
Date
()))
throw
new
BaseException
(
"到期时间必须大于当前时间"
);
}
return
businessBacklogMapper
.
insertBusinessBacklog
(
businessBacklog
);
return
businessBacklogMapper
.
insertBusinessBacklog
(
businessBacklog
);
}
}
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessInfoServiceImpl.java
View file @
c174d571
...
@@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollectionUtil;
...
@@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollectionUtil;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.dsk.acc.openapi.client.util.CommonUtils
;
import
com.dsk.acc.openapi.client.util.CommonUtils
;
import
com.dsk.common.config.RuoYiConfig
;
import
com.dsk.common.config.RuoYiConfig
;
import
com.dsk.common.constant.HttpStatus
;
import
com.dsk.common.constant.HttpStatus
;
...
@@ -97,13 +98,10 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -97,13 +98,10 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
*/
*/
@Override
@Override
public
List
<
BusinessListVo
>
selectBusinessInfoList
(
BusinessListDto
dto
)
{
public
List
<
BusinessListVo
>
selectBusinessInfoList
(
BusinessListDto
dto
)
{
if
(
StringUtils
.
isEmpty
(
dto
.
getMinAmount
()))
dto
.
setMinAmount
(
"0"
);
List
<
BusinessListVo
>
othersList
=
new
ArrayList
<>();
List
<
BusinessListVo
>
othersList
=
new
ArrayList
<>();
//userId不传值,就查询全部他人可见项目+自己的
//userId不传值,就查询全部他人可见项目+自己的
if
(
dto
.
getUserId
()
==
null
)
{
if
(
dto
.
getUserId
()
==
null
)
{
Long
userId
=
SecurityUtils
.
getLoginUser
().
getUserId
();
dto
.
setOthers
(
SecurityUtils
.
getUserId
());
if
(
userId
==
null
)
throw
new
BaseException
(
"请登录"
);
dto
.
setOthers
(
userId
.
intValue
());
//查询他人可见项目
//查询他人可见项目
othersList
=
businessInfoMapper
.
selectBusinessInfoList
(
dto
);
othersList
=
businessInfoMapper
.
selectBusinessInfoList
(
dto
);
}
}
...
@@ -234,9 +232,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -234,9 +232,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
}
}
}
}
BusinessRelateCompany
relateCompany
=
dealwithCustomer
(
vo
);
int
i
=
relateCompanyMapper
.
insertBusinessRelateCompany
(
dealwithCustomer
(
businessInfo
));
relateCompany
.
setBusinessId
(
businessInfo
.
getId
());
int
i
=
relateCompanyMapper
.
insertBusinessRelateCompany
(
relateCompany
);
if
(
i
==
0
)
{
if
(
i
==
0
)
{
throw
new
ServiceException
(
"业主单位信息添加失败!"
);
throw
new
ServiceException
(
"业主单位信息添加失败!"
);
}
}
...
@@ -253,8 +249,11 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -253,8 +249,11 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
@Override
@Override
@Transactional
@Transactional
public
int
updateBusinessInfo
(
BusinessInfo
businessInfo
)
{
public
int
updateBusinessInfo
(
BusinessInfo
businessInfo
)
{
if
(
ObjectUtil
.
isEmpty
(
businessInfo
.
getId
()))
{
throw
new
BaseException
(
"项目id不能为空!"
);
}
//判断资金Double类型的位数
//判断资金Double类型的位数
if
(
businessInfo
.
getInvestmentAmount
()
!=
null
)
{
if
(
ObjectUtil
.
isNotEmpty
(
businessInfo
.
getInvestmentAmount
())
)
{
int
front
=
CheckUtils
.
checkIntegerPlaces
(
businessInfo
.
getInvestmentAmount
());
int
front
=
CheckUtils
.
checkIntegerPlaces
(
businessInfo
.
getInvestmentAmount
());
int
later
=
CheckUtils
.
checkDecimalPlaces
(
businessInfo
.
getInvestmentAmount
());
int
later
=
CheckUtils
.
checkDecimalPlaces
(
businessInfo
.
getInvestmentAmount
());
if
(
front
>
9
)
throw
new
BaseException
(
"500"
,
"小数点前最多支持9位"
);
if
(
front
>
9
)
throw
new
BaseException
(
"500"
,
"小数点前最多支持9位"
);
...
@@ -264,7 +263,10 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -264,7 +263,10 @@ 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
());
if
(
ObjectUtil
.
isNotEmpty
(
businessInfo
.
getConstructionUnit
()))
{
Map
map
=
queryUipIdOrCid
(
businessInfo
.
getConstructionUnit
());
Map
map
=
queryUipIdOrCid
(
businessInfo
.
getConstructionUnit
());
if
(
map
.
containsKey
(
"jskEid"
))
{
if
(
map
.
containsKey
(
"jskEid"
))
{
businessInfo
.
setConstructionUnitCid
(
MapUtils
.
getInteger
(
map
,
"jskEid"
,
null
));
businessInfo
.
setConstructionUnitCid
(
MapUtils
.
getInteger
(
map
,
"jskEid"
,
null
));
...
@@ -272,6 +274,35 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -272,6 +274,35 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
businessInfo
.
setConstructionUnitUipId
(
MapUtils
.
getString
(
map
,
"uipId"
,
null
));
businessInfo
.
setConstructionUnitUipId
(
MapUtils
.
getString
(
map
,
"uipId"
,
null
));
businessInfo
.
setConstructionUnitCid
(
MapUtils
.
getInteger
(
map
,
"companyId"
,
null
));
businessInfo
.
setConstructionUnitCid
(
MapUtils
.
getInteger
(
map
,
"companyId"
,
null
));
}
}
//相关企业
if
(
ObjectUtil
.
isEmpty
(
relateCompany
))
{
relateCompanyMapper
.
insertBusinessRelateCompany
(
dealwithCustomer
(
businessInfo
));
}
if
(
ObjectUtil
.
isNotEmpty
(
relateCompany
)
&&
!
businessInfo
.
getConstructionUnit
().
equals
(
relateCompany
.
getCompanyName
())){
relateCompany
.
setCompanyId
(
businessInfo
.
getConstructionUnitCid
());
relateCompany
.
setCompanyUipId
(
businessInfo
.
getConstructionUnitUipId
());
relateCompany
.
setCompanyName
(
businessInfo
.
getConstructionUnit
());
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
)&&
(
ObjectUtil
.
isNotEmpty
(
businessInfo
.
getConstructionPhone
())
||
ObjectUtil
.
isNotEmpty
(
businessInfo
.
getConstructionPrincipal
())))
{
relateCompany
.
setPhone
(
businessInfo
.
getConstructionPhone
());
relateCompany
.
setResponsiblePerson
(
businessInfo
.
getConstructionPrincipal
());
relateCompanyMapper
.
updateBusinessRelateCompany
(
relateCompany
);
}
return
businessInfoMapper
.
updateBusinessInfo
(
businessInfo
);
return
businessInfoMapper
.
updateBusinessInfo
(
businessInfo
);
}
}
...
@@ -364,14 +395,17 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -364,14 +395,17 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
}
}
private
BusinessRelateCompany
dealwithCustomer
(
Customer
bean
)
{
private
BusinessRelateCompany
dealwithCustomer
(
BusinessInfo
bean
)
{
BusinessRelateCompany
relateCompany
=
new
BusinessRelateCompany
();
BusinessRelateCompany
relateCompany
=
new
BusinessRelateCompany
();
relateCompany
.
setCompanyId
(
bean
.
getCompanyId
());
relateCompany
.
setBusinessId
(
bean
.
getId
());
relateCompany
.
setCompanyUipId
(
bean
.
getUipId
());
relateCompany
.
setCompanyId
(
bean
.
getConstructionUnitCid
());
relateCompany
.
setCompanyName
(
bean
.
getCompanyName
());
relateCompany
.
setCompanyUipId
(
bean
.
getConstructionUnitUipId
());
relateCompany
.
setCompanyRole
(
"业主"
);
relateCompany
.
setCompanyName
(
bean
.
getConstructionUnit
());
relateCompany
.
setResponsiblePerson
(
bean
.
getLegalPerson
());
relateCompany
.
setPhone
(
bean
.
getConstructionPhone
());
relateCompany
.
setCompanyType
(
"业主单位"
);
relateCompany
.
setCompanyRole
(
"招采单位"
);
relateCompany
.
setResponsiblePerson
(
bean
.
getConstructionPrincipal
());
relateCompany
.
setIsProprietor
(
1
);
relateCompany
.
setRemark
(
"业主单位"
);
return
relateCompany
;
return
relateCompany
;
}
}
}
}
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessRelateCompanyServiceImpl.java
View file @
c174d571
package
com
.
dsk
.
system
.
service
.
impl
;
package
com
.
dsk
.
system
.
service
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.dsk.common.core.domain.entity.BusinessRelateCompany
;
import
com.dsk.common.core.domain.entity.BusinessRelateCompany
;
import
com.dsk.common.exception.base.BaseException
;
import
com.dsk.common.utils.CheckUtils
;
import
com.dsk.common.utils.DateUtils
;
import
com.dsk.common.utils.DateUtils
;
import
com.dsk.system.domain.BusinessIdDto
;
import
com.dsk.system.domain.BusinessIdDto
;
import
com.dsk.system.mapper.BusinessRelateCompanyMapper
;
import
com.dsk.system.mapper.BusinessRelateCompanyMapper
;
...
@@ -87,7 +90,9 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
...
@@ -87,7 +90,9 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
@Transactional
@Transactional
public
int
updateBusinessRelateCompany
(
BusinessRelateCompany
businessRelateCompany
)
public
int
updateBusinessRelateCompany
(
BusinessRelateCompany
businessRelateCompany
)
{
{
// if(!CheckUtils.isPhone(businessRelateCompany.getPhone())) throw new BaseException("500","请输入正确的电话号码");
if
(
ObjectUtil
.
isNotEmpty
(
businessRelateCompany
.
getPhone
())){
if
(!
CheckUtils
.
isPhone
(
businessRelateCompany
.
getPhone
()))
throw
new
BaseException
(
"500"
,
"请输入正确的电话号码"
);
}
businessRelateCompany
.
setUpdateTime
(
DateUtils
.
getNowDate
());
businessRelateCompany
.
setUpdateTime
(
DateUtils
.
getNowDate
());
//查询企业的城投id和建设库id
//查询企业的城投id和建设库id
Map
map
=
businessInfoService
.
queryUipIdOrCid
(
businessRelateCompany
.
getCompanyName
());
Map
map
=
businessInfoService
.
queryUipIdOrCid
(
businessRelateCompany
.
getCompanyName
());
...
...
dsk-system/src/main/resources/mapper/business/BusinessInfoMapper.xml
View file @
c174d571
...
@@ -100,10 +100,10 @@
...
@@ -100,10 +100,10 @@
u.nick_name nickName,
u.nick_name nickName,
GROUP_CONCAT(DISTINCT l.label) label
GROUP_CONCAT(DISTINCT l.label) label
FROM business_info i
FROM business_info i
LEFT JOIN business_user bu on bu.business_id = i.id
LEFT JOIN business_follow_record f on f.business_id = i.id
LEFT JOIN business_follow_record f on f.business_id = i.id
LEFT JOIN business_label l on l.business_id = i.id
LEFT JOIN business_label l on l.business_id = i.id
LEFT JOIN business_user bu on bu.business_id = i.id
LEFT JOIN sys_user u on u.user_id = bu.user_id
LEFT JOIN sys_user u on u.user_id = f.user_id
<where>
<where>
<if
test=
"userId != null"
>
<if
test=
"userId != null"
>
and bu.user_id = #{userId}
and bu.user_id = #{userId}
...
@@ -114,20 +114,8 @@
...
@@ -114,20 +114,8 @@
#{projectType}
#{projectType}
</foreach>
</foreach>
</if>
</if>
<if
test=
"minAmount != null and minAmount != '' and minAmount != '0' and maxAmount != minAmount"
>
<if
test=
"minAmount != null and minAmount != ''"
>
and i.investment_amount
>
= #{minAmount}
</if>
and i.investment_amount
>
#{minAmount}
<if
test=
"maxAmount != null and maxAmount != ''"
>
and i.investment_amount
<
= #{maxAmount}
</if>
</if>
<if
test=
"minAmount == '0' and maxAmount != minAmount"
>
and ((i.investment_amount
>
#{minAmount}
and i.investment_amount
<
= #{maxAmount})
or i.investment_amount is null)
</if>
<if
test=
"maxAmount != null and maxAmount != '' and maxAmount != minAmount and minAmount != '0'"
>
and i.investment_amount
<
= #{maxAmount}
</if>
<if
test=
"minAmount != null and minAmount != '' and maxAmount != null and maxAmount != '' and maxAmount == minAmount"
>
and i.investment_amount = #{minAmount}
</if>
<if
test=
"projectStage != null and projectStage != ''"
>
<if
test=
"projectStage != null and projectStage != ''"
>
and i.project_stage in
and i.project_stage in
<foreach
collection=
"projectStage"
item=
"projectStage"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"projectStage"
item=
"projectStage"
open=
"("
separator=
","
close=
")"
>
...
...
dsk-system/src/main/resources/mapper/business/BusinessRelateCompanyMapper.xml
View file @
c174d571
...
@@ -12,10 +12,11 @@
...
@@ -12,10 +12,11 @@
<result
property=
"companyRole"
column=
"company_role"
/>
<result
property=
"companyRole"
column=
"company_role"
/>
<result
property=
"responsiblePerson"
column=
"responsible_person"
/>
<result
property=
"responsiblePerson"
column=
"responsible_person"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"isProprietor"
column=
"is_proprietor"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"depth"
column=
"depth"
/>
<result
property=
"depth"
column=
"depth"
/>
<result
property=
"companyType"
column=
"company_type"
/>
<result
property=
"companyUipId"
column=
"company_uip_id"
/>
<result
property=
"companyUipId"
column=
"company_uip_id"
/>
</resultMap>
</resultMap>
...
@@ -28,9 +29,10 @@
...
@@ -28,9 +29,10 @@
responsible_person,
responsible_person,
phone,
phone,
depth,
depth,
is_proprietor,
remark,
create_time,
create_time,
update_time,
update_time,
company_type,
company_uip_id
company_uip_id
from business_relate_company
from business_relate_company
</sql>
</sql>
...
@@ -50,7 +52,6 @@
...
@@ -50,7 +52,6 @@
#{responsiblePerson}
#{responsiblePerson}
</if>
</if>
<if
test=
"phone != null and phone != ''"
>
and phone = #{phone}
</if>
<if
test=
"phone != null and phone != ''"
>
and phone = #{phone}
</if>
<if
test=
"companyType != null and companyType != ''"
>
and company_type = #{companyType}
</if>
</where>
</where>
</select>
</select>
...
@@ -70,7 +71,8 @@
...
@@ -70,7 +71,8 @@
<if
test=
"companyRole != null"
>
company_role,
</if>
<if
test=
"companyRole != null"
>
company_role,
</if>
<if
test=
"responsiblePerson != null"
>
responsible_person,
</if>
<if
test=
"responsiblePerson != null"
>
responsible_person,
</if>
<if
test=
"phone != null"
>
phone,
</if>
<if
test=
"phone != null"
>
phone,
</if>
<if
test=
"companyType != null"
>
company_type,
</if>
<if
test=
"isProprietor != null"
>
is_proprietor,
</if>
<if
test=
"remark != null and remark != '' "
>
remark,
</if>
<if
test=
"companyUipId != null"
>
company_uip_id,
</if>
<if
test=
"companyUipId != null"
>
company_uip_id,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
...
@@ -81,26 +83,24 @@
...
@@ -81,26 +83,24 @@
<if
test=
"companyRole != null"
>
#{companyRole},
</if>
<if
test=
"companyRole != null"
>
#{companyRole},
</if>
<if
test=
"responsiblePerson != null"
>
#{responsiblePerson},
</if>
<if
test=
"responsiblePerson != null"
>
#{responsiblePerson},
</if>
<if
test=
"phone != null"
>
#{phone},
</if>
<if
test=
"phone != null"
>
#{phone},
</if>
<if
test=
"companyType != null"
>
#{companyType},
</if>
<if
test=
"isProprietor != null"
>
#{isProprietor},
</if>
<if
test=
"remark != null and remark != ''"
>
#{remark},
</if>
<if
test=
"companyUipId != null"
>
#{companyUipId},
</if>
<if
test=
"companyUipId != null"
>
#{companyUipId},
</if>
</trim>
</trim>
</insert>
</insert>
<update
id=
"updateBusinessRelateCompany"
parameterType=
"com.dsk.common.core.domain.entity.BusinessRelateCompany"
>
<update
id=
"updateBusinessRelateCompany"
parameterType=
"com.dsk.common.core.domain.entity.BusinessRelateCompany"
>
update business_relate_company
update business_relate_company
<trim
prefix=
"SET"
suffixOverrides=
","
>
<set>
<if
test=
"businessId != null"
>
business_id = #{businessId},
</if>
<if
test=
"companyId != null"
>
company_id = #{companyId},
</if>
company_id = #{companyId},
<if
test=
"companyUipId != null"
>
company_uip_id = #{companyUipId},
</if>
company_uip_id = #{companyUipId},
<if
test=
"companyName != null"
>
company_name = #{companyName},
</if>
<if
test=
"companyName != null"
>
company_name = #{companyName},
</if>
<if
test=
"depth != null"
>
depth = #{depth},
</if>
<if
test=
"depth != null"
>
depth = #{depth},
</if>
<if
test=
"companyRole != null"
>
company_role = #{companyRole},
</if>
<if
test=
"companyRole != null"
>
company_role = #{companyRole},
</if>
<if
test=
"responsiblePerson != null"
>
responsible_person = #{responsiblePerson},
</if>
<if
test=
"responsiblePerson != null"
>
responsible_person = #{responsiblePerson},
</if>
<if
test=
"phone != null"
>
phone = #{phone},
</if>
<if
test=
"phone != null"
>
phone = #{phone},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
</set>
<if
test=
"companyType != null"
>
company_type = #{companyType},
</if>
</trim>
where id = #{id}
where id = #{id}
</update>
</update>
...
@@ -116,4 +116,9 @@
...
@@ -116,4 +116,9 @@
#{id}
#{id}
</foreach>
</foreach>
</delete>
</delete>
<select
id=
"selectByProprietor"
resultType=
"com.dsk.common.core.domain.entity.BusinessRelateCompany"
>
<include
refid=
"selectBusinessRelateCompanyVo"
/>
where business_id = #{businessId} and is_proprietor = 1
</select>
</mapper>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment