Commit 5c9d3577 by tangzhaoqian Committed by chenzg

员工、审批bug

parent 9b5aaad8
......@@ -18,7 +18,7 @@ import org.springframework.web.filter.CorsFilter;
import cn.hutool.core.net.NetUtil;
@MapperScan("cn.timer.api.dao") // 扫描的mapper
@MapperScan({"cn.timer.api.dao"}) // 扫描的mapper
@ComponentScan(basePackages = {"cn.timer.api"})
@SpringBootApplication
@EnableScheduling
......
......@@ -671,7 +671,7 @@ public class SpmkController {
jSONObject.set("approveId", FromData.builder().value(String.valueOf(asId)));
//审批完成后 业务
SpmkAssoBusiness sab = SpmkAssoBusinessFactory.createSpmkAssoType(ApproveEnum.getEnums(aSummary.getAssoType()));
SpmkAssoBusiness sab = SpmkAssoBusinessFactory.getFactory().createSpmkAssoType(ApproveEnum.getEnums(aSummary.getAssoType()));
if (sab != null)
sab.handleApprove(jSONObject);
}
......
......@@ -98,7 +98,7 @@ public class YgglServiceImpl implements YgglService {
return leaderId;
}
private ZzglBmgwM getLeaderEmp(List<ZzglBmgwM> listBM, Integer baseBmgwId) {
public ZzglBmgwM getLeaderEmp(List<ZzglBmgwM> listBM, Integer baseBmgwId) {
ZzglBmgwM zzglBmgwM = baseBmgwId != null ?
CollUtil.getFirst(listBM.stream()
.filter(bM -> bM.getId().equals(baseBmgwId)).collect(Collectors.toList()))
......
......@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.convert.ConvertException;
import cn.hutool.core.lang.Console;
......@@ -420,10 +421,14 @@ public class RouterUtils {
for (int i = 0,n = listFlowChildren.size(); i < n; i++) {
// 新增 执行人
List<User> listUser = listFlowChildren.get(i).getRelation().get(0).getUsers();
if (EXECUTED.equals(listFlowChildren.get(i).getExecute())) {
List<User> listUser = CollUtil.toList();
List<Relation> listR = listFlowChildren.get(i).getRelation();
if (CollectionUtil.isNotEmpty(listR)) {
listUser = listR.get(0).getUsers();
}
}else if (EXECUTING.equals(listFlowChildren.get(i).getExecute())) {
if (EXECUTING.equals(listFlowChildren.get(i).getExecute())) {
for (int i_user = 0, n_user = listUser.size(); i_user < n_user; i_user++) {
if (EXECUTED.equals(listUser.get(i_user).getExecute())) {
......
package cn.timer.api.utils.router.business;
import java.text.ParseException;
import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.controller.yggl.service.YgglService;
import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.dto.yggl.YgzzDto;
......@@ -60,7 +63,13 @@ public class RegularizationBusiness extends SpmkAssoBusiness {
.build();
// 调 员工管理 业务
ygglService.applicationRegularization(ygzzDto);
YgglMainEmp.builder()
.jobStatus(2)
.zzTime(ygzzDto.getZzTime())
.sjzzTime(new Date())
.zzRemark(ygzzDto.getZzRemark())
.build().update(new UpdateWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, ygzzDto.getEmpNum()));
// ygglService.applicationRegularization(ygzzDto);
}
}
......@@ -9,7 +9,15 @@ import cn.timer.api.utils.router.enums.ApproveEnum;
*/
public class SpmkAssoBusinessFactory {
public static SpmkAssoBusiness createSpmkAssoType(ApproveEnum assotype) {
static SpmkAssoBusinessFactory factory;
public static SpmkAssoBusinessFactory getFactory() {
return factory == null ? new SpmkAssoBusinessFactory() : factory;
}
public SpmkAssoBusiness createSpmkAssoType(ApproveEnum assotype) {
SpmkAssoBusiness sat = null;
switch (assotype) {
case DEFAULT:
......
......@@ -133,7 +133,11 @@
a.job_status,
a.rz_time,
a.bmgw_id,
a.org_code
a.org_code,
a.zj_type,
a.zj_num,
a.syq
</sql>
<sql id="Base_Column_List_Alias">
......
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