Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
a46efbdd
Commit
a46efbdd
authored
Apr 15, 2023
by
daijunxiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除启动类多余代码
parent
044f62c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
163 deletions
+0
-163
attendance-performance-manager/src/main/java/com/mortals/xhx/ManagerApplication.java
...ger/src/main/java/com/mortals/xhx/ManagerApplication.java
+0
-163
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/ManagerApplication.java
View file @
a46efbdd
package
com.mortals.xhx
;
import
com.mortals.framework.springcloud.boot.BaseWebApplication
;
import
com.mortals.xhx.module.dept.dao.ibatis.DeptDaoImpl
;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.staff.dao.ibatis.StaffDaoImpl
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.annotation.ImportResource
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.PostConstruct
;
@EnableFeignClients
@SpringBootApplication
(
scanBasePackages
=
{
"com.mortals"
})
@ServletComponentScan
(
"com.mortals"
)
@ImportResource
(
locations
=
{
"classpath:config/spring-config.xml"
})
@Component
public
class
ManagerApplication
extends
BaseWebApplication
{
// @Bean
...
...
@@ -28,165 +19,11 @@ public class ManagerApplication extends BaseWebApplication {
// }
@Autowired
private
DeptDaoImpl
deptDao1
;
private
static
DeptDaoImpl
deptDao
;
@Autowired
private
StaffDaoImpl
staffDao1
;
private
static
StaffDaoImpl
staffDao
;
@Autowired
private
StaffService
service1
;
private
static
StaffService
service
;
@Autowired
private
DeptService
deptService1
;
private
static
DeptService
deptService
;
@PostConstruct
public
void
init
()
{
deptDao
=
deptDao1
;
staffDao
=
staffDao1
;
service
=
service1
;
deptService
=
deptService1
;
}
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
ManagerApplication
.
class
,
args
);
System
.
out
.
println
(
"考勤管理项目启动!!!!!!!!!!!!!"
);
//人员-部门跟新 统计
// try {
// //部门同步
// String resultDept = ArtemisPostTest.callPostApiGetDeptList();
// JSONObject jsonObjectDept = JSON.parseObject(resultDept);
// JSONObject jsonObjectDept1 = jsonObjectDept.getJSONObject("data");
// DeptHikData deptHikData = JSONObject.parseObject(jsonObjectDept1.toJSONString(), DeptHikData.class);
// if (Objects.nonNull(deptHikData)) {
// for (ListDept listDept : deptHikData.getList()) {
// //查询数据库信息
// DeptEntity deptEntity = deptDao.queryDept(listDept.getOrgIndexCode());
// DeptEntity deptEntityParent = deptDao.queryDeptParient(listDept.getParentOrgIndexCode());
// //新增
// if (Objects.isNull(deptEntity)) {
// deptEntity.initAttrValue();
// if (Objects.nonNull(deptEntityParent)) {
// deptEntity.setParentId(deptEntityParent.getId());
// }
// deptEntity.setDeptName(listDept.getOrgName());
// deptEntity.setDeptCode(listDept.getOrgIndexCode());
// deptEntity.setAncestors(listDept.getOrgPath());
// deptEntity.setDeptStatus(1);
// deptEntity.setOrderNum(0);
// deptEntity.setRemark(listDept.getParentOrgIndexCode());
// deptEntity.setCreateTime(new Date());
// deptEntity.setCreateUserId(Long.valueOf(1));
// deptEntity.setUpdateTime(new Date());
// deptEntity.setUpdateUserId(Long.valueOf(1));
// deptService.save(deptEntity);
// } else {
// //更新
// deptEntity.initAttrValue();
// if (Objects.nonNull(deptEntityParent)) {
// deptEntity.setParentId(deptEntityParent.getId());
// }
// deptEntity.setDeptName(listDept.getOrgName());
// deptEntity.setDeptCode(listDept.getOrgIndexCode());
// deptEntity.setAncestors(listDept.getOrgPath());
// deptEntity.setCreateTime(new Date());
// deptEntity.setPersonNum(0);
// deptEntity.setCreateUserId(Long.valueOf(1));
// deptService.update(deptEntity);
// }
// }
// }
// //同步员工
// String resultPerson = ArtemisPostTest.callPostApiGetPersonList();
// JSONObject jsonObject = JSON.parseObject(resultPerson);
// JSONObject jsonObject1 = jsonObject.getJSONObject("data");
// PersonHikData personHikData = JSONObject.parseObject(jsonObject1.toJSONString(), PersonHikData.class);
// if (Objects.nonNull(personHikData)) {
// for (ListItem list : personHikData.getList()) {
// //根据id获取本地数据
// StaffEntity staffEntity1 = staffDao.queryHik(list.getPersonId());
// DeptEntity deptEntity = deptDao.queryDept(list.getOrgIndexCode());
// //判断本地数据是否为空
// if (Objects.isNull(staffEntity1)) {
// //新增员工信息
// staffEntity1.initAttrValue();
// if (Objects.nonNull(staffEntity1)) {
// staffEntity1.setDeptId(deptEntity.getId());
// }
// staffEntity1.setName(list.getPersonName());
// staffEntity1.setRemarkId(list.getPersonId());
// staffEntity1.setPicUri(list.getPersonPhoto().getPicUri());
// staffEntity1.setServerIndexCode(list.getPersonPhoto().getServerIndexCode());
// staffEntity1.setDeptName(list.getOrgName());
// staffEntity1.setSource(1);
// staffEntity1.setStatus(1);
// staffEntity1.setGender(list.getGender());
// staffEntity1.setWorkNum(list.getJobNo());
// staffEntity1.setCreateUserId(Long.valueOf(1));
// staffEntity1.setCreateTime(new Date());
// if (list.getBirthday() != null) {
// staffEntity1.setBirthday((Date) list.getBirthday());
// }
// if (list.getPhoneNo() != null) {
// staffEntity1.setPhoneNumber(String.valueOf(list.getPhoneNo()));
// }
// service.save(staffEntity1);
// //统计各级部门员工数量
// DeptEntity deptEntity1 = deptService.get(staffEntity1.getDeptId());
// String ancestor = deptEntity1.getAncestors().split(",", 2)[1];
// String[] ancestors = ancestor.split(",");
// for (String newAncestor : ancestors) {
// DeptEntity deptEntity2 = deptService.get(Long.valueOf(newAncestor));
// if (Objects.nonNull(deptEntity2)) {
// deptEntity2.setPersonNum(deptEntity2.getPersonNum() + 1);
// deptService.update(deptEntity2);
// }
// }
//
// }
// //本地数据不为空
// else {
// //更新员工信息
// staffEntity1.initAttrValue();
// if (Objects.nonNull(deptEntity)) {
// staffEntity1.setDeptId(deptEntity.getId());
// }
// staffEntity1.setName(list.getPersonName());
// staffEntity1.setRemarkId(list.getPersonId());
// staffEntity1.setPicUri(list.getPersonPhoto().getPicUri());
// staffEntity1.setServerIndexCode(list.getPersonPhoto().getServerIndexCode());
// staffEntity1.setDeptName(list.getOrgName());
// staffEntity1.setGender(list.getGender());
// staffEntity1.setWorkNum(list.getJobNo());
// staffEntity1.setCreateUserId(Long.valueOf(1));
// staffEntity1.setCreateTime(new Date());
// if (list.getBirthday() != null) {
// staffEntity1.setBirthday((Date) list.getBirthday());
// }
// if (list.getPhoneNo() != null) {
// staffEntity1.setPhoneNumber(String.valueOf(list.getPhoneNo()));
// }
// service.update(staffEntity1);
// //统计各级部门员工数量
// DeptEntity deptEntity1 = deptService.get(staffEntity1.getDeptId());
// String ancestor = deptEntity1.getAncestors().split(",", 2)[1];
// String[] ancestors = ancestor.split(",");
// for (String newAncestor : ancestors) {
// DeptEntity deptEntity2 = deptService.get(Long.valueOf(newAncestor));
// if (Objects.nonNull(deptEntity2)) {
// deptEntity2.setPersonNum(deptEntity2.getPersonNum() + 1);
// deptService.update(deptEntity2);
// }
// }
// }
// }
// }
// } catch (Exception e) {
// e.printStackTrace();
// }
}
}
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