|
@@ -4,8 +4,10 @@ import java.io.FileOutputStream;
|
|
|
import java.io.IOException;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
+import cn.dev33.satoken.stp.StpUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.pj.tb_goods_transit.TbGoodsTransit;
|
|
|
import com.pj.utils.so.SoMap;
|
|
@@ -54,6 +56,7 @@ public class TbPeopleService extends ServiceImpl<TbPeopleMapper, TbPeople> imple
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/** 查 */
|
|
|
TbPeople getById(String id){
|
|
|
return super.getById(id);
|
|
@@ -65,6 +68,91 @@ public class TbPeopleService extends ServiceImpl<TbPeopleMapper, TbPeople> imple
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 审核
|
|
|
+ */
|
|
|
+ boolean judge(TbPeople tbPeople){
|
|
|
+ //获取当前登陆人
|
|
|
+ String loginUser = "admin";
|
|
|
+ //获取当前被审核人的编号和审核情况
|
|
|
+ Long id = tbPeople.getId();
|
|
|
+ Integer judgeStatus = tbPeople.getJudgeStatus();
|
|
|
+ //获取被审核人
|
|
|
+ TbPeople tbPeople1 = tbPeopleMapper.selectById(id);
|
|
|
+ if(tbPeople1 == null)throw new RuntimeException("审核用户不存在,请检查!");
|
|
|
+ //判断删除状态
|
|
|
+ Integer deleteStatus = tbPeople1.getDeleteStatus();
|
|
|
+ if(deleteStatus == 0)throw new RuntimeException("该用户已被删除,无法进行审核");
|
|
|
+ //设置审核状态
|
|
|
+ tbPeople1.setJudgeStatus(judgeStatus);
|
|
|
+ if(id == 0) tbPeople1.setJudgeContent(tbPeople.getJudgeContent());
|
|
|
+ //设置审核人
|
|
|
+ tbPeople1.setPersonId(loginUser);
|
|
|
+ //审核时间
|
|
|
+ tbPeople1.setJudgeTime(new Date());
|
|
|
+ //保存
|
|
|
+ int i = tbPeopleMapper.updateById(tbPeople1);
|
|
|
+ return i == 1;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 启/停
|
|
|
+ */
|
|
|
+ boolean isLock(TbPeople tbPeople){
|
|
|
+ //获取被修改用户id
|
|
|
+ Long id = tbPeople.getId();
|
|
|
+ //查询
|
|
|
+ TbPeople tbPeople1 = tbPeopleMapper.selectById(id);
|
|
|
+ if(tbPeople1 == null)throw new RuntimeException("审核用户不存在,请检查!");
|
|
|
+ //判断删除状态
|
|
|
+ Integer deleteStatus = tbPeople1.getDeleteStatus();
|
|
|
+ if(deleteStatus == 0)throw new RuntimeException("该用户已被删除,无法进行启/停操作!");
|
|
|
+ //获取启停状态
|
|
|
+ Integer isLock = tbPeople.getIsLock();
|
|
|
+ //设置启/停
|
|
|
+ tbPeople1.setIsLock(isLock);
|
|
|
+ //保存结果
|
|
|
+ int i = tbPeopleMapper.updateById(tbPeople1);
|
|
|
+ return i == 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * TODO: 对接单一窗口商务端实现身份识别(预留认证接口)
|
|
|
+ */
|
|
|
+ void identification(){
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
* 导入
|
|
|
* @param file excel文件
|
|
|
* @return
|