update code

This commit is contained in:
fumeiai 2020-05-22 16:27:24 +08:00
parent afd8a21543
commit 9318e9731e
6 changed files with 25 additions and 93 deletions

97
.idea/workspace.xml generated
View File

@ -3,7 +3,9 @@
<component name="ChangeListManager">
<list default="true" id="e4baaf01-a2c2-445d-98a1-9f4c50c148cf" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/mapper/generator/StaffDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mapper/generator/StaffDao.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/StaffServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/StaffServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/logback-spring.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/logback-spring.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/lz/modules/app/service/impl/StaffServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/lz/modules/app/service/impl/StaffServiceImpl.class" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
@ -156,7 +158,7 @@
<workItem from="1588161274115" duration="1691000" />
<workItem from="1588163384182" duration="74761000" />
<workItem from="1588936950753" duration="95758000" />
<workItem from="1590038091791" duration="33111000" />
<workItem from="1590038091791" duration="37467000" />
</task>
<servers />
</component>
@ -180,94 +182,9 @@
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/lz/common/utils/FeishuUtil.java</url>
<line>94</line>
<option name="timeStamp" value="1" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/test/java/com/lz/FumeiaiTest.java</url>
<line>191</line>
<option name="timeStamp" value="43" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/app/controller/DepartmentsController.java</url>
<line>53</line>
<option name="timeStamp" value="49" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/sys/controller/SysRoleController.java</url>
<line>61</line>
<option name="timeStamp" value="50" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/test/java/com/lz/FumeiaiTest.java</url>
<line>42</line>
<option name="timeStamp" value="66" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/app/controller/StaffController.java</url>
<line>106</line>
<option name="timeStamp" value="69" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/app/controller/StaffController.java</url>
<line>212</line>
<option name="timeStamp" value="74" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/app/controller/StaffController.java</url>
<line>249</line>
<option name="timeStamp" value="78" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/lz/common/utils/ExcelUtil.java</url>
<line>184</line>
<option name="timeStamp" value="80" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/lz/common/utils/ExcelUtil.java</url>
<line>205</line>
<option name="timeStamp" value="81" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/app/controller/StaffController.java</url>
<line>167</line>
<option name="timeStamp" value="82" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/job/business/FeishuBusiness.java</url>
<line>51</line>
<option name="timeStamp" value="83" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/job/task/SynchronizeFlybookDataJob.java</url>
<line>34</line>
<option name="timeStamp" value="84" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/app/controller/StaffController.java</url>
<line>225</line>
<option name="timeStamp" value="91" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/lz/common/utils/ExcelUtil.java</url>
<line>1057</line>
<option name="timeStamp" value="92" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/app/controller/StaffController.java</url>
<line>229</line>
<option name="timeStamp" value="93" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/app/controller/StaffController.java</url>
<line>231</line>
<option name="timeStamp" value="94" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/app/controller/StaffController.java</url>
<line>95</line>
<option name="timeStamp" value="97" />
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/StaffServiceImpl.java</url>
<line>233</line>
<option name="timeStamp" value="104" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>

