提交 766e3a97 authored 作者: 邓砥奕's avatar 邓砥奕

更新

上级 162b2b4a
...@@ -303,6 +303,8 @@ public class AllotBillController { ...@@ -303,6 +303,8 @@ public class AllotBillController {
BeanUtils.copyProperties(allotReceiveVo, allotBillEntity); BeanUtils.copyProperties(allotReceiveVo, allotBillEntity);
allotBillEntity.setReceiveTime(TimestampUtil.getCurrentTimestamp()); allotBillEntity.setReceiveTime(TimestampUtil.getCurrentTimestamp());
allotBillEntity.setReceiveUseraId(userId); allotBillEntity.setReceiveUseraId(userId);
allotBillEntity.setBillFileName(allotReceiveVo.getBillFileName());
allotBillEntity.setBillFileUrl(allotReceiveVo.getBillFileUrl());
allotBillService.update(allotBillEntity); allotBillService.update(allotBillEntity);
taskService.addInvolveUser(taskBto, userId); taskService.addInvolveUser(taskBto, userId);
// //推至下一阶段 // //推至下一阶段
......
...@@ -4,6 +4,7 @@ import com.tykj.dev.config.swagger.AutoDocument; ...@@ -4,6 +4,7 @@ import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.allot.service.AllotBillService; import com.tykj.dev.device.allot.service.AllotBillService;
import com.tykj.dev.device.allot.subject.domin.AllotBill; import com.tykj.dev.device.allot.subject.domin.AllotBill;
import com.tykj.dev.device.allot.subject.vo.AllotBillSelectVo; import com.tykj.dev.device.allot.subject.vo.AllotBillSelectVo;
import com.tykj.dev.device.file.service.FilesUtil;
import com.tykj.dev.device.library.service.DeviceLibraryService; import com.tykj.dev.device.library.service.DeviceLibraryService;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary; import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.user.subject.service.UserPublicService; import com.tykj.dev.device.user.subject.service.UserPublicService;
...@@ -57,6 +58,7 @@ public class AllotBillSelectController { ...@@ -57,6 +58,7 @@ public class AllotBillSelectController {
if (allotBillEntity.getReceiveUserbId() != null) { if (allotBillEntity.getReceiveUserbId() != null) {
allotBillEntity.setReceiveUserB(userService.getOne(allotBillEntity.getReceiveUserbId()).getName()); allotBillEntity.setReceiveUserB(userService.getOne(allotBillEntity.getReceiveUserbId()).getName());
} }
allotBillEntity.setSendFileList(FilesUtil.stringFileToList(allotBillEntity.getSendFiles()));
list.add(allotBillEntity); list.add(allotBillEntity);
List<DeviceLibrary> libraryEntities = new ArrayList<>(); List<DeviceLibrary> libraryEntities = new ArrayList<>();
//如果接收装备详情不为空,分隔装备id并添加 //如果接收装备详情不为空,分隔装备id并添加
......
...@@ -251,4 +251,7 @@ public class AllotBill { ...@@ -251,4 +251,7 @@ public class AllotBill {
@Transient @Transient
private List<FileRet> replyFileList = new ArrayList<>(); private List<FileRet> replyFileList = new ArrayList<>();
@Transient
private List<FileRet> sendFileList = new ArrayList<>();
} }
...@@ -19,11 +19,11 @@ public class DeviceApplyAllotSaveVo { ...@@ -19,11 +19,11 @@ public class DeviceApplyAllotSaveVo {
@ApiModelProperty(value = "发件方(B岗位)") @ApiModelProperty(value = "发件方(B岗位)")
private Integer sendUserbId; private Integer sendUserbId;
@NotNull(message = "fileName不能为空") // @NotNull(message = "fileName不能为空")
@ApiModelProperty(value = "账单文件名") @ApiModelProperty(value = "账单文件名")
private String fileName; private String fileName;
@NotNull(message = "fileUrl不能为空") // @NotNull(message = "fileUrl不能为空")
@ApiModelProperty(value = "账单文件地址URL") @ApiModelProperty(value = "账单文件地址URL")
private String fileUrl; private String fileUrl;
......
...@@ -23,7 +23,7 @@ class ApiSignatureUtil { ...@@ -23,7 +23,7 @@ class ApiSignatureUtil {
map.forEach((k, v) -> sb.append(k).append("=").append(v).append("&")); map.forEach((k, v) -> sb.append(k).append("=").append(v).append("&"));
String str = sb.toString(); String str = sb.toString();
String message = str.substring(0, str.length() - 1); String message = str.substring(0, str.length() - 1);
log.info("[SHA256] 参数:{}", map.toString()); // log.info("[SHA256] 参数:{}", map.toString());
return sha256_HMAC(message, key).toUpperCase(); return sha256_HMAC(message, key).toUpperCase();
} }
......
...@@ -17,6 +17,13 @@ public class DeviceVo { ...@@ -17,6 +17,13 @@ public class DeviceVo {
private Integer lockStatus; private Integer lockStatus;
@ApiModelProperty(value = "类型")
private Integer type;
private Integer invisibleRange;
private Integer secretLevel;
/** /**
* 型号 * 型号
*/ */
......
...@@ -202,7 +202,12 @@ public class PackingController { ...@@ -202,7 +202,12 @@ public class PackingController {
@ApiOperation(value = "查询父子结构列装") @ApiOperation(value = "查询父子结构列装")
@PostMapping("/select") @PostMapping("/select")
public ResponseEntity selectPack(@RequestBody SelectPack selectPack){ public ResponseEntity selectPack(@RequestBody SelectPack selectPack){
return ResultUtil.success(PageUtil.getPerPage(selectPack.getPage(),selectPack.getSize(),packingLibraryService.getInsertList(selectPack),selectPack.getPageable())); if (selectPack.getContent()==null&&selectPack.getModel()==null&&selectPack.getName()==null&&selectPack.getSecretLevel()==null&&selectPack.getStatus()==null){
return ResultUtil.success(PageUtil.getPerPage(selectPack.getPage(), selectPack.getSize(), packingLibraryService.setOrder(packingLibraryService.getInsertList(selectPack)), selectPack.getPageable()));
}
else {
return ResultUtil.success(PageUtil.getPerPage(selectPack.getPage(), selectPack.getSize(), packingLibraryService.getInsertList(selectPack), selectPack.getPageable()));
}
} }
@ApiOperation(value = "编辑列装型号") @ApiOperation(value = "编辑列装型号")
......
...@@ -197,7 +197,7 @@ public class PackingLibraryServiceImpl implements PackingLibraryService { ...@@ -197,7 +197,7 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
//返回父子结构 //返回父子结构
Map<Integer, PackingLibrary> nodeCollect = Map<Integer, PackingLibrary> nodeCollect =
packingLibraryEntities.stream().collect(Collectors.toMap(PackingLibrary::getId, packingLibrary -> packingLibrary)); packingLibraryEntities.stream().collect(Collectors.toMap(PackingLibrary::getId, packingLibrary -> packingLibrary));
return setOrder(GetTreeUtils.parseTreeFromDown( return GetTreeUtils.parseTreeFromDown(
packingLibraryEntities, packingLibraryEntities,
PackingLibrary::getId, PackingLibrary::getId,
packingLibrary -> Optional.ofNullable(nodeCollect.get(packingLibrary.getPartParentId())), packingLibrary -> Optional.ofNullable(nodeCollect.get(packingLibrary.getPartParentId())),
...@@ -212,7 +212,7 @@ public class PackingLibraryServiceImpl implements PackingLibraryService { ...@@ -212,7 +212,7 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
|| GlobalMap.getDeviceInvisibleRangeMap().get(packingLibrary.getInvisibleRange()).name.contains(content) || GlobalMap.getDeviceInvisibleRangeMap().get(packingLibrary.getInvisibleRange()).name.contains(content)
|| GlobalMap.getDeviceSecretLevelMap().get(packingLibrary.getSecretLevel()).name.contains(content); || GlobalMap.getDeviceSecretLevelMap().get(packingLibrary.getSecretLevel()).name.contains(content);
return isSameModel && isSameName && isSameStatus && isSameSecretLevel && isContainContent; return isSameModel && isSameName && isSameStatus && isSameSecretLevel && isContainContent;
}).sorted(Comparator.comparing(PackingLibrary::getShowOrder,Comparator.nullsLast(Integer::compareTo))).collect(Collectors.toList())); }).sorted(Comparator.comparing(PackingLibrary::getShowOrder,Comparator.nullsLast(Integer::compareTo))).collect(Collectors.toList());
} }
/** /**
......
package com.tykj.dev.device.repair.controller; package com.tykj.dev.device.repair.controller;
import com.tykj.dev.config.swagger.AutoDocument; import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.file.service.FilesUtil;
import com.tykj.dev.device.library.service.DeviceLibraryService; import com.tykj.dev.device.library.service.DeviceLibraryService;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary; import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.repair.repository.RepairSendBillDao; import com.tykj.dev.device.repair.repository.RepairSendBillDao;
...@@ -111,6 +112,7 @@ public class RepairBillSelectController { ...@@ -111,6 +112,7 @@ public class RepairBillSelectController {
//获取装备列表 //获取装备列表
RepairSendBill repairSendBill = repairSendBillDao.findByDeviceRepairBillId(repairBill.getId()); RepairSendBill repairSendBill = repairSendBillDao.findByDeviceRepairBillId(repairBill.getId());
list.add(repairSendBill); list.add(repairSendBill);
repairSendBill.setSendFileList(FilesUtil.stringFileToList(repairSendBill.getSendFiles()));
List<DeviceLibrary> deviceLibraries = new ArrayList<>(); List<DeviceLibrary> deviceLibraries = new ArrayList<>();
if (repairSendBill.getRepairDeviceCheckDetail() != null) { if (repairSendBill.getRepairDeviceCheckDetail() != null) {
String[] strings1 = repairSendBill.getRepairDeviceCheckDetail().split("x"); String[] strings1 = repairSendBill.getRepairDeviceCheckDetail().split("x");
......
package com.tykj.dev.device.repair.subject.domin; package com.tykj.dev.device.repair.subject.domin;
import com.tykj.dev.device.file.entity.FileRet;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -12,6 +13,8 @@ import org.springframework.data.annotation.LastModifiedDate; ...@@ -12,6 +13,8 @@ import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener; import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*; import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;
/** /**
* entity class for repair_send_bill * entity class for repair_send_bill
...@@ -228,4 +231,7 @@ public class RepairSendBill { ...@@ -228,4 +231,7 @@ public class RepairSendBill {
@Column(name = "send_files",columnDefinition = "TEXT") @Column(name = "send_files",columnDefinition = "TEXT")
private String sendFiles; private String sendFiles;
@Transient
private List<FileRet> sendFileList = new ArrayList<>();
} }
...@@ -322,17 +322,18 @@ public class SelfCheckController { ...@@ -322,17 +322,18 @@ public class SelfCheckController {
if (selfExaminationBillEntity1.getUserbId()!=null){ if (selfExaminationBillEntity1.getUserbId()!=null){
userIds.add(selfExaminationBillEntity1.getUserbId()); userIds.add(selfExaminationBillEntity1.getUserbId());
} }
else {
throw new ApiException("审核人不能为空");
}
TaskBto taskBto = new TaskBto(StatusEnum.SELF_CHECK_CONFIRM.id, "自查业务", null, ".", selfExaminationBillEntity1.getId(), 4, userUtils.getCurrentUnitId(), 1, null, userIds); TaskBto taskBto = new TaskBto(StatusEnum.SELF_CHECK_CONFIRM.id, "自查业务", null, ".", selfExaminationBillEntity1.getId(), 4, userUtils.getCurrentUnitId(), 1, null, userIds);
if (selfCheckSaveVo.getType()==0){ if (selfCheckSaveVo.getType()==0){
if (selfCheckSaveVo.getUserbId()==null){
throw new ApiException("审核人不能为空");
}
taskBto.setCustomInfo("手动"); taskBto.setCustomInfo("手动");
taskService.start(taskBto); taskService.start(taskBto);
} }
else if (selfCheckSaveVo.getType()==1){ else if (selfCheckSaveVo.getType()==1){
taskBto.setCustomInfo("扫码"); taskBto.setCustomInfo("扫码");
taskBto.setBillStatus(StatusEnum.END.id); taskBto.setBillStatus(StatusEnum.END.id);
taskBto.setCurrentPoint(0);
taskService.start(taskBto); taskService.start(taskBto);
selfExaminationBillEntity1.setCheckStatus(2); selfExaminationBillEntity1.setCheckStatus(2);
selfExaminationBillService.update(selfExaminationBillEntity1); selfExaminationBillService.update(selfExaminationBillEntity1);
......
...@@ -278,6 +278,7 @@ public class StorageBillController { ...@@ -278,6 +278,7 @@ public class StorageBillController {
MessageBto messageBto = new MessageBto(); MessageBto messageBto = new MessageBto();
messageBto.setContent("发起装备入库"); messageBto.setContent("发起装备入库");
messageBto.setTaskId(taskEntity1.getId()); messageBto.setTaskId(taskEntity1.getId());
messageBto.setIsHighLight(1);
if (storageBillEntity.getReceiveUserB()==null) { if (storageBillEntity.getReceiveUserB()==null) {
messageBto.setInvolveUserIdList(userPublicService.findOtherUser(userId)); messageBto.setInvolveUserIdList(userPublicService.findOtherUser(userId));
} }
......
...@@ -662,7 +662,7 @@ public class TaskServiceImpl implements TaskService { ...@@ -662,7 +662,7 @@ public class TaskServiceImpl implements TaskService {
boolean unitExists = getUnitsByUsers(taskBto.getInvolveUserIdList()).contains(unitId); boolean unitExists = getUnitsByUsers(taskBto.getInvolveUserIdList()).contains(unitId);
boolean userConfirm2 = taskBto.getInvolveUserIdList().get(taskBto.getCurrentPoint()) == -1; boolean userConfirm2 = taskBto.getInvolveUserIdList().get(taskBto.getCurrentPoint()) == -1;
boolean pointExists = taskBto.getCurrentPoint() < taskBto.getInvolveUserIdList().size(); boolean pointExists = taskBto.getCurrentPoint() < taskBto.getInvolveUserIdList().size();
boolean userConfirm = userId.equals(taskBto.getInvolveUserIdList().get(taskBto.getCurrentPoint())); boolean userConfirm = userId.equals(taskBto.getInvolveUserIdList().get(taskBto.getCurrentPoint())) || (taskBto.getInvolveUserIdList().get(taskBto.getCurrentPoint())==0 && taskBto.getOwnUnit().equals(userUtils.getCurrentUnitId()));
boolean isDraft = taskBto.getBillStatus() == 201 || taskBto.getBillStatus() == 333 || taskBto.getBillStatus() == 810 || taskBto.getBillStatus() == 322 || taskBto.getBillStatus() == 722; boolean isDraft = taskBto.getBillStatus() == 201 || taskBto.getBillStatus() == 333 || taskBto.getBillStatus() == 810 || taskBto.getBillStatus() == 322 || taskBto.getBillStatus() == 722;
boolean isCreateUser = userId.equals(taskBto.getCreateUserId()); boolean isCreateUser = userId.equals(taskBto.getCreateUserId());
return unitExists && pointExists && !userConfirm && !userConfirm2 && !isDraft && isCreateUser; return unitExists && pointExists && !userConfirm && !userConfirm2 && !isDraft && isCreateUser;
......
...@@ -146,7 +146,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { ...@@ -146,7 +146,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override @Override
public void configure(WebSecurity web) { public void configure(WebSecurity web) {
//swagger静态资源访问 //swagger静态资源访问
web.ignoring().antMatchers("/v2/api-docs", "/v2/api-docs-ext", "/configuration/ui", "/swagger-resources/**", "/configuration/security", "/swagger-ui/", "/swagger-ui/**", "/swagger-ui.html", "/doc.html", "/webjars/**", "/swagger-resources/configuration/ui", "**/swagge‌​r-ui.html", "/static/**", "/**/index.html", "**/index.html", "/index.html", "/js/**", "/css/**", "/fonds/**", "/img/**","/access/send","/user/s"); web.ignoring().antMatchers("/v2/api-docs", "/v2/api-docs-ext", "/configuration/ui", "/swagger-resources/**", "/configuration/security", "/swagger-ui/", "/swagger-ui/**", "/swagger-ui.html", "/doc.html", "/webjars/**", "/swagger-resources/configuration/ui", "**/swagge‌​r-ui.html", "/static/**", "/**/index.html", "**/index.html", "/index.html", "/js/**", "/css/**", "/fonds/**", "/img/**","/access/send","/user/s","/equip/file/llq/");
} }
@Bean @Bean
......
...@@ -206,11 +206,11 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService { ...@@ -206,11 +206,11 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
} }
//筛选列装 //筛选列装
List<PackingLibrary> packingLibraryEntities = packingLibraryDao.findAll().stream() List<PackingLibrary> packingLibraryEntities = packingLibraryDao.findAll().stream()
.filter(packingLibraryEntity -> packingLibraryEntity.getPackingStatus()!=null&&packingLibraryEntity.getPackingStatus() == 2 && packingLibraryEntity.getCreateTime().after(date) && packingLibraryEntity.getCreateTime().before(date2)) .filter(packingLibraryEntity -> packingLibraryEntity.getPackingStatus()!=null&&packingLibraryEntity.getPackingStatus() == 2 &&packingLibraryEntity.getCreateTime()!=null && packingLibraryEntity.getCreateTime().after(date) && packingLibraryEntity.getCreateTime().before(date2))
.collect(toList()); .collect(toList());
//筛选退装 //筛选退装
List<PackingLibrary> packingLibraryEntities2 = packingLibraryDao.findAll().stream() List<PackingLibrary> packingLibraryEntities2 = packingLibraryDao.findAll().stream()
.filter(packingLibraryEntity -> packingLibraryEntity.getPackingStatus()!=null&&packingLibraryEntity.getPackingStatus() == 3 && packingLibraryEntity.getExitTime().after(date) && packingLibraryEntity.getExitTime().before(date2)) .filter(packingLibraryEntity -> packingLibraryEntity.getPackingStatus()!=null&&packingLibraryEntity.getPackingStatus() == 3 && packingLibraryEntity.getExitTime()!=null&&packingLibraryEntity.getExitTime().after(date) && packingLibraryEntity.getExitTime().before(date2))
.collect(toList()); .collect(toList());
//添加列装数量 //添加列装数量
if (packingLibraryEntities.size() > 0) { if (packingLibraryEntities.size() > 0) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论