提交 1aa93a7f authored 作者: zhoushaopan's avatar zhoushaopan

fix(配发模块,用户使用报告,维修模块): 修改省的判断条件

修改省的判断条件
上级 d86f1bba
...@@ -24,9 +24,11 @@ import com.tykj.dev.device.task.service.TaskLogService; ...@@ -24,9 +24,11 @@ import com.tykj.dev.device.task.service.TaskLogService;
import com.tykj.dev.device.task.service.TaskService; import com.tykj.dev.device.task.service.TaskService;
import com.tykj.dev.device.task.subject.bto.TaskBto; import com.tykj.dev.device.task.subject.bto.TaskBto;
import com.tykj.dev.device.task.subject.domin.Task; import com.tykj.dev.device.task.subject.domin.Task;
import com.tykj.dev.device.user.cache.UnitsCache;
import com.tykj.dev.device.user.read.service.MessageService; import com.tykj.dev.device.user.read.service.MessageService;
import com.tykj.dev.device.user.read.subject.bto.MessageBto; import com.tykj.dev.device.user.read.subject.bto.MessageBto;
import com.tykj.dev.device.user.subject.dao.UserDao; import com.tykj.dev.device.user.subject.dao.UserDao;
import com.tykj.dev.device.user.subject.entity.Units;
import com.tykj.dev.device.user.subject.entity.User; import com.tykj.dev.device.user.subject.entity.User;
import com.tykj.dev.device.user.subject.service.AreaService; import com.tykj.dev.device.user.subject.service.AreaService;
import com.tykj.dev.device.user.subject.service.UnitsService; import com.tykj.dev.device.user.subject.service.UnitsService;
...@@ -128,6 +130,9 @@ public class AllotBillController { ...@@ -128,6 +130,9 @@ public class AllotBillController {
@Autowired @Autowired
private PackingController packingController; private PackingController packingController;
@Autowired
private UnitsCache unitsCache;
@ApiOperation(value = "导入二维码获取配发装备", notes = "可以通过这个接口导入二维码获取配发装备") @ApiOperation(value = "导入二维码获取配发装备", notes = "可以通过这个接口导入二维码获取配发装备")
@PostMapping(value = "/load") @PostMapping(value = "/load")
public ResponseEntity loadDevice(@RequestBody RfidVo rfidVo) { public ResponseEntity loadDevice(@RequestBody RfidVo rfidVo) {
...@@ -298,7 +303,11 @@ public class AllotBillController { ...@@ -298,7 +303,11 @@ public class AllotBillController {
Map<Integer, Integer> changeMap = new HashMap<>(); Map<Integer, Integer> changeMap = new HashMap<>();
Map<String, PackingLibrary> packingLibraryHashMap = new HashMap<>(); Map<String, PackingLibrary> packingLibraryHashMap = new HashMap<>();
if (unitsService.findbyName(allotBillSaveVo.getSendUnit()).getLevel() == 1) { // if (unitsService.findbyName(allotBillSaveVo.getSendUnit()).getLevel() == 1) {
// createPacking(strings, allotBillSaveVo, packingLibraryHashMap);
// }
Units units = unitsCache.findById(allotBillSaveVo.getSendUnitId());
if (units.getLevel() == 1 && units.getType() == 1) {
createPacking(strings, allotBillSaveVo, packingLibraryHashMap); createPacking(strings, allotBillSaveVo, packingLibraryHashMap);
} }
......
...@@ -25,9 +25,12 @@ import com.tykj.dev.device.task.service.TaskService; ...@@ -25,9 +25,12 @@ import com.tykj.dev.device.task.service.TaskService;
import com.tykj.dev.device.task.subject.bto.TaskBto; import com.tykj.dev.device.task.subject.bto.TaskBto;
import com.tykj.dev.device.task.subject.domin.Task; import com.tykj.dev.device.task.subject.domin.Task;
import com.tykj.dev.device.task.subject.vo.TaskLogUserVo; import com.tykj.dev.device.task.subject.vo.TaskLogUserVo;
import com.tykj.dev.device.user.cache.UnitsCache;
import com.tykj.dev.device.user.cache.UserCache;
import com.tykj.dev.device.user.read.service.MessageService; import com.tykj.dev.device.user.read.service.MessageService;
import com.tykj.dev.device.user.read.subject.bto.MessageBto; import com.tykj.dev.device.user.read.subject.bto.MessageBto;
import com.tykj.dev.device.user.subject.dao.UserDao; import com.tykj.dev.device.user.subject.dao.UserDao;
import com.tykj.dev.device.user.subject.entity.Units;
import com.tykj.dev.device.user.subject.entity.User; import com.tykj.dev.device.user.subject.entity.User;
import com.tykj.dev.device.user.subject.service.UserPublicService; import com.tykj.dev.device.user.subject.service.UserPublicService;
import com.tykj.dev.device.user.util.UserUtils; import com.tykj.dev.device.user.util.UserUtils;
...@@ -121,6 +124,9 @@ public class DeviceApplyController { ...@@ -121,6 +124,9 @@ public class DeviceApplyController {
@Qualifier("taskExecutor") @Qualifier("taskExecutor")
private Executor executor; private Executor executor;
@Autowired
private UnitsCache unitsCache;
// @Autowired // @Autowired
// private DeviceLibraryDao deviceLibraryDao; // private DeviceLibraryDao deviceLibraryDao;
...@@ -160,7 +166,10 @@ public class DeviceApplyController { ...@@ -160,7 +166,10 @@ public class DeviceApplyController {
default: default:
title = "装备申请"; title = "装备申请";
} }
if (userUtils.getCurrentUnitLevel()==1){ // if (userUtils.getCurrentUnitLevel()==1){
Integer currentUnitLevel = userUtils.getCurrentUnitLevel();
Units units = unitsCache.findById(userUtils.getCurrentUnitId());
if (units.getLevel()==1 && units.getType() == 1){
//如果是省 等待中办 设置状态为3 //如果是省 等待中办 设置状态为3
deviceApplyBillEntity.setApplyStatus(3); deviceApplyBillEntity.setApplyStatus(3);
deviceApplyBillService.update(deviceApplyBillEntity); deviceApplyBillService.update(deviceApplyBillEntity);
......
...@@ -193,6 +193,7 @@ public class RepairController { ...@@ -193,6 +193,7 @@ public class RepairController {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity saveRepairBill(@RequestBody RepairBillSaveVo repairBillSaveVo) { public ResponseEntity saveRepairBill(@RequestBody RepairBillSaveVo repairBillSaveVo) {
Integer currentUnitLevel = userUtils.getCurrentUnitLevel(); Integer currentUnitLevel = userUtils.getCurrentUnitLevel();
Units units = unitsCache.findById(userUtils.getCurrentUnitId());
//判断装备的状态是否在库或维修中 //判断装备的状态是否在库或维修中
deviceLibraryService.isInStockOrRepairing(StringSplitUtil.split(repairBillSaveVo.getRepairDeviceCheckDetail())); deviceLibraryService.isInStockOrRepairing(StringSplitUtil.split(repairBillSaveVo.getRepairDeviceCheckDetail()));
//第一次保存 //第一次保存
...@@ -232,7 +233,7 @@ public class RepairController { ...@@ -232,7 +233,7 @@ public class RepairController {
// TaskBto taskBto = new TaskBto(StatusEnum.REPAIR_SEND_DRAFT.id, "["+repairBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + StringSplitUtil.stringListToString(repairBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "共有" + repairBillSaveVo.getSendingCount() + "件",null, ".", repairBill1.getId(), 5, userUtils.getCurrentUnitId(), 0, null, userIds); // TaskBto taskBto = new TaskBto(StatusEnum.REPAIR_SEND_DRAFT.id, "["+repairBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + StringSplitUtil.stringListToString(repairBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "共有" + repairBillSaveVo.getSendingCount() + "件",null, ".", repairBill1.getId(), 5, userUtils.getCurrentUnitId(), 0, null, userIds);
TaskBto taskBto = new TaskBto(StatusEnum.REPAIR_SEND_DRAFT.id, "["+DeviceModelSort.unitNameToDisName(repairBillSaveVo.getReceiveUnit()) + "]型号" + StringSplitUtil.stringListToString(repairBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "共有" + repairBillSaveVo.getSendingCount() + "件",null, ".", repairBill1.getId(), 5, userUtils.getCurrentUnitId(), 0, null, userIds); TaskBto taskBto = new TaskBto(StatusEnum.REPAIR_SEND_DRAFT.id, "["+DeviceModelSort.unitNameToDisName(repairBillSaveVo.getReceiveUnit()) + "]型号" + StringSplitUtil.stringListToString(repairBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "共有" + repairBillSaveVo.getSendingCount() + "件",null, ".", repairBill1.getId(), 5, userUtils.getCurrentUnitId(), 0, null, userIds);
//如果是省发起的维修 //如果是省发起的维修
if (currentUnitLevel == 1){ if (currentUnitLevel == 1 && units.getType() == 1){
taskBto.setCustomInfo("country"); taskBto.setCustomInfo("country");
} }
TaskBto taskBto1 = taskService.start(taskBto); TaskBto taskBto1 = taskService.start(taskBto);
...@@ -340,6 +341,7 @@ public class RepairController { ...@@ -340,6 +341,7 @@ public class RepairController {
} }
Integer userId = userUtils.getCurrentUserId(); Integer userId = userUtils.getCurrentUserId();
Integer level = userUtils.getCurrentUnitLevel(); Integer level = userUtils.getCurrentUnitLevel();
Units units = unitsCache.findById(userUtils.getCurrentUnitId());
//添加维修单和送修单 //添加维修单和送修单
RepairBill repairBill; RepairBill repairBill;
RepairSendBill deviceRepairSendBillEntity; RepairSendBill deviceRepairSendBillEntity;
...@@ -362,7 +364,7 @@ public class RepairController { ...@@ -362,7 +364,7 @@ public class RepairController {
deviceRepairSendBillEntity.setScriptJson(JacksonUtil.toJSon(repairBillSaveVo.getScriptSaveVos())); deviceRepairSendBillEntity.setScriptJson(JacksonUtil.toJSon(repairBillSaveVo.getScriptSaveVos()));
} }
//如果当前为省向国家发起的 //如果当前为省向国家发起的
if (level == 1) { if (level == 1 && units.getType() == 1) {
repairBill.setRepairStatus(4);//维修中 repairBill.setRepairStatus(4);//维修中
deviceRepairSendBillEntity.setRepairStatus(5);//维修中 deviceRepairSendBillEntity.setRepairStatus(5);//维修中
} else { } else {
...@@ -967,6 +969,7 @@ public class RepairController { ...@@ -967,6 +969,7 @@ public class RepairController {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity saveRepairBackBill(@RequestBody RepairBackBillSaveVo repairBackBillSaveVo) { public ResponseEntity saveRepairBackBill(@RequestBody RepairBackBillSaveVo repairBackBillSaveVo) {
Integer currentUnitLevel = userUtils.getCurrentUnitLevel(); Integer currentUnitLevel = userUtils.getCurrentUnitLevel();
Units units = unitsCache.findById(userUtils.getCurrentUnitId());
//第一次保存 //第一次保存
if (repairBackBillSaveVo.getTaskId() == null) { if (repairBackBillSaveVo.getTaskId() == null) {
Integer userId = userUtils.getCurrentUserId(); Integer userId = userUtils.getCurrentUserId();
...@@ -988,7 +991,7 @@ public class RepairController { ...@@ -988,7 +991,7 @@ public class RepairController {
//发起任务 //发起任务
// TaskBto taskBto = new TaskBto(StatusEnum.REPAIR_BACK_DRAFT.id, "["+repairBackBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + repairBackBillSaveVo.getScriptSaveVos().get(0).getModel() + "共有" + repairBackBillSaveVo.getSendingCount() + "件至", null, ".", repairBackBill1.getId(), BusinessEnum.REPAIR_BACK.id, userUtils.getCurrentUnitId(), 0, null, userIds); // TaskBto taskBto = new TaskBto(StatusEnum.REPAIR_BACK_DRAFT.id, "["+repairBackBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + repairBackBillSaveVo.getScriptSaveVos().get(0).getModel() + "共有" + repairBackBillSaveVo.getSendingCount() + "件至", null, ".", repairBackBill1.getId(), BusinessEnum.REPAIR_BACK.id, userUtils.getCurrentUnitId(), 0, null, userIds);
TaskBto taskBto = new TaskBto(StatusEnum.REPAIR_BACK_DRAFT.id, "["+DeviceModelSort.unitNameToDisName(repairBackBillSaveVo.getReceiveUnit()) + "]型号" + repairBackBillSaveVo.getScriptSaveVos().get(0).getModel() + "共有" + repairBackBillSaveVo.getSendingCount() + "件至", null, ".", repairBackBill1.getId(), BusinessEnum.REPAIR_BACK.id, userUtils.getCurrentUnitId(), 0, null, userIds); TaskBto taskBto = new TaskBto(StatusEnum.REPAIR_BACK_DRAFT.id, "["+DeviceModelSort.unitNameToDisName(repairBackBillSaveVo.getReceiveUnit()) + "]型号" + repairBackBillSaveVo.getScriptSaveVos().get(0).getModel() + "共有" + repairBackBillSaveVo.getSendingCount() + "件至", null, ".", repairBackBill1.getId(), BusinessEnum.REPAIR_BACK.id, userUtils.getCurrentUnitId(), 0, null, userIds);
if (currentUnitLevel == 1){ if (currentUnitLevel == 1 && units.getType() == 1){
taskBto.setCustomInfo("country"); taskBto.setCustomInfo("country");
} }
TaskBto taskBto1 = taskService.start(taskBto); TaskBto taskBto1 = taskService.start(taskBto);
...@@ -1973,9 +1976,9 @@ public class RepairController { ...@@ -1973,9 +1976,9 @@ public class RepairController {
//已领取装备 //已领取装备
else if (type == 4) { else if (type == 4) {
Integer level = userUtils.getCurrentUnitLevel(); Integer level = userUtils.getCurrentUnitLevel();
String currentUserUnitName = userUtils.getCurrentUserUnitName(); Units units1 = unitsCache.findById(userUtils.getCurrentUnitId());
List<RepairDetail> repairDetails; List<RepairDetail> repairDetails;
if (level == 1) { if (level == 1 && units1.getType() == 1) {
repairDetails = repairDetailDao.findAllByRepairStatus(5, repairTaskSelectVo.getPageable().getSort()); repairDetails = repairDetailDao.findAllByRepairStatus(5, repairTaskSelectVo.getPageable().getSort());
} else if (level == 2) { } else if (level == 2) {
...@@ -2035,8 +2038,9 @@ public class RepairController { ...@@ -2035,8 +2038,9 @@ public class RepairController {
//已报废装备 //已报废装备
else if (type == 5) { else if (type == 5) {
Integer level = userUtils.getCurrentUnitLevel(); Integer level = userUtils.getCurrentUnitLevel();
Units units = unitsCache.findById(userUtils.getCurrentUnitId());
List<RepairDetail> repairDetails; List<RepairDetail> repairDetails;
if (level == 1) { if (level == 1 && units.getType() == 1) {
repairDetails = repairDetailDao.findAllByRepairStatus(4, repairTaskSelectVo.getPageable().getSort()); repairDetails = repairDetailDao.findAllByRepairStatus(4, repairTaskSelectVo.getPageable().getSort());
} else { } else {
throw new ApiException("区县没有维修完成列表"); throw new ApiException("区县没有维修完成列表");
...@@ -2116,9 +2120,10 @@ public class RepairController { ...@@ -2116,9 +2120,10 @@ public class RepairController {
@PostMapping(value = "/uploadRecord") @PostMapping(value = "/uploadRecord")
public ResponseEntity uploadRecord(@RequestBody RepairRecord repairRecord) { public ResponseEntity uploadRecord(@RequestBody RepairRecord repairRecord) {
Integer level = userUtils.getCurrentUnitLevel(); Integer level = userUtils.getCurrentUnitLevel();
Units units = unitsCache.findById(userUtils.getCurrentUnitId());
// RepairDetail repairDetail = deviceRepairDetailService.getOne(repairRecord.getId()); // RepairDetail repairDetail = deviceRepairDetailService.getOne(repairRecord.getId());
//省市县三种备注 //省市县三种备注
if (level == 1) { if (level == 1 && units.getType() == 2) {
// repairDetail.setRecord(repairRecord.getRecord()); // repairDetail.setRecord(repairRecord.getRecord());
repairDetailDao.updateRecord(repairRecord.getRecord(),repairRecord.getId()); repairDetailDao.updateRecord(repairRecord.getRecord(),repairRecord.getId());
} else if (level == 2) { } else if (level == 2) {
...@@ -2829,6 +2834,7 @@ public class RepairController { ...@@ -2829,6 +2834,7 @@ public class RepairController {
} }
Integer userId = userUtils.getCurrentUserId(); Integer userId = userUtils.getCurrentUserId();
Integer level = userUtils.getCurrentUnitLevel(); Integer level = userUtils.getCurrentUnitLevel();
Units units = unitsCache.findById(userUtils.getCurrentUnitId());
//添加维修单和送修单 //添加维修单和送修单
RepairBill repairBill = null; RepairBill repairBill = null;
RepairSendBill deviceRepairSendBillEntity = null; RepairSendBill deviceRepairSendBillEntity = null;
...@@ -2959,7 +2965,7 @@ public class RepairController { ...@@ -2959,7 +2965,7 @@ public class RepairController {
//当前单位其他专管员id集合 //当前单位其他专管员id集合
List<Integer> ids = userPublicService.findOtherUser(userUtils.getCurrentUserId()); List<Integer> ids = userPublicService.findOtherUser(userUtils.getCurrentUserId());
//省向国家发起的 //省向国家发起的
if (level == 1) { if (level == 1 && units.getType() == 1) {
ownUnit = userUtils.getCurrentUnitId(); ownUnit = userUtils.getCurrentUnitId();
//直接发起的 //直接发起的
if (repairBillSaveVo.getTaskId() == null) { if (repairBillSaveVo.getTaskId() == null) {
...@@ -3026,7 +3032,7 @@ public class RepairController { ...@@ -3026,7 +3032,7 @@ public class RepairController {
deviceRepairDetailService.save(repairDetail); deviceRepairDetailService.save(repairDetail);
} }
//如果当前为省像国家发起的 //如果当前为省像国家发起的
if (level == 1) { if (level == 1 && units.getType() == 2) {
deviceLibraryEntity.setLifeStatus(4); deviceLibraryEntity.setLifeStatus(4);
deviceLibraryEntity.setLocationUnit(repairBillSaveVo.getReceiveUnit()); deviceLibraryEntity.setLocationUnit(repairBillSaveVo.getReceiveUnit());
} }
...@@ -3041,7 +3047,7 @@ public class RepairController { ...@@ -3041,7 +3047,7 @@ public class RepairController {
String deviceIdDetail = deviceRepairSendBillEntity.getRepairDeviceCheckDetail(); String deviceIdDetail = deviceRepairSendBillEntity.getRepairDeviceCheckDetail();
List<Integer> idList = StringSplitUtil.split(deviceIdDetail); List<Integer> idList = StringSplitUtil.split(deviceIdDetail);
//如果当前为省,改变装备的所在为中办 //如果当前为省,改变装备的所在为中办
if (level == 1) { if (level == 1 && units.getType() == 1) {
//获取当前业务维修详情 记录 //获取当前业务维修详情 记录
List<RepairDetail> repairDetailEntities = deviceRepairDetailService.findByBillId(repairBill.getId()); List<RepairDetail> repairDetailEntities = deviceRepairDetailService.findByBillId(repairBill.getId());
//改变维修详情装备所在单位为中办,状态为维修中 //改变维修详情装备所在单位为中办,状态为维修中
...@@ -3205,6 +3211,7 @@ public class RepairController { ...@@ -3205,6 +3211,7 @@ public class RepairController {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity saveRepairUnderBill(@RequestBody RepairBillSaveVo repairBillSaveVo) { public ResponseEntity saveRepairUnderBill(@RequestBody RepairBillSaveVo repairBillSaveVo) {
Integer currentUnitLevel = userUtils.getCurrentUnitLevel(); Integer currentUnitLevel = userUtils.getCurrentUnitLevel();
Units units = unitsCache.findById(userUtils.getCurrentUnitId());
//判断装备的状态是否在库或维修中 //判断装备的状态是否在库或维修中
deviceLibraryService.isInStockOrRepairing(StringSplitUtil.split(repairBillSaveVo.getRepairDeviceCheckDetail())); deviceLibraryService.isInStockOrRepairing(StringSplitUtil.split(repairBillSaveVo.getRepairDeviceCheckDetail()));
//第一次保存 //第一次保存
...@@ -3255,7 +3262,7 @@ public class RepairController { ...@@ -3255,7 +3262,7 @@ public class RepairController {
+ "共有" + repairBillSaveVo.getSendingCount() + "件",null, ".", + "共有" + repairBillSaveVo.getSendingCount() + "件",null, ".",
repairBill1.getId(), 5, userUtils.getCurrentUnitId(), 0, null, userIds); repairBill1.getId(), 5, userUtils.getCurrentUnitId(), 0, null, userIds);
//如果是省发起的维修 //如果是省发起的维修
if (currentUnitLevel == 1){ if (currentUnitLevel == 1 && units.getType() == 1){
taskBto.setCustomInfo("country1"); taskBto.setCustomInfo("country1");
} }
TaskBto taskBto1 = taskService.start(taskBto); TaskBto taskBto1 = taskService.start(taskBto);
......
...@@ -28,6 +28,7 @@ import com.tykj.dev.device.sendback.service.RepelQueryService; ...@@ -28,6 +28,7 @@ import com.tykj.dev.device.sendback.service.RepelQueryService;
import com.tykj.dev.device.storage.repository.StorageBillDao; import com.tykj.dev.device.storage.repository.StorageBillDao;
import com.tykj.dev.device.storage.subject.domin.StorageBill; import com.tykj.dev.device.storage.subject.domin.StorageBill;
import com.tykj.dev.device.user.cache.UnitsCache; import com.tykj.dev.device.user.cache.UnitsCache;
import com.tykj.dev.device.user.subject.entity.Units;
import com.tykj.dev.device.user.subject.service.UnitsService; import com.tykj.dev.device.user.subject.service.UnitsService;
import com.tykj.dev.device.user.subject.service.UserPublicService; import com.tykj.dev.device.user.subject.service.UserPublicService;
import com.tykj.dev.device.user.util.UserUtils; import com.tykj.dev.device.user.util.UserUtils;
...@@ -351,6 +352,7 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService { ...@@ -351,6 +352,7 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
int decommissioningStatisticsNum = 0;//退役 int decommissioningStatisticsNum = 0;//退役
int toRepairBackNum = 0;//向下级进行维修退回 int toRepairBackNum = 0;//向下级进行维修退回
int toRepairNum = 0;// 接收下级单位维修 int toRepairNum = 0;// 接收下级单位维修
Units units = unitsCache.findById(userUtils.getCurrentUnitId());
//筛选出日期范围内所有入库账单 //筛选出日期范围内所有入库账单
List<StorageBill> storageBillEntities = storageBillDao.findAll().stream() List<StorageBill> storageBillEntities = storageBillDao.findAll().stream()
.filter(storageBillEntity -> storageBillEntity.getStorageStatus() == 2 && userUtils.getCurrentUserUnitName().equals(userPublicService.findUnitsNameByUserId(storageBillEntity.getReceiveUseraId())) && storageBillEntity.getUpdateTime().after(date) && storageBillEntity.getUpdateTime().before(date2)) .filter(storageBillEntity -> storageBillEntity.getStorageStatus() == 2 && userUtils.getCurrentUserUnitName().equals(userPublicService.findUnitsNameByUserId(storageBillEntity.getReceiveUseraId())) && storageBillEntity.getUpdateTime().after(date) && storageBillEntity.getUpdateTime().before(date2))
...@@ -419,7 +421,7 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService { ...@@ -419,7 +421,7 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
} }
} }
//筛选出配接收退回的账单 接收退回 //筛选出配接收退回的账单 接收退回
if (userUtils.getCurrentUnitLevel() != 1){ if (userUtils.getCurrentUnitLevel() != 1 && units.getType() == 1){
//发起退回 //发起退回
// List<AllotBackBill> sendAllotBackBills = allotBackBillDao.findAll().stream() // List<AllotBackBill> sendAllotBackBills = allotBackBillDao.findAll().stream()
// .filter(allotBackBill -> allotStatusBackList.contains(allotBackBill.getBackStatus()) && userUtils.getCurrentUserUnitName().equals(allotBackBill.getSendUnit()) && allotBackBill.getSendTime().after(date) && allotBackBill.getSendTime().before(date2)) // .filter(allotBackBill -> allotStatusBackList.contains(allotBackBill.getBackStatus()) && userUtils.getCurrentUserUnitName().equals(allotBackBill.getSendUnit()) && allotBackBill.getSendTime().after(date) && allotBackBill.getSendTime().before(date2))
...@@ -441,7 +443,7 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService { ...@@ -441,7 +443,7 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
} }
//省级才能销毁,列装,退装 退役 报废 //省级才能销毁,列装,退装 退役 报废
if (userUtils.getCurrentUnitLevel() == 1) { if (userUtils.getCurrentUnitLevel() == 1 && units.getType() == 1) {
//报废 //报废
int scrapStatisticsCount = this.getScrapStatisticsCount(date, date2); int scrapStatisticsCount = this.getScrapStatisticsCount(date, date2);
scrapStatisticsNum = scrapStatisticsCount; scrapStatisticsNum = scrapStatisticsCount;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论