|
|
|
@ -3,6 +3,7 @@ package com.palnet.biz.api.bas.dron.service;
|
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Optional; |
|
|
|
|
|
|
|
|
|
import com.palnet.comn.utils.EncryptUtils; |
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
@ -52,7 +53,13 @@ public class BasDronService {
|
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
public List<BasIdntfModel> listIdntf(int arcrftSno){ |
|
|
|
|
|
|
|
|
|
List<BasIdntfModel> resultList = query.idntfList(arcrftSno); |
|
|
|
|
|
|
|
|
|
for(BasIdntfModel model : resultList){ |
|
|
|
|
model.setHpno(EncryptUtils.decrypt(model.getHpno())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return resultList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -146,9 +153,8 @@ public class BasDronService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(BasIdntfModel model : rq.getData() ) { |
|
|
|
|
|
|
|
|
|
Optional<ComIdntfBas> optional = comIdntBasRepository.findById(model.getIdntfNum()); |
|
|
|
|
|
|
|
|
|
String hpno = EncryptUtils.encrypt(model.getHpno()); |
|
|
|
|
if (optional.isPresent()) { |
|
|
|
|
throw new CustomException(ErrorCode.DATA_DUPLICATE); |
|
|
|
|
} |
|
|
|
@ -156,6 +162,7 @@ public class BasDronService {
|
|
|
|
|
ComIdntfBas entity = new ComIdntfBas(); |
|
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(model , entity); |
|
|
|
|
entity.setHpno(hpno); |
|
|
|
|
entity.setArcrftSno(rq.getArcrftSno()); |
|
|
|
|
entity.setCreateDt(DateUtils.nowDate()); |
|
|
|
|
entity.setUpdateDt(DateUtils.nowDate()); |
|
|
|
|