View File

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Lists;
import com.lz.common.utils.DateUtils;
import com.lz.common.utils.PageUtils;
import com.lz.common.utils.Query;
import com.lz.modules.app.Dto.GraphicsStatisticalDto;
@ -211,31 +212,43 @@ public class StaffServiceImpl extends ServiceImpl<StaffDao, StaffEntity> impleme
staffEducationService.updateById(educationEntity);
}
}
for (Map<String, String> map : sheet3List) {
StaffEntity Staff = this.getByName(map.get("name"));
if (Staff != null) {
staffProjectExperienceService.update(new UpdateWrapper<StaffProjectExperienceEntity>().set("is_delete", 1).eq("staff_id", Staff.getId()));
}
}
for (Map<String, String> map : sheet3List) {
StaffProjectExperienceEntity staffProjectExperienceEntity = JSON.parseObject(JSON.toJSONString(map), StaffProjectExperienceEntity.class);
StaffEntity Staff = this.getByName(map.get("name"));
if (Staff == null) {
continue;
} else {
staffProjectExperienceService.update(new UpdateWrapper<StaffProjectExperienceEntity>().set("is_delete", 1).eq("staff_id", Staff.getId()));
StaffProjectExperienceEntity projectExperienceEntity = staffProjectExperienceService.getOne(new QueryWrapper<StaffProjectExperienceEntity>().eq("staff_id", Staff.getId()).eq("project_name", staffProjectExperienceEntity.getProjectName()));
if (projectExperienceEntity == null) {
staffProjectExperienceEntity.setStaffId(Staff.getId());
staffProjectExperienceService.save(staffProjectExperienceEntity);
} else {
logger.info(DateUtils.format(staffProjectExperienceEntity.getProjectBeginTime(), DateUtils.DATE_TIME_PATTERN));
logger.info(DateUtils.format(staffProjectExperienceEntity.getProjectEndTime(), DateUtils.DATE_TIME_PATTERN));
staffProjectExperienceEntity.setId(projectExperienceEntity.getId());
staffProjectExperienceEntity.setIsDelete(0);
staffProjectExperienceService.updateById(staffProjectExperienceEntity);
}
}
}
for (Map<String, String> map : sheet4List) {
StaffEntity Staff = this.getByName(map.get("name"));
if (Staff != null) {
staffWorkTransferRecordService.update(new UpdateWrapper<StaffWorkTransferRecordEntity>().set("is_delete", 1).eq("staff_id", Staff.getId()));
}
}
for (Map<String, String> map : sheet4List) {
StaffWorkTransferRecordEntity staffWorkTransferRecordEntity = JSON.parseObject(JSON.toJSONString(map), StaffWorkTransferRecordEntity.class);
StaffEntity Staff = this.getByName(map.get("name"));
if (Staff == null) {
continue;
} else {
staffWorkTransferRecordService.update(new UpdateWrapper<StaffWorkTransferRecordEntity>().set("is_delete", 1).eq("staff_id", Staff.getId()));
StaffWorkTransferRecordEntity workTransferRecordEntity = staffWorkTransferRecordService.getOne(new QueryWrapper<StaffWorkTransferRecordEntity>().eq("staff_id", Staff.getId()).eq("transfer_time", staffWorkTransferRecordEntity.getTransferTime()));
if (workTransferRecordEntity == null) {
staffWorkTransferRecordEntity.setStaffId(Staff.getId());

View File

@ -8,6 +8,7 @@
<springProfile name="dev,test">
<logger name="org.springframework.web" level="INFO"/>
<logger name="org.springboot.sample" level="INFO" />
<!-- <logger name="com.lz.modules.app.dao" level="DEBUG" />-->
<logger name="io.lz" level="DEBUG" />
</springProfile>

View File

@ -159,7 +159,7 @@
ifnull(round(count(DISTINCT(td.leader_employee_id))/count(DISTINCT(ls.id))*100,2),0) managementRate,
count(DISTINCT(ls.new_staff)) newStaffCount,
count(DISTINCT(ls.leave_staff)) leaveStaffCount,
ifnull(round(count(DISTINCT(ls.leave_staff))/(count(DISTINCT(ls.leave_staff))+count(DISTINCT(ls.id)))*100,2),0)
ifnull(round(count(DISTINCT(ls.leave_staff))/(count(DISTINCT(ls.leave_staff))+count(DISTINCT(ls.nowin_staff)))*100,2),0)
leaveRate
from
(select * from lz_staff ll

View File

@ -8,6 +8,7 @@
<springProfile name="dev,test">
<logger name="org.springframework.web" level="INFO"/>
<logger name="org.springboot.sample" level="INFO" />
<logger name="com.lz.modules.app.dao" level="DEBUG" />
<logger name="io.lz" level="DEBUG" />
</springProfile>