Commit 44c4ef8c by 邓实川
parents 02f725e3 acf60984
...@@ -94,7 +94,6 @@ public class LogAspect ...@@ -94,7 +94,6 @@ public class LogAspect
// 获取当前的用户 // 获取当前的用户
// LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest()); // LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
QyzxEmpLogin eld = (QyzxEmpLogin)session.getAttribute("ui"); QyzxEmpLogin eld = (QyzxEmpLogin)session.getAttribute("ui");
System.out.println(eld);
// *========数据库日志=========*// // *========数据库日志=========*//
QyzxOperLog operLog = new QyzxOperLog(); QyzxOperLog operLog = new QyzxOperLog();
...@@ -110,7 +109,7 @@ public class LogAspect ...@@ -110,7 +109,7 @@ public class LogAspect
operLog.setOperUrl(ServletUtils.getRequest().getRequestURI()); operLog.setOperUrl(ServletUtils.getRequest().getRequestURI());
if (eld != null) if (eld != null)
{ {
operLog.setOperName(eld.getUsername()); operLog.setOperName(eld.getYgglMainEmp().getName());
} }
if (e != null) if (e != null)
......
...@@ -302,7 +302,10 @@ public class JxglController { ...@@ -302,7 +302,10 @@ public class JxglController {
IPage<JxglAppraisalT> p = new Page<JxglAppraisalT>(page.getCurrentPage(), page.getTotalPage()); IPage<JxglAppraisalT> p = new Page<JxglAppraisalT>(page.getCurrentPage(), page.getTotalPage());
IPage<JxglAppraisalT> pageAT = jxglAppraisalTMapper.selectPage(p, IPage<JxglAppraisalT> pageAT = jxglAppraisalTMapper.selectPage(p,
new QueryWrapper<JxglAppraisalT>().lambda().eq(JxglAppraisalT::getOrgCode, userBean.getOrgCode())); new QueryWrapper<JxglAppraisalT>().lambda()
.eq(JxglAppraisalT::getOrgCode, userBean.getOrgCode())
.orderByDesc(JxglAppraisalT::getId)
);
List<JxglAppraisalT> listAT = pageAT.getRecords(); List<JxglAppraisalT> listAT = pageAT.getRecords();
...@@ -1102,6 +1105,12 @@ public class JxglController { ...@@ -1102,6 +1105,12 @@ public class JxglController {
IPage<JxglPerformanceAppraisal> page = new Page<JxglPerformanceAppraisal>(query.getCurrentPage(),query.getTotalPage()); IPage<JxglPerformanceAppraisal> page = new Page<JxglPerformanceAppraisal>(query.getCurrentPage(),query.getTotalPage());
query.setOrgCode(userBean.getOrgCode()); query.setOrgCode(userBean.getOrgCode());
query.setId(userBean.getEmpNum()); query.setId(userBean.getEmpNum());
// 当查询的数据不为 2评分,清空 节点状态
if (query.getSts() != 2) {
query.setNoteSts(null);
}
IPage<JxglPerformanceAppraisal> pagePA = jxglPerformanceAppraisalMapper.selectMyByQuery(page, query); IPage<JxglPerformanceAppraisal> pagePA = jxglPerformanceAppraisalMapper.selectMyByQuery(page, query);
List<JxglPerformanceAppraisal> listPA = pagePA.getRecords(); List<JxglPerformanceAppraisal> listPA = pagePA.getRecords();
......
...@@ -268,6 +268,7 @@ public class ClockInController { ...@@ -268,6 +268,7 @@ public class ClockInController {
Map<String, Integer> comparemap = new HashMap(); Map<String, Integer> comparemap = new HashMap();
if(dkmc == null) { if(dkmc == null) {
kskd = false;
//打卡时间 对比班次 接近哪个时间就打哪个时间的卡 //打卡时间 对比班次 接近哪个时间就打哪个时间的卡
if(attdate.getAttsch().size() == 2 || attdate.getAttsch().size() == 4 || attdate.getAttsch().size() == 6) { if(attdate.getAttsch().size() == 2 || attdate.getAttsch().size() == 4 || attdate.getAttsch().size() == 6) {
comparemap.put("1", dakjg1); comparemap.put("2", dakjg2); comparemap.put("1", dakjg1); comparemap.put("2", dakjg2);
...@@ -290,6 +291,7 @@ public class ClockInController { ...@@ -290,6 +291,7 @@ public class ClockInController {
} }
//最后一次卡的时候 再继续打视为更新最后一次打卡 //最后一次卡的时候 再继续打视为更新最后一次打卡
if(dkmc.getXbdk1() != null) { if(dkmc.getXbdk1() != null) {
kskd = true;
comparemap.put("2", dakjg2); comparemap.put("2", dakjg2);
} }
} }
......
...@@ -105,7 +105,7 @@ public class AttendanceTaskTiming{ ...@@ -105,7 +105,7 @@ public class AttendanceTaskTiming{
*/ */
//3.添加定时任务 每天下午七点执行一次 //3.添加定时任务 每天下午七点执行一次
@Scheduled(cron = "0 37 10 * * ?") @Scheduled(cron = "0 0 19 * * ?")
//或直接指定时间间隔,例如:5秒 //或直接指定时间间隔,例如:5秒
//@Scheduled(fixedRate=5000) //@Scheduled(fixedRate=5000)
......
...@@ -2,6 +2,7 @@ package cn.timer.api.controller.zzgl; ...@@ -2,6 +2,7 @@ package cn.timer.api.controller.zzgl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import javax.transaction.Transactional; import javax.transaction.Transactional;
...@@ -24,6 +25,7 @@ import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapp ...@@ -24,6 +25,7 @@ import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapp
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import cn.hutool.core.lang.tree.Tree; import cn.hutool.core.lang.tree.Tree;
import cn.hutool.core.lang.tree.TreeNodeConfig; import cn.hutool.core.lang.tree.TreeNodeConfig;
...@@ -91,7 +93,7 @@ public class ZzglController { ...@@ -91,7 +93,7 @@ public class ZzglController {
} }
/** /**
* 架构树/架构图/导出 * 获取部门岗位-升级版
* *
* @param * @param
* @return * @return
...@@ -99,7 +101,7 @@ public class ZzglController { ...@@ -99,7 +101,7 @@ public class ZzglController {
@GetMapping(value = "/deptlist_plus") @GetMapping(value = "/deptlist_plus")
@ApiOperation(value = "1.获取部门岗位-升级版", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "1.获取部门岗位-升级版", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
public Result<List<Tree<String>>> selectlistdept2(@CurrentUser UserBean userBean) { public Result<List<Tree<String>>> deptlistPlus(@CurrentUser UserBean userBean) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper) List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.eq(ZzglBmgwM::getOrgCode, orgCode).list(); .eq(ZzglBmgwM::getOrgCode, orgCode).list();
...@@ -134,6 +136,49 @@ public class ZzglController { ...@@ -134,6 +136,49 @@ public class ZzglController {
return ResultUtil.data(treeNodes); return ResultUtil.data(treeNodes);
} }
/**
* 获取部门
*
* @param
* @return
*/
@GetMapping(value = "/depts_tree")
@ApiOperation(value = "2.获取部门", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 1)
public Result<List<Tree<String>>> deptsOnlyone(@CurrentUser UserBean userBean) {
Integer orgCode = userBean.getOrgCode();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.eq(ZzglBmgwM::getOrgCode, orgCode).list();
if (CollectionUtil.isNotEmpty(zzglBmgwMs)) {
zzglBmgwMs = zzglBmgwMs.stream().filter(z -> z.getType() == 0).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(zzglBmgwMs)) {
//配置
TreeNodeConfig treeNodeConfig = new TreeNodeConfig();
// 自定义属性名 都要默认值的
treeNodeConfig.setIdKey("id");
treeNodeConfig.setParentIdKey("upId");
//转换器
List<Tree<String>> treeNodes = TreeUtil.build(zzglBmgwMs, "0", treeNodeConfig,
(treeNode, tree) -> {
tree.setId(Convert.toStr(treeNode.getId()));
tree.setParentId(Convert.toStr(treeNode.getUpId()));
tree.setName(treeNode.getName());
// 扩展属性 ...
tree.putExtra("leader", treeNode.getLeader());
tree.putExtra("type", treeNode.getType());
});
return ResultUtil.data(treeNodes);
}
}
return ResultUtil.success();
}
@GetMapping(value = "/depts") @GetMapping(value = "/depts")
@ApiOperation(value = "2.获取部门", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "2.获取部门", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
......
...@@ -21,5 +21,8 @@ public class MyPerformance extends Page { ...@@ -21,5 +21,8 @@ public class MyPerformance extends Page {
@ApiModelProperty(value = "状态 0目标填写 1目标确认 2评分 3 结果确认", example = "") @ApiModelProperty(value = "状态 0目标填写 1目标确认 2评分 3 结果确认", example = "")
private Integer sts; private Integer sts;
@ApiModelProperty(value = "状态 1执行中 2已执行 ", example = "")
private Integer noteSts;
} }
package cn.timer.api.utils; package cn.timer.api.utils;
import java.util.HashMap;
import java.util.Map;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.http.Header;
import cn.hutool.http.HttpRequest;
/** /**
* 获取地址类 * 获取地址类
...@@ -13,19 +18,31 @@ import cn.hutool.core.util.StrUtil; ...@@ -13,19 +18,31 @@ import cn.hutool.core.util.StrUtil;
*/ */
public class AddressUtils public class AddressUtils
{ {
private static final Logger log = LoggerFactory.getLogger(AddressUtils.class); private static final Logger log = LoggerFactory.getLogger(AddressUtils.class);
public static final String IP_URL = "http://ip.taobao.com/service/getIpInfo.php"; public static final String IP_URL = "http://ip.taobao.com/outGetIpInfo";
public static Map<String, Object> PARAM_MAP = new HashMap<String, Object>();
static {
PARAM_MAP.put("accessKey", "alibaba-inc");
}
public static String getRealAddressByIP(String ip) public static String getRealAddressByIP(String ip)
{ {
PARAM_MAP.put("ip", ip);
String address = "XX XX"; String address = "XX XX";
// 内网不查询 // 内网不查询
if (UserIp.internalIp(ip)) if (UserIp.internalIp(ip))
{ {
return "内网IP"; return "内网IP";
} }
String rspStr = HttpUtils.sendPost(IP_URL, "ip=" + ip); //链式构建请求
String rspStr = HttpRequest.post(IP_URL)
.header(Header.USER_AGENT, "Hutool http")//头信息,多个头信息多次调用此方法即可
.form(PARAM_MAP)//表单内容
.timeout(20000)//超时,毫秒
.execute().body();
if (StrUtil.isEmpty(rspStr)) if (StrUtil.isEmpty(rspStr))
{ {
log.error("获取地理位置异常 {}", ip); log.error("获取地理位置异常 {}", ip);
......
...@@ -351,6 +351,7 @@ public class UserIp { ...@@ -351,6 +351,7 @@ public class UserIp {
return macAddress; return macAddress;
} }
} }
...@@ -126,7 +126,7 @@ public class RouterUtils { ...@@ -126,7 +126,7 @@ public class RouterUtils {
case UNEXECUTED: case UNEXECUTED:
listUser.get(i).setExecute(EXECUTING); listUser.get(i).setExecute(EXECUTING);
// 首次发起申请时,写入 审批人名称 至 obj 中 // 首次发起申请时,写入 审批人名称 至 obj 中
if (isFirse && obj.getStr("current_approver") != null ) { if (isFirse && obj.getStr("current_approver") == null ) {
obj.set("current_approver", listUser.get(i).getName()); obj.set("current_approver", listUser.get(i).getName());
} }
......
...@@ -347,7 +347,6 @@ ...@@ -347,7 +347,6 @@
</where> </where>
GROUP BY a.emp_num GROUP BY a.emp_num
ORDER BY a.id DESC ORDER BY a.id DESC
</select> </select>
<select id="selectDetailById" resultMap="BaseResultMap_Detail"> <select id="selectDetailById" resultMap="BaseResultMap_Detail">
......
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
LEFT JOIN jxgl_process_node d ON b.id = d.appraisal_id AND b.sts = d.process_type LEFT JOIN jxgl_process_node d ON b.id = d.appraisal_id AND b.sts = d.process_type
LEFT JOIN yggl_main_emp e ON b.emp_num = e.emp_num AND a.org_code = e.org_code LEFT JOIN yggl_main_emp e ON b.emp_num = e.emp_num AND a.org_code = e.org_code
WHERE a.org_code = #{param.orgCode} AND b.emp_num = #{param.id} WHERE a.org_code = #{param.orgCode} AND b.emp_num = #{param.id}
ORDER BY a.id DESC
</select> </select>
<select id="selectMyByQuery" resultMap="BaseResultMap_ALl" > <select id="selectMyByQuery" resultMap="BaseResultMap_ALl" >
...@@ -239,7 +239,11 @@ ...@@ -239,7 +239,11 @@
<if test="param.sts != null and param.sts == 3"> <if test="param.sts != null and param.sts == 3">
AND b.sts = 4 AND b.sts = 4
</if> </if>
<if test="param.noteSts != null">
AND d.sts = #{param.noteSts}
</if>
</where> </where>
ORDER BY a.id DESC
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment