|
|
|
@ -278,4 +278,37 @@ public class RedInformationServiceImpl implements RedInformationService { |
|
|
|
|
return AjaxResult.success(pageFindRedWordVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 功能描述: 红字信息明细查询 |
|
|
|
|
* @param id |
|
|
|
|
* @return : com.jianshui.common.core.domain.AjaxResult |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public AjaxResult findRedWordDetail(Long id) { |
|
|
|
|
if (id == null){ |
|
|
|
|
return AjaxResult.error(ExceptionInformationConstants.REDWORDINFOISEMPT); |
|
|
|
|
} |
|
|
|
|
Redinfo redinfo = redinfoMapper.selectRedinfoById(id); |
|
|
|
|
if (redinfo == null){ |
|
|
|
|
return AjaxResult.error(ExceptionInformationConstants.NOTFINREDWORDINFO); |
|
|
|
|
} |
|
|
|
|
//封装红字信息返回
|
|
|
|
|
RedWordDTO redWordDTO = new RedWordDTO(); |
|
|
|
|
BeanUtils.copyProperties(redinfo,redWordDTO); |
|
|
|
|
redWordDTO.setStatus(RedWordConstants.NOTTAXINVOICE); |
|
|
|
|
redWordDTO.setTotalMoney(redinfo.getTaxfreeamt()); |
|
|
|
|
//封装红字信息详情
|
|
|
|
|
List<Redinfodetail> redinfodetailList = redinfo.getRedinfodetailList(); |
|
|
|
|
List<RedinfodetailDTO> redinfodetailDTOS = new ArrayList<>(); |
|
|
|
|
for (Redinfodetail redinfodetail : redinfodetailList) { |
|
|
|
|
RedinfodetailDTO redinfodetailDTO = new RedinfodetailDTO(); |
|
|
|
|
BeanUtils.copyProperties(redinfodetail,redinfodetailDTO); |
|
|
|
|
redinfodetailDTO.setCost(redinfodetail.getPrice()); |
|
|
|
|
redinfodetailDTO.setMoney(redinfodetail.getTaxfreeamt()); |
|
|
|
|
redinfodetailDTOS.add(redinfodetailDTO); |
|
|
|
|
} |
|
|
|
|
redWordDTO.setRedinfodetailList(redinfodetailDTOS); |
|
|
|
|
return AjaxResult.success(redWordDTO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|