Commit 5c9d3577 by tangzhaoqian Committed by chenzg

员工、审批bug

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