日计划管道气采购结算
This commit is contained in:
@ -1,11 +1,15 @@
|
||||
package com.xjrsoft.module.dayPlan.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngPngSettlePur;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngPngSettlePurVo;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
@ -16,6 +20,13 @@ import org.apache.ibatis.annotations.Select;
|
||||
@Mapper
|
||||
public interface LngPngSettlePurMapper extends MPJBaseMapper<LngPngSettlePur> ,BaseMapper<LngPngSettlePur>{
|
||||
|
||||
@Select("SELECT k.k_name FROM lng_contract k WHERE k.id = #{id}")
|
||||
String getKsNameBygId(@Param("id") Long id);
|
||||
|
||||
@Select("SELECT a.*, cu.cu_sname, sp.full_name AS point_up_name,k.k_name as kp_name" +
|
||||
" FROM lng_png_settle_pur a" +
|
||||
" LEFT JOIN lng_contract k ON k.id=a.kp_id" +
|
||||
" LEFT JOIN lng_customer cu ON cu.cu_code=a.cu_code" +
|
||||
" LEFT JOIN lng_b_station_png sp ON sp.code=a.point_up_code" +
|
||||
" WHERE a.settle_hdr_id = #{id}" +
|
||||
" ORDER BY a.sort")
|
||||
List<LngPngSettlePurVo> queryLngPngSettlePurList(@Param("id")Long id);
|
||||
}
|
||||
|
||||
@ -60,14 +60,15 @@ public class PngSettleHdrPurServiceImpl extends MPJBaseServiceImpl<LngPngSettleH
|
||||
|
||||
@Override
|
||||
public LngPngSettleHdrPurVo getInfoById(Long id) {
|
||||
LngPngSettleHdrPur lngPngSettleHdr = this.getByIdDeep(id);
|
||||
LngPngSettleHdrPur lngPngSettleHdr = this.getById(id);
|
||||
if(lngPngSettleHdr == null) {
|
||||
return null;
|
||||
}
|
||||
LngPngSettleHdrPurVo vo = BeanUtil.toBean(lngPngSettleHdr, LngPngSettleHdrPurVo.class);
|
||||
if(CollectionUtils.isNotEmpty(vo.getLngPngSettlePurList())) {
|
||||
for(LngPngSettlePurVo sp:vo.getLngPngSettlePurList()) {
|
||||
sp.setKsName(lngPngSettlePurMapper.getKsNameBygId(sp.getKsId()));
|
||||
List<LngPngSettlePurVo> lngPngSettlePurList = lngPngSettlePurMapper.queryLngPngSettlePurList(vo.getId());
|
||||
vo.setLngPngSettlePurList(lngPngSettlePurList);
|
||||
if(CollectionUtils.isNotEmpty(lngPngSettlePurList)) {
|
||||
for(LngPngSettlePurVo sp:lngPngSettlePurList) {
|
||||
List<LngPngSettlePurDtlVo> list = lngPngSettlePurDtlMapper.queryDtlList(sp.getId());
|
||||
sp.setLngPngSettlePurDtlList(list);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user