提交 834b4ed5 authored 作者: 133's avatar 133

[清退] 添加账单查询列表

上级 5df9d118
......@@ -2,10 +2,7 @@ package com.tykj.dev.device.sendback.controller;
import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.sendback.entity.domain.DeviceRepel;
import com.tykj.dev.device.sendback.entity.vo.OrderOutData;
import com.tykj.dev.device.sendback.entity.vo.RepelAuditResult;
import com.tykj.dev.device.sendback.entity.vo.ResolveConfirm;
import com.tykj.dev.device.sendback.entity.vo.StorageDeviceRepel;
import com.tykj.dev.device.sendback.entity.vo.*;
import com.tykj.dev.device.sendback.service.RepelBusinessService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -165,4 +162,5 @@ public class RepelDevController {
repelBusinessService.provinceDirectlyUnder(taskId);
return ResponseEntity.ok("省直属单位任务提交成功");
}
}
......@@ -3,6 +3,7 @@ package com.tykj.dev.device.sendback.controller;
import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.sendback.entity.vo.DeviceIdLIstVo;
import com.tykj.dev.device.sendback.entity.vo.ModelAndTypeVo;
import com.tykj.dev.device.sendback.entity.vo.SendBackOutFormVo;
import com.tykj.dev.device.sendback.service.RepelQueryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -123,4 +124,9 @@ public class RepelQueryController {
return ResponseEntity.ok(repelQueryService.findRepelListModelNameGroup(modelAndTypeVo));
}
@ApiOperation(value = "查询清退单列表")
@GetMapping("/getList")
public ResponseEntity getList() {
return ResponseEntity.ok(repelQueryService.getList());
}
}
......@@ -44,19 +44,22 @@ public class DeviceRepel extends BaseEntity {
* 页面类型
*/
@ApiModelProperty(value = "列装id文本 新建时不用填写")
@Column(name = "fielding",columnDefinition = "TEXT")
private String fielding;
/**
* 描述
*/
@ApiModelProperty(value = "描述")
@Column(name = "describes",columnDefinition = "TEXT")
private String describes;
/**
* 任务范围
* 字典值
*
*/
@ApiModelProperty(value = "任务范围 新建时不用填写")
@Column(name = "task_scope",columnDefinition = "TEXT")
private String taskScope;
/**
......
package com.tykj.dev.device.sendback.entity.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tykj.dev.device.file.entity.FileRet;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.misc.base.BaseEntity;
import io.swagger.annotations.ApiModel;
......@@ -175,25 +176,32 @@ public class DeviceRepelDetail extends BaseEntity {
/**
* 出库检查详情(装备主键id+核对结果(0缺失1无误3新增,字符x作为分隔符)),例如x10x21x32x,意为主键id为1的装备缺失,为2的无误,为3的不匹配
*/
@Column(name = "send_check_detail",columnDefinition = "TEXT")
@ApiModelProperty(value = "出库检查详情(装备主键id+核对结果(0缺失1无误3新增,字符x作为分隔符)),例如x10x21x32x,意为主键id为1的装备缺失,为2的无误,为3的不匹配")
private String sendCheckDetail;
/**
* 出库检查结果(缺失数量x新增数量),例如1x1,意为缺失1台,新增一条
*/
@ApiModelProperty(value = "出库检查结果(缺失数量x新增数量),例如1x1,意为缺失1台,新增一条")
@Column(name = "send_check_result",columnDefinition = "TEXT")
private String sendCheckResult;
/**
* 接收方入库检查详情(装备主键id+核对结果(0缺失1无误3不匹配,字符x作为分隔符)),例如x10x21x32x,意为主键id为1的装备缺失,为2的无误,为3的不匹配
*/
@ApiModelProperty(value = "接收方入库检查详情(装备主键id+核对结果(0缺失1无误3不匹配,字符x作为分隔符)),例如x10x21x32x,意为主键id为1的装备缺失,为2的无误,为3的不匹配")
@Column(name = "receive_check_detail",columnDefinition = "TEXT")
private String receiveCheckDetail;
/**
* 接收方检查结果(缺失数量x新增数量),例如1x1,意为缺失1台,新增一条
*/
@ApiModelProperty(value = "接收方检查结果(缺失数量x新增数量),例如1x1,意为缺失1台,新增一条")
@Column(name = "receive_check_result",columnDefinition = "TEXT")
private String receiveCheckResult;
@ApiModelProperty(value = "装备id集合")
@Column(name = "device_ids",columnDefinition = "TEXT")
private String deviceIds;
@ApiModelProperty(value = "发件单位签章id")
......@@ -209,15 +217,21 @@ public class DeviceRepelDetail extends BaseEntity {
* 提交描述
*/
@ApiModelProperty(value = "提交描述")
@Column(name = "submit_description",columnDefinition = "TEXT")
private String submitDescription;
/**
* 审核反馈
*/
@ApiModelProperty(value = "审核反馈")
@Column(name = "auditing_feedback",columnDefinition = "TEXT")
private String auditingFeedback;
@Transient
@ApiModelProperty(value = "装备List")
private List<DeviceLibrary> deviceLibraryEntities =new ArrayList<>();
@Transient
@ApiModelProperty(value = "清退单对象")
private List<FileRet> billFiles ;
}
......@@ -67,12 +67,14 @@ public class RepelTaskStatistical extends BaseEntity {
* 提交的型号和数量 json存储modelCount对象
*/
@ApiModelProperty(value = "提交的型号和数量 json存储modelCount对象")
@Column(name = "model_count",columnDefinition = "TEXT")
private String modelCount;
/**
* 描述
*/
@ApiModelProperty(value = "描述")
@Column(name = "des",columnDefinition = "TEXT")
private String des;
/**
......
......@@ -25,4 +25,6 @@ public class StorageDeviceRepel {
private List<FileRet> inFiles;
private List<Integer> deviceIds;
private Integer userId;
}
......@@ -2,6 +2,8 @@ package com.tykj.dev.device.sendback.service;
import com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail;
import java.util.List;
public interface DeviceRepelDetailService {
/**
* 添加清退详情
......@@ -22,4 +24,6 @@ public interface DeviceRepelDetailService {
* @return 详情对象
*/
DeviceRepelDetail findDeviceRepelDetailNoDev(Integer repelDetailId);
List<DeviceRepelDetail> findAll();
}
......@@ -75,7 +75,6 @@ public interface RepelBusinessService {
void oneselfRepel(Integer taskId,StorageDeviceRepel storageDeviceRepel,Integer userId);
/**
* 省直属任务等待上传
*/
......
......@@ -4,6 +4,7 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.sendback.entity.domain.DeviceRepel;
import com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail;
import com.tykj.dev.device.sendback.entity.vo.*;
import org.springframework.http.ResponseEntity;
import java.util.List;
......@@ -80,4 +81,10 @@ public interface RepelQueryService {
List<DevRepelVo> repelManagementListDetails(List<Integer> ids);
/**
查询清退单
*/
List<DeviceRepelDetail> getList();
}
......@@ -64,6 +64,11 @@ public class DeviceRepelDetailServiceImpl implements DeviceRepelDetailService {
}
}
@Override
public List<DeviceRepelDetail> findAll() {
return deviceRepelDetailDao.findAll();
}
private List<DeviceLibrary> findInvoleDevice(String involeDevice){
if (involeDevice!=null && !involeDevice.equals(",") ) {
......
......@@ -9,6 +9,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
......@@ -39,6 +40,10 @@ public class RepelDeviceUnitServiceImpl implements RepelDeviceUnitService {
@Override
public List<DeviceLibrary> findHasRepel(Integer unitId) {
List<Integer> ids= repelDeviceUnitDao.findAllByUnitsId(unitId).stream().map(RepelDeviceUnit::getDeviceId).collect(Collectors.toList());
if (ids!=null&&ids.size()!=0) {
return deviceLibraryDao.getDeviceLibraryEntitiesByIdIn(ids);
}else {
return new ArrayList<>();
}
}
}
package com.tykj.dev.device.sendback.service.impl;
import com.tykj.dev.device.file.service.FilesUtil;
import com.tykj.dev.device.library.repository.DeviceLibraryDao;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.sendback.entity.domain.DeviceRepel;
......@@ -13,11 +14,13 @@ import com.tykj.dev.device.task.service.TaskService;
import com.tykj.dev.device.task.subject.bto.TaskBto;
import com.tykj.dev.device.user.subject.entity.Units;
import com.tykj.dev.device.user.subject.service.UnitsService;
import jdk.nashorn.internal.ir.IfNode;
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.persistence.Id;
import java.util.*;
import java.util.stream.Collectors;
......@@ -73,7 +76,9 @@ public class RepelQueryServiceImpl implements RepelQueryService {
deviceLibraryDao.findAllByPackingIdInAndOwnUnit(fielding,units.getName()).forEach(
deviceLibrary -> {
if (deviceLibrary.getOwnUnit().equals(deviceLibrary.getLocationUnit())){
if (deviceLibrary.getLifeStatus()==2) {
deviceLibraries.add(deviceLibrary);
}
}else {
deviceLibrariesAbnormal.add(deviceLibrary);
}
......@@ -184,6 +189,20 @@ public class RepelQueryServiceImpl implements RepelQueryService {
return deviceLibraryDao.findAllById(ids).stream().map(this::devRepelVo).collect(Collectors.toList());
}
@Override
public List<DeviceRepelDetail> getList() {
List<DeviceRepelDetail> list=new ArrayList<>();
repelDetailService.findAll().forEach(
deviceRepelDetail -> {
if (deviceRepelDetail.getBillFile()!=null){
deviceRepelDetail.setBillFiles(FilesUtil.stringFileToList(deviceRepelDetail.getBillFile()));
list.add(deviceRepelDetail);
}
}
);
return list;
}
private DevRepelVo devRepelVo(DeviceLibrary deviceLibrary){
return new DevRepelVo(deviceLibrary.getId(),deviceLibrary.getName(),deviceLibrary.getModel(),deviceLibrary.getSeqNumber(),deviceLibrary.getType());
......
......@@ -42,4 +42,9 @@ public class LeftNavigation {
* 类型
*/
private Integer type;
/**
* 序号
*/
private Integer order;
}
......@@ -91,4 +91,12 @@ public class UnitsController {
return ResponseEntity.ok(unitsService.findByUserIdUnitsTrainListVo(unitsId));
}
@GetMapping("/countries/units")
@ApiOperation(value = "省入库发件单位下拉接口", notes = "省入库发件单位下拉接口")
public ResponseEntity findSuperiorUnitsList(){
return ResponseEntity.ok(unitsService.findSuperiorUnitsList());
}
}
......@@ -73,7 +73,7 @@ public class Area {
}
public LeftNavigation toLeftNavigation(){
return new LeftNavigation(id,name,null, UUID.randomUUID().toString(),1);
return new LeftNavigation(id,name,null, UUID.randomUUID().toString(),1,Double.valueOf(orders).intValue());
}
......
......@@ -79,6 +79,13 @@ public class Units {
@ApiModelProperty(value = "区域id", name = "areaId", example = "12321L")
private Integer areaId;
/**
* 排序
*/
@ApiModelProperty(value = "排序", name = "showOrder", example = "12321L")
private Integer showOrder;
@ApiModelProperty(value = "区域名称", name = "areaName", example = "12321L")
@Transient
private String areaName;
......@@ -99,6 +106,7 @@ public class Units {
"1234",
1,1,
null,
null,
null
);
}
......@@ -114,6 +122,6 @@ public class Units {
}
public LeftNavigation toLeftNavigation(){
return new LeftNavigation(unitId,name,null, UUID.randomUUID().toString(),2);
return new LeftNavigation(unitId,name,null, UUID.randomUUID().toString(),2,showOrder);
}
}
......@@ -121,4 +121,9 @@ public interface UnitsService extends PublicService<Units> {
*/
LeftNavigation findLeftNavigation(SecurityUser securityUser);
/**
* 省入库上级单位对象查询接口
*/
List<Units> findSuperiorUnitsList();
}
......@@ -18,6 +18,7 @@ import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
......@@ -112,12 +113,12 @@ public class UnitsServiceImpl implements UnitsService {
}
);
}
leftNavigation.setLeftNavigations(leftNavigationList1);
leftNavigation.setLeftNavigations(leftNavigationList1.stream().sorted(Comparator.comparing(LeftNavigation::getOrder)).collect(Collectors.toList()));
leftNavigationList.add(leftNavigation);
});
}else if (thisArea.getType()==2){
areas.forEach(area -> {
leftNavigationList.addAll(unitsDao.findAllByAreaId(area.getId()).stream().map(Units::toLeftNavigation).collect(Collectors.toList()));
leftNavigationList.addAll(unitsDao.findAllByAreaId(area.getId()).stream().map(Units::toLeftNavigation).sorted(Comparator.comparing(LeftNavigation::getOrder)).collect(Collectors.toList()));
});
}else {
return leftNavigationList;
......@@ -184,6 +185,7 @@ public class UnitsServiceImpl implements UnitsService {
List<Integer> areaIds= areaDao.findAllByFatherId(units.getAreaId()).stream().map(Area::getId).collect(Collectors.toList());
List<Units> units1= unitsDao.findAllByAreaIdIn(areaIds);
if (units.getLevel()==1){
units1.add(units);
units1.addAll(unitsDao.findAllByType(2));
}
return units1;
......@@ -276,10 +278,18 @@ public class UnitsServiceImpl implements UnitsService {
leftNavigation= belongsArea.toLeftNavigation();
leftNavigationList= unitsDao.findAllByAreaId(belongsArea.getId()).stream().map(Units::toLeftNavigation).collect(Collectors.toList());
}
leftNavigation.setLeftNavigations(leftNavigationList);
leftNavigation.setLeftNavigations(leftNavigationList.stream().sorted(Comparator.comparing(LeftNavigation::getOrder)).collect(Collectors.toList()));
return leftNavigation;
}
@Override
public List<Units> findSuperiorUnitsList() {
return unitsDao.findAllByType(3);
}
@Override
public Units save(Units units) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论