日计划管道气采购结算
This commit is contained in:
@ -91,7 +91,7 @@ public class LngPngSettlePurVo extends com.xjrsoft.common.model.base.BaseModel{
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty("供应商(从lng_png_sales_pur带)")
|
@ApiModelProperty("供应商(从lng_png_sales_pur带)")
|
||||||
private String suCode;
|
private String suCode;
|
||||||
|
private String suName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合同主键(从lng_png_sales_pur带)
|
* 合同主键(从lng_png_sales_pur带)
|
||||||
@ -99,6 +99,8 @@ public class LngPngSettlePurVo extends com.xjrsoft.common.model.base.BaseModel{
|
|||||||
@ApiModelProperty("合同主键(从lng_png_sales_pur带)")
|
@ApiModelProperty("合同主键(从lng_png_sales_pur带)")
|
||||||
private Long kpId;
|
private Long kpId;
|
||||||
|
|
||||||
|
private String kpName;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合同-国内采购-管道气-上载点主键(从lng_png_sales_pur带)
|
* 合同-国内采购-管道气-上载点主键(从lng_png_sales_pur带)
|
||||||
@ -111,9 +113,9 @@ public class LngPngSettlePurVo extends com.xjrsoft.common.model.base.BaseModel{
|
|||||||
* 上载点(从lng_png_sales_pur带)
|
* 上载点(从lng_png_sales_pur带)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("上载点(从lng_png_sales_pur带)")
|
@ApiModelProperty("上载点(从lng_png_sales_pur带)")
|
||||||
@Trans(type = TransType.LNG_STATION, transToFieldName = "pointDelyName")
|
//@Trans(type = TransType.LNG_STATION, transToFieldName = "pointUpName")
|
||||||
private String pointUpCode;
|
private String pointUpCode;
|
||||||
private String pointDelyName;
|
private String pointUpName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主计量单位(从lng_png_sales_pur带)
|
* 主计量单位(从lng_png_sales_pur带)
|
||||||
@ -125,9 +127,9 @@ public class LngPngSettlePurVo extends com.xjrsoft.common.model.base.BaseModel{
|
|||||||
* 客户(从lng_png_sales带)
|
* 客户(从lng_png_sales带)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("客户(从lng_png_sales带)")
|
@ApiModelProperty("客户(从lng_png_sales带)")
|
||||||
@Trans(type = TransType.CUSTOMER, transToFieldName = "cuName")
|
//@Trans(type = TransType.CUSTOMER, transToFieldName = "cuName")
|
||||||
private String cuCode;
|
private String cuCode;
|
||||||
private String cuName;
|
private String cuSname;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
package com.xjrsoft.module.dayPlan.mapper;
|
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.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.github.yulichang.base.MPJBaseMapper;
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
import com.xjrsoft.module.dayPlan.entity.LngPngSettlePur;
|
import com.xjrsoft.module.dayPlan.entity.LngPngSettlePur;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import com.xjrsoft.module.dayPlan.vo.LngPngSettlePurVo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import org.apache.ibatis.annotations.Select;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title: mapper
|
* @title: mapper
|
||||||
@ -16,6 +20,13 @@ import org.apache.ibatis.annotations.Select;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface LngPngSettlePurMapper extends MPJBaseMapper<LngPngSettlePur> ,BaseMapper<LngPngSettlePur>{
|
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
|
@Override
|
||||||
public LngPngSettleHdrPurVo getInfoById(Long id) {
|
public LngPngSettleHdrPurVo getInfoById(Long id) {
|
||||||
LngPngSettleHdrPur lngPngSettleHdr = this.getByIdDeep(id);
|
LngPngSettleHdrPur lngPngSettleHdr = this.getById(id);
|
||||||
if(lngPngSettleHdr == null) {
|
if(lngPngSettleHdr == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
LngPngSettleHdrPurVo vo = BeanUtil.toBean(lngPngSettleHdr, LngPngSettleHdrPurVo.class);
|
LngPngSettleHdrPurVo vo = BeanUtil.toBean(lngPngSettleHdr, LngPngSettleHdrPurVo.class);
|
||||||
if(CollectionUtils.isNotEmpty(vo.getLngPngSettlePurList())) {
|
List<LngPngSettlePurVo> lngPngSettlePurList = lngPngSettlePurMapper.queryLngPngSettlePurList(vo.getId());
|
||||||
for(LngPngSettlePurVo sp:vo.getLngPngSettlePurList()) {
|
vo.setLngPngSettlePurList(lngPngSettlePurList);
|
||||||
sp.setKsName(lngPngSettlePurMapper.getKsNameBygId(sp.getKsId()));
|
if(CollectionUtils.isNotEmpty(lngPngSettlePurList)) {
|
||||||
|
for(LngPngSettlePurVo sp:lngPngSettlePurList) {
|
||||||
List<LngPngSettlePurDtlVo> list = lngPngSettlePurDtlMapper.queryDtlList(sp.getId());
|
List<LngPngSettlePurDtlVo> list = lngPngSettlePurDtlMapper.queryDtlList(sp.getId());
|
||||||
sp.setLngPngSettlePurDtlList(list);
|
sp.setLngPngSettlePurDtlList(list);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user