Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
a5438d12
Commit
a5438d12
authored
Nov 22, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_3.7.1.0' into develop_dl_3.7.1.0
parents
49193807
e4967cd1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
0 deletions
+62
-0
DateUtils.java
...ava/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
+21
-0
OrganizationService.java
...amos/boot/module/jcs/api/service/OrganizationService.java
+3
-0
OrganizationController.java
...oot/module/jcs/biz/controller/OrganizationController.java
+10
-0
OrganizationImpl.java
...os/boot/module/jcs/biz/service/impl/OrganizationImpl.java
+28
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
View file @
a5438d12
...
@@ -1044,4 +1044,25 @@ public class DateUtils {
...
@@ -1044,4 +1044,25 @@ public class DateUtils {
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
sdf
.
format
(
endTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
sdf
.
format
(
endTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
return
Duration
.
between
(
start
,
end
).
toDays
();
return
Duration
.
between
(
start
,
end
).
toDays
();
}
}
public
static
Map
<
String
,
Object
>
dayComparePrecise
(
Date
fromDate
,
Date
toDate
){
Map
<
String
,
Object
>
param
=
new
LinkedHashMap
<>();
Calendar
from
=
Calendar
.
getInstance
();
from
.
setTime
(
fromDate
);
Calendar
to
=
Calendar
.
getInstance
();
to
.
setTime
(
toDate
);
int
fromYear
=
from
.
get
(
Calendar
.
YEAR
);
int
fromDay
=
from
.
get
(
Calendar
.
DAY_OF_YEAR
);
int
toYear
=
to
.
get
(
Calendar
.
YEAR
);
int
toDay
=
to
.
get
(
Calendar
.
DAY_OF_YEAR
);
int
year
=
toYear
-
fromYear
;
int
day
=
toDay
-
fromDay
;
if
(
day
<
0
){
day
+=
365
;
year
-=
1
;
}
param
.
put
(
"year"
,
year
);
param
.
put
(
"day"
,
day
);
return
param
;
}
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/OrganizationService.java
View file @
a5438d12
...
@@ -38,4 +38,7 @@ public interface OrganizationService {
...
@@ -38,4 +38,7 @@ public interface OrganizationService {
Organization
getDetailsById
(
Long
id
);
Organization
getDetailsById
(
Long
id
);
int
deleteById
(
Long
id
);
int
deleteById
(
Long
id
);
Map
<
String
,
Object
>
getSystemOnlineDate
(
String
orgCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/OrganizationController.java
View file @
a5438d12
...
@@ -252,4 +252,14 @@ public class OrganizationController extends BaseController {
...
@@ -252,4 +252,14 @@ public class OrganizationController extends BaseController {
public
ResponseModel
deleteById
(
@RequestParam
()
Long
id
)
{
public
ResponseModel
deleteById
(
@RequestParam
()
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
organizationService
.
deleteById
(
id
));
return
ResponseHelper
.
buildResponse
(
organizationService
.
deleteById
(
id
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询上线的年日"
,
notes
=
"查询上线年日"
)
@GetMapping
(
value
=
"/online/date"
)
@PersonIdentify
public
ResponseModel
<
Map
<
String
,
Object
>>
getSystemOnlineDate
(){
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
companyId
=
reginParams
.
getPersonIdentity
().
getCompanyId
();
return
ResponseHelper
.
buildResponse
(
organizationService
.
getSystemOnlineDate
(
companyId
));
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/OrganizationImpl.java
View file @
a5438d12
...
@@ -3,7 +3,11 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
...
@@ -3,7 +3,11 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.sun.org.apache.bcel.internal.generic.NEW
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrFormDto
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrganizationExportDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrganizationExportDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrganizationUserExportDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrganizationUserExportDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Organization
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Organization
;
...
@@ -11,6 +15,8 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.OrganizationUser;
...
@@ -11,6 +15,8 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.OrganizationUser;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.OrganizationMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.OrganizationMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.OrganizationUserMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.OrganizationUserMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.OrganizationService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.OrganizationService
;
import
freemarker.template.utility.DateUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -20,11 +26,14 @@ import org.springframework.util.CollectionUtils;
...
@@ -20,11 +26,14 @@ import org.springframework.util.CollectionUtils;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
@Service
@Service
@Slf4j
public
class
OrganizationImpl
extends
BaseService
<
Organization
,
Organization
,
OrganizationMapper
>
implements
OrganizationService
{
public
class
OrganizationImpl
extends
BaseService
<
Organization
,
Organization
,
OrganizationMapper
>
implements
OrganizationService
{
@Autowired
@Autowired
...
@@ -34,6 +43,8 @@ public class OrganizationImpl extends BaseService<Organization, Organization, Or
...
@@ -34,6 +43,8 @@ public class OrganizationImpl extends BaseService<Organization, Organization, Or
private
OrganizationUserMapper
organizationUserMapper
;
private
OrganizationUserMapper
organizationUserMapper
;
private
static
String
NAME
=
"组员信息表第"
;
private
static
String
NAME
=
"组员信息表第"
;
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
@Override
@Override
public
Page
<
Map
<
String
,
Object
>>
getOrganizationInfo
(
Page
<
Map
<
String
,
Object
>>
page
,
String
bizOrgCode
)
{
public
Page
<
Map
<
String
,
Object
>>
getOrganizationInfo
(
Page
<
Map
<
String
,
Object
>>
page
,
String
bizOrgCode
)
{
...
@@ -270,4 +281,21 @@ public class OrganizationImpl extends BaseService<Organization, Organization, Or
...
@@ -270,4 +281,21 @@ public class OrganizationImpl extends BaseService<Organization, Organization, Or
}
}
return
this
.
baseMapper
.
deleteById
(
id
);
return
this
.
baseMapper
.
deleteById
(
id
);
}
}
@Override
public
Map
<
String
,
Object
>
getSystemOnlineDate
(
String
id
)
{
try
{
OrgUsrFormDto
orgUsrFormDto
=
iOrgUsrService
.
selectCompanyById
(
Long
.
parseLong
(
id
));
if
(
ObjectUtils
.
isNotEmpty
(
orgUsrFormDto
))
{
String
operationDate
=
String
.
valueOf
(
orgUsrFormDto
.
getMap
().
get
(
"operationDate"
));
Date
beginDate
=
DateUtils
.
convertStrToDate
(
operationDate
,
DateUtils
.
DATE_PATTERN
);
Date
now
=
DateUtils
.
getDateNow
();
return
DateUtils
.
dayComparePrecise
(
beginDate
,
now
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
"获取系统上线时间失败:{}"
,
e
.
getMessage
());
}
return
new
HashMap
<>(
1
);
}
}
}
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