20200429-zlp-1
园历展示新增员工生日和入职日期
This commit is contained in:
parent
39371fe365
commit
619477a4fe
@ -48,7 +48,7 @@
|
||||
</el-form>
|
||||
<!-- 底部 -->
|
||||
<div class="el-login-footer">
|
||||
<span>Copyright © 2018-2019 ruoyi.vip All Rights Reserved.</span>
|
||||
<span>Copyright © 2018-2019 benyiedu.com All Rights Reserved.</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -65,8 +65,8 @@ export default {
|
||||
codeUrl: "",
|
||||
cookiePassword: "",
|
||||
loginForm: {
|
||||
username: "admin",
|
||||
password: "admin123",
|
||||
username: "",
|
||||
password: "",
|
||||
rememberMe: false,
|
||||
code: "",
|
||||
uuid: ""
|
||||
@ -148,7 +148,7 @@ export default {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
background-image: url("../assets/image/login-background.jpg");
|
||||
background: linear-gradient(-45deg,#46a6ff,#edf7fb);
|
||||
background-size: cover;
|
||||
}
|
||||
.title {
|
||||
|
@ -8,6 +8,8 @@ import java.util.List;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.project.benyi.domain.ByThings;
|
||||
import com.ruoyi.project.common.SchoolCommon;
|
||||
import com.ruoyi.project.system.domain.ByTeacherJbxx;
|
||||
import com.ruoyi.project.system.service.IByTeacherJbxxService;
|
||||
import com.ruoyi.project.system.service.ISysDictDataService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -43,6 +45,8 @@ public class BySchoolcalendarController extends BaseController {
|
||||
private SchoolCommon schoolCommon;
|
||||
@Autowired
|
||||
private ISysDictDataService dictDataService;
|
||||
@Autowired
|
||||
private IByTeacherJbxxService byTeacherJbxxService;
|
||||
|
||||
/**
|
||||
* 查询园历管理列表
|
||||
@ -63,15 +67,20 @@ public class BySchoolcalendarController extends BaseController {
|
||||
public AjaxResult getSchoolCalendars(BySchoolcalendar bySchoolcalendar) {
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
bySchoolcalendar.setXnxq(schoolCommon.getCurrentXn());
|
||||
//系统内设置的园历信息
|
||||
List<BySchoolcalendar> list = bySchoolcalendarService.selectBySchoolcalendarList(bySchoolcalendar);
|
||||
ByThings byThings=null;
|
||||
List<ByThings> listThings=new ArrayList<>();
|
||||
if(list!=null&&list.size()>0){
|
||||
for (int i=0;i<list.size();i++){
|
||||
byThings=new ByThings();
|
||||
//系统内员工生日信息 系统内员工入职日期
|
||||
ByTeacherJbxx byTeacherJbxx = new ByTeacherJbxx();
|
||||
List<ByTeacherJbxx> listTeacherBirth = byTeacherJbxxService.selectByTeacherJbxxList(byTeacherJbxx);
|
||||
ByThings byThings = null;
|
||||
List<ByThings> listThings = new ArrayList<>();
|
||||
//系统内设置的园历信息
|
||||
if (list != null && list.size() > 0) {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
byThings = new ByThings();
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String strActivitytime= formatter.format(list.get(i).getActivitytime());
|
||||
System.out.println("活动时间==="+strActivitytime);
|
||||
String strActivitytime = formatter.format(list.get(i).getActivitytime());
|
||||
System.out.println("活动时间===" + strActivitytime);
|
||||
byThings.setYears(strActivitytime.split("-")[0]);
|
||||
byThings.setMonths(strActivitytime.split("-")[1]);
|
||||
byThings.setDays(strActivitytime.split("-")[2]);
|
||||
@ -81,7 +90,43 @@ public class BySchoolcalendarController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
ajax.put("calendarData",listThings);
|
||||
//系统内员工的生日、入职日期信息
|
||||
if (listTeacherBirth != null && listTeacherBirth.size() > 0) {
|
||||
for (int i = 0; i < listTeacherBirth.size(); i++) {
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
//创建一个教师实体类,并赋值
|
||||
byTeacherJbxx=listTeacherBirth.get(i);
|
||||
String strCurrentYear=schoolCommon.getCurrentYear();
|
||||
System.out.println("当前年===" + strCurrentYear);
|
||||
|
||||
//参加工作日期
|
||||
if(byTeacherJbxx.getCjgzrq()!=null){
|
||||
byThings = new ByThings();
|
||||
byThings.setYears(strCurrentYear);
|
||||
System.out.println("参加工作日期==="+sdf.format(byTeacherJbxx.getCjgzrq()));
|
||||
byThings.setMonths(sdf.format(byTeacherJbxx.getCjgzrq()).split("-")[1]);//2020-04-12 月
|
||||
byThings.setDays(sdf.format(byTeacherJbxx.getCjgzrq()).split("-")[2]);//2020-04-12 日
|
||||
byThings.setThings(listTeacherBirth.get(i).getUser().getNickName()+"-合同满年期限");
|
||||
|
||||
listThings.add(byThings);
|
||||
}
|
||||
//生日
|
||||
if(byTeacherJbxx.getCsrq()!=null){
|
||||
byThings = new ByThings();
|
||||
byThings.setYears(strCurrentYear);
|
||||
byThings.setMonths(sdf.format(byTeacherJbxx.getCsrq()).split("-")[1]);//2020-04-12 月
|
||||
byThings.setDays(sdf.format(byTeacherJbxx.getCsrq()).split("-")[2]);//2020-04-12 日
|
||||
byThings.setThings(listTeacherBirth.get(i).getUser().getNickName()+"-生日");
|
||||
|
||||
listThings.add(byThings);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
ajax.put("calendarData", listThings);
|
||||
return ajax;
|
||||
}
|
||||
|
||||
@ -108,7 +153,7 @@ public class BySchoolcalendarController extends BaseController {
|
||||
ajax.put(AjaxResult.DATA_TAG, bySchoolcalendar);
|
||||
String dictType = "sys_yebjlx";
|
||||
ajax.put("scopes", dictDataService.selectDictDataByType(dictType));
|
||||
String strScope=bySchoolcalendar.getScope();
|
||||
String strScope = bySchoolcalendar.getScope();
|
||||
ajax.put("scopeIds", strScope.split(";"));
|
||||
return ajax;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.models.auth.In;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@ -116,6 +117,13 @@ public class SchoolCommon {
|
||||
return getCurrentXnXq().substring(0,9);
|
||||
}
|
||||
|
||||
public String getCurrentYear() {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
|
||||
Date date = new Date();
|
||||
return sdf.format(date);
|
||||
|
||||
}
|
||||
|
||||
public boolean isStringEmpty(String str) {
|
||||
if (str == null || "".equals(str)) {
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user