提交 4bb8c2e2 authored 作者: 133's avatar 133

[用户] 添加代码提交

上级 cbf43d57
...@@ -126,7 +126,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService { ...@@ -126,7 +126,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
DeviceRepelDetail deviceRepelDetail=new DeviceRepelDetail(); DeviceRepelDetail deviceRepelDetail=new DeviceRepelDetail();
deviceRepelDetail.setRepelId(deviceRepel1.getId()); deviceRepelDetail.setRepelId(deviceRepel1.getId());
deviceRepelDetail.setRepelStatus(1); deviceRepelDetail.setRepelStatus(1);
TaskBto taskBto= statsXTask(units.getUnitId(),deviceRepelDetailService.saveDeviceRepelDetail(deviceRepelDetail).getId(),deviceRepel.getTitle()); TaskBto taskBto= statsXTask(units.getUnitId(),deviceRepel1.getId(),deviceRepel.getTitle());
//给本单位其他专管员阅知 //给本单位其他专管员阅知
addMessage(new MessageBto(taskBto.getId(),taskBto.getBusinessType(),user.getName()+"发起清退任务["+deviceRepel1.getTitle()+"]",gainThisUser(userId,units.getUnitId()))); addMessage(new MessageBto(taskBto.getId(),taskBto.getBusinessType(),user.getName()+"发起清退任务["+deviceRepel1.getTitle()+"]",gainThisUser(userId,units.getUnitId())));
...@@ -220,7 +220,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService { ...@@ -220,7 +220,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
DeviceRepelDetail deviceRepelDetail=new DeviceRepelDetail(); DeviceRepelDetail deviceRepelDetail=new DeviceRepelDetail();
deviceRepelDetail.setRepelId(deviceRepel1.getId()); deviceRepelDetail.setRepelId(deviceRepel1.getId());
deviceRepelDetail.setRepelStatus(1); deviceRepelDetail.setRepelStatus(1);
TaskBto taskBto= cityTotalTask(units.getUnitId(),deviceRepelDetailService.saveDeviceRepelDetail(deviceRepelDetail).getId(),deviceRepel.getTitle()); TaskBto taskBto= cityTotalTask(units.getUnitId(),deviceRepel1.getId(),deviceRepel.getTitle());
addMessage(new MessageBto(taskBto.getId(),taskBto.getBusinessType(),user.getName()+"转发清退任务["+deviceRepel1.getTitle()+"]",gainThisUser(userId,units.getUnitId()))); addMessage(new MessageBto(taskBto.getId(),taskBto.getBusinessType(),user.getName()+"转发清退任务["+deviceRepel1.getTitle()+"]",gainThisUser(userId,units.getUnitId())));
// repelTaskStatisticalService.saveRepelTaskStatistical(new RepelTaskStatistical(deviceRepel1.getId(),null,taskBto.getId(),null,area.getName())); // repelTaskStatisticalService.saveRepelTaskStatistical(new RepelTaskStatistical(deviceRepel1.getId(),null,taskBto.getId(),null,area.getName()));
...@@ -274,7 +274,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService { ...@@ -274,7 +274,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
DeviceRepelDetail deviceRepelDetail=new DeviceRepelDetail(); DeviceRepelDetail deviceRepelDetail=new DeviceRepelDetail();
deviceRepelDetail.setRepelId(deviceRepel1.getId()); deviceRepelDetail.setRepelId(deviceRepel1.getId());
deviceRepelDetail.setRepelStatus(1); deviceRepelDetail.setRepelStatus(1);
TaskBto taskBto= cityInitiateTask(unitsFather.getUnitId(),deviceRepelDetailService.saveDeviceRepelDetail(deviceRepelDetail).getId(),deviceRepel.getTitle(),userId); TaskBto taskBto= cityInitiateTask(unitsFather.getUnitId(),deviceRepel1.getId(),deviceRepel.getTitle(),userId);
addMessage(new MessageBto(taskBto.getId(),taskBto.getBusinessType(),user.getName()+"发起清退任务["+deviceRepel1.getTitle()+"]",gainThisUser(userId,units.getUnitId()))); addMessage(new MessageBto(taskBto.getId(),taskBto.getBusinessType(),user.getName()+"发起清退任务["+deviceRepel1.getTitle()+"]",gainThisUser(userId,units.getUnitId())));
// repelTaskStatisticalService.saveRepelTaskStatistical(new RepelTaskStatistical(deviceRepel1.getId(),null,taskBto.getId(),null,area.getName())); // repelTaskStatisticalService.saveRepelTaskStatistical(new RepelTaskStatistical(deviceRepel1.getId(),null,taskBto.getId(),null,area.getName()));
......
...@@ -61,7 +61,10 @@ public class RepelQueryServiceImpl implements RepelQueryService { ...@@ -61,7 +61,10 @@ public class RepelQueryServiceImpl implements RepelQueryService {
@Override @Override
public DeviceRepel findDeviceRepel(Integer taskId) { public DeviceRepel findDeviceRepel(Integer taskId) {
TaskBto taskBto= taskService.get(taskId); TaskBto taskBto= taskService.get(taskId);
DeviceRepelDetail deviceRepelDetail= repelDetailService.findDeviceRepelDetailNoDev(taskBto.getBillId()); if (taskBto.getBusinessType()==18){
return deviceRepelService.findDeviceRepel(taskBto.getBillId());
}
DeviceRepelDetail deviceRepelDetail = repelDetailService.findDeviceRepelDetailNoDev(taskBto.getBillId());
return deviceRepelService.findDeviceRepel(deviceRepelDetail.getRepelId()); return deviceRepelService.findDeviceRepel(deviceRepelDetail.getRepelId());
} }
......
...@@ -3,6 +3,7 @@ package com.tykj.dev.device.user.subject.dao; ...@@ -3,6 +3,7 @@ package com.tykj.dev.device.user.subject.dao;
import com.tykj.dev.device.user.subject.entity.User; import com.tykj.dev.device.user.subject.entity.User;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
...@@ -17,5 +18,6 @@ public interface UserDao extends JpaRepository<User, Integer>, JpaSpecificationE ...@@ -17,5 +18,6 @@ public interface UserDao extends JpaRepository<User, Integer>, JpaSpecificationE
List<User> findAllByUserIdIn(List<Integer> userIds); List<User> findAllByUserIdIn(List<Integer> userIds);
@Query("select max(o.showOrder) from User o where o.unitsId = ?1")
int maxShowOrder(Integer unitsId);
} }
...@@ -132,7 +132,7 @@ public class User { ...@@ -132,7 +132,7 @@ public class User {
/** /**
* 培训状态 0.已培训 1.已过期 2.未培训 3.快过期 * 培训状态 0.已培训 1.已过期 2.未培训 3.快过期
*/ */
private Integer trainStatus; private Integer trainStatus=2;
/** /**
* 单位对象 * 单位对象
*/ */
......
...@@ -70,6 +70,7 @@ public class UserServiceImpl implements UserService { ...@@ -70,6 +70,7 @@ public class UserServiceImpl implements UserService {
user.setPassword(encode); user.setPassword(encode);
user.setNoPassword("qwer1234"); user.setNoPassword("qwer1234");
Units units = unitsService.findById(user.getUnitsId()); Units units = unitsService.findById(user.getUnitsId());
user.setShowOrder(userDao.maxShowOrder(units.getUnitId())+1);
User user1 = userDao.save(user); User user1 = userDao.save(user);
switch (units.getLevel()){ switch (units.getLevel()){
case 1: case 1:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论