Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
ims
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
ims
Commits
bb9835c3
提交
bb9835c3
authored
7月 17, 2023
作者:
张小凤
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
LicenceBack(update)
上级
ebd12afc
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
61 行增加
和
6 行删除
+61
-6
LicenseOrganizationsDTO.java
...java/com/mmc/csf/licence/dto/LicenseOrganizationsDTO.java
+7
-0
LicenseOrganizationsVO.java
...n/java/com/mmc/csf/licence/vo/LicenseOrganizationsVO.java
+8
-2
LicenceBackgroundDao.java
...com/mmc/csf/release/dao/licence/LicenceBackgroundDao.java
+3
-1
LicenseOrganizationsDO.java
...mc/csf/release/entity/licence/LicenseOrganizationsDO.java
+10
-0
LicenceBackgroundServiceImpl.java
...se/service/licence/impl/LicenceBackgroundServiceImpl.java
+14
-0
LicenceBackgroundDao.xml
...rc/main/resources/mapper/licence/LicenceBackgroundDao.xml
+19
-3
没有找到文件。
csf-common/csf-common-model/src/main/java/com/mmc/csf/licence/dto/LicenseOrganizationsDTO.java
浏览文件 @
bb9835c3
...
...
@@ -78,4 +78,11 @@ public class LicenseOrganizationsDTO {
@ApiModelProperty
(
value
=
"培训项目"
,
required
=
false
)
private
List
<
LicenseTrainingProgramsDTO
>
programsDOList
;
@ApiModelProperty
(
value
=
"经度"
,
example
=
"40.892313123"
,
required
=
true
)
private
Double
longitude
;
@ApiModelProperty
(
value
=
"纬度"
,
example
=
"50.892313123"
,
required
=
true
)
private
Double
latitude
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/licence/vo/LicenseOrganizationsVO.java
浏览文件 @
bb9835c3
...
...
@@ -42,10 +42,16 @@ public class LicenseOrganizationsVO {
@NotBlank
(
message
=
"机构地区不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
region
;
@ApiModelProperty
(
value
=
"机构地区名称"
,
example
=
"河北省,石家庄市"
,
required
=
tru
e
)
@NotBlank
(
message
=
"机构地区名称"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@ApiModelProperty
(
value
=
"机构地区名称"
,
example
=
"河北省,石家庄市"
,
required
=
fals
e
)
//
@NotBlank(message = "机构地区名称", groups = {Create.class, Update.class})
private
String
regionName
;
@ApiModelProperty
(
value
=
"经度"
,
example
=
"40.892313123"
,
required
=
true
)
private
Double
longitude
;
@ApiModelProperty
(
value
=
"纬度"
,
example
=
"50.892313123"
,
required
=
true
)
private
Double
latitude
;
@ApiModelProperty
(
value
=
"机构详细地址"
,
example
=
"南山区"
,
required
=
true
)
@NotBlank
(
message
=
"机构详细地址不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
detailedAddress
;
...
...
release-service/src/main/java/com/mmc/csf/release/dao/licence/LicenceBackgroundDao.java
浏览文件 @
bb9835c3
...
...
@@ -38,7 +38,7 @@ public interface LicenceBackgroundDao {
void
updateProject
(
LicenseTrainingProgramsDO
programsDO
);
void
removeProject
(
Integer
id
);
List
<
LicenseProgramsDO
>
LicenseTrainingProgramsDTO
(
Integer
id
);
int
countListOrgPage
(
LicenseOrganizationsQO
organizationsQO
);
...
...
@@ -49,4 +49,6 @@ public interface LicenceBackgroundDao {
List
<
LicenseProgramsDO
>
trainingProgram
(
LicenseOrganizationsQO
organizationsQO
);
int
removeOrg
(
Integer
id
);
List
<
String
>
getOrgName
(
List
<
Integer
>
orgCode
);
}
release-service/src/main/java/com/mmc/csf/release/entity/licence/LicenseOrganizationsDO.java
浏览文件 @
bb9835c3
...
...
@@ -77,6 +77,12 @@ public class LicenseOrganizationsDO {
private
List
<
LicenseTrainingProgramsDTO
>
programsDOList
;
@ApiModelProperty
(
value
=
"经度"
,
example
=
"40.892313123"
,
required
=
true
)
private
Double
longitude
;
@ApiModelProperty
(
value
=
"纬度"
,
example
=
"50.892313123"
,
required
=
true
)
private
Double
latitude
;
/**
* VO类转换
*/
...
...
@@ -93,6 +99,8 @@ public class LicenseOrganizationsDO {
this
.
detail
=
organizationsVO
.
getDetail
();
this
.
detailedAddress
=
organizationsVO
.
getDetailedAddress
();
this
.
regionName
=
organizationsVO
.
getRegionName
();
this
.
longitude
=
organizationsVO
.
getLongitude
();
this
.
latitude
=
organizationsVO
.
getLatitude
();
}
...
...
@@ -117,6 +125,8 @@ public class LicenseOrganizationsDO {
.
detail
(
this
.
detail
)
.
programsDOList
(
this
.
programsDOList
)
.
regionName
(
this
.
regionName
)
.
longitude
(
this
.
longitude
)
.
latitude
(
this
.
latitude
)
.
build
();
}
}
release-service/src/main/java/com/mmc/csf/release/service/licence/impl/LicenceBackgroundServiceImpl.java
浏览文件 @
bb9835c3
...
...
@@ -15,10 +15,12 @@ import com.mmc.csf.release.entity.licence.LicenseProgramsDO;
import
com.mmc.csf.release.entity.licence.LicenseTrainingProgramsDO
;
import
com.mmc.csf.release.service.licence.LicenceBackgroundService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -41,6 +43,7 @@ public class LicenceBackgroundServiceImpl implements LicenceBackgroundService {
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
THE_ORGANIZATION_NAME_ALREADY_EXISTS
);
}
getOrgName
(
organizations
);
LicenseOrganizationsDO
organizationsDO
=
new
LicenseOrganizationsDO
(
organizations
);
List
<
Integer
>
list
=
new
ArrayList
<>();
LicenseTrainingProgramsDO
programsDO
=
null
;
...
...
@@ -73,6 +76,8 @@ public class LicenceBackgroundServiceImpl implements LicenceBackgroundService {
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
THE_ORGANIZATION_NAME_ALREADY_EXISTS
);
}
getOrgName
(
organizations
);
licenceBackgroundDao
.
removeOrgAndTraining
(
organizations
.
getId
());
LicenseTrainingProgramsDO
programsDO
=
null
;
List
<
Integer
>
list
=
new
ArrayList
<>();
...
...
@@ -99,6 +104,15 @@ public class LicenceBackgroundServiceImpl implements LicenceBackgroundService {
return
ResultBody
.
success
();
}
private
void
getOrgName
(
LicenseOrganizationsVO
organizations
)
{
String
region
=
organizations
.
getRegion
();
List
<
String
>
strings
=
Arrays
.
asList
(
region
.
split
(
","
));
List
<
Integer
>
collect
=
strings
.
stream
().
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
());
List
<
String
>
orgName
=
licenceBackgroundDao
.
getOrgName
(
collect
);
String
join
=
StringUtils
.
join
(
orgName
,
","
);
organizations
.
setRegionName
(
join
);
}
@Override
public
ResultBody
removeOrganizations
(
Integer
id
)
{
licenceBackgroundDao
.
removeOrg
(
id
);
...
...
release-service/src/main/resources/mapper/licence/LicenceBackgroundDao.xml
浏览文件 @
bb9835c3
...
...
@@ -19,11 +19,11 @@
insert into license_organizations(main_image, auxiliary_picture, video, `name`, region, region_name,
detailed_address,
test_center, scale_id,
description, detail, create_time, update_time)
description, detail, create_time, update_time
, longitude, latitude
)
values (#{mainImage}, #{auxiliaryPicture}, #{video}, #{name}, #{region}, #{regionName}, #{detailedAddress},
#{testCenter},
#{scaleId},
#{description}, #{detail}, NOW(), NOW())
#{description}, #{detail}, NOW(), NOW()
, #{longitude}, #{latitude}
)
</insert>
<insert
id=
"insertLicenseOrgTraining"
>
...
...
@@ -94,6 +94,12 @@
<if
test=
" detail != null and detail != '' "
>
detail = #{detail},
</if>
<if
test=
" longitude != null and longitude != '' "
>
longitude = #{longitude},
</if>
<if
test=
" latitude != null and latitude != '' "
>
latitude = #{latitude},
</if>
update_time=NOW()
</set>
where id = #{id}
...
...
@@ -186,6 +192,14 @@
where id = #{id}
</delete>
<select
id=
"getOrgName"
resultType=
"java.lang.String"
>
select `name` from sys_district where id in
<foreach
collection=
"list"
open=
"("
close=
")"
item=
"id"
separator=
","
>
#{id}
</foreach>
</select>
<select
id=
"LicenseTrainingProgramsDTO"
resultType=
"com.mmc.csf.release.entity.licence.LicenseProgramsDO"
>
SELECT ltp.id,
ltp.grade_id AS gradeId,
...
...
@@ -240,7 +254,9 @@
lo.create_time AS createTime,
lo.update_time AS updateTime,
lo.detailed_address AS detailedAddress,
lo.region_name AS regionName
lo.region_name AS regionName,
lo.longitude,
lo.latitude
FROM license_organizations lo
LEFT JOIN licence_scale ls ON lo.scale_id = ls.id
where 1=1
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论