船期管理
This commit is contained in:
@ -114,6 +114,7 @@ public class LngOpsPurInt implements Serializable {
|
||||
@ApiModelProperty("销售区域")
|
||||
private String salesAreaCode;
|
||||
|
||||
|
||||
/**
|
||||
* 我方联系人(缺省登录人编码)
|
||||
*/
|
||||
|
||||
@ -3,7 +3,12 @@ package com.xjrsoft.module.ship.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.ship.entity.LngOpsPurInt;
|
||||
import com.xjrsoft.module.ship.vo.LngOpsPurIntVo;
|
||||
import com.xjrsoft.module.ship.vo.LngOpsSalesIntVo;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
@ -14,4 +19,19 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface LngOpsPurIntMapper extends BaseMapper<LngOpsPurInt> {
|
||||
|
||||
@Select("SELECT ss.*,k.k_name,NVL(com.short_name,com.name) AS comName ,"+
|
||||
" dd_l.name AS long_spot_name, sl.full_name AS sta_name, dd_st.name AS ss_type_name, " +
|
||||
" port.full_name AS port_unloading1_name,lport.full_name AS port_loading1_name" +
|
||||
" FROM lng_ops_pur_int ss " +
|
||||
" LEFT JOIN lng_contract k ON k.id=ss.k_id " +
|
||||
" LEFT JOIN lng_b_port port ON port.code=ss.port_unloading1_code "+
|
||||
" LEFT JOIN lng_b_port lport ON lport.code=ss.port_loading1_code "+
|
||||
" LEFT JOIN xjr_dictionary_item di_l on di_l.code='LNG_LONG' " +
|
||||
" LEFT JOIN xjr_dictionary_detail dd_l on dd_l.item_id=di_l.id AND dd_l.code=ss.long_spot_code " +
|
||||
" LEFT JOIN lng_b_station_lng sl ON sl.code=ss.sta_code " +
|
||||
" LEFT JOIN xjr_dictionary_item di_st on di_st.code='LNG_SHP_S' " +
|
||||
" LEFT JOIN xjr_dictionary_detail dd_st on dd_st.item_id=di_st.id AND dd_st.code=ss.ss_type_code " +
|
||||
" LEFT JOIN xjr_department com on com.id=ss.com_id "+
|
||||
" WHERE ss.id = #{id}")
|
||||
LngOpsPurIntVo getInfoBygId(@Param("id") Long id);
|
||||
}
|
||||
|
||||
@ -3,7 +3,12 @@ package com.xjrsoft.module.ship.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.ship.entity.LngOpsSalesInt;
|
||||
import com.xjrsoft.module.ship.vo.LngOpsSalesIntVo;
|
||||
import com.xjrsoft.module.ship.vo.LngShipScheduleVo;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
@ -13,5 +18,21 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngOpsSalesIntMapper extends BaseMapper<LngOpsSalesInt> {
|
||||
|
||||
@Select("SELECT ss.*,k.k_name,NVL(com.short_name,com.name) AS comName ,"+
|
||||
" dd_l.name AS long_spot_name, sl.full_name AS sta_name, dd_st.name AS ss_type_name, " +
|
||||
" port.full_name AS port_unloading1_name,lport.full_name AS port_loading1_name" +
|
||||
" FROM lng_ops_sales_int ss " +
|
||||
" LEFT JOIN lng_contract k ON k.id=ss.k_id " +
|
||||
" LEFT JOIN lng_b_port port ON port.code=ss.port_unloading1_code "+
|
||||
" LEFT JOIN lng_b_port lport ON lport.code=ss.port_loading1_code "+
|
||||
" LEFT JOIN xjr_dictionary_item di_l on di_l.code='LNG_LONG' " +
|
||||
" LEFT JOIN xjr_dictionary_detail dd_l on dd_l.item_id=di_l.id AND dd_l.code=ss.long_spot_code " +
|
||||
" LEFT JOIN lng_b_station_lng sl ON sl.code=ss.sta_code " +
|
||||
" LEFT JOIN xjr_dictionary_item di_st on di_st.code='LNG_SHP_S' " +
|
||||
" LEFT JOIN xjr_dictionary_detail dd_st on dd_st.item_id=di_st.id AND dd_st.code=ss.ss_type_code " +
|
||||
" LEFT JOIN xjr_department com on com.id=ss.com_id "+
|
||||
" WHERE ss.id = #{id}")
|
||||
LngOpsSalesIntVo getInfoBygId(@Param("id") Long id);
|
||||
|
||||
}
|
||||
|
||||
@ -14,7 +14,6 @@ import com.xjrsoft.module.ship.vo.LngOpsPurIntVo;
|
||||
import com.xjrsoft.module.system.client.IFileClient;
|
||||
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
/**
|
||||
@ -31,11 +30,11 @@ public class OpsPurIntServiceImpl extends ServiceImpl<LngOpsPurIntMapper, LngOps
|
||||
|
||||
@Override
|
||||
public LngOpsPurIntVo getOpsPurIntById(Long id) {
|
||||
LngOpsPurInt lngOpsPurInt = this.getById(id);
|
||||
if (lngOpsPurInt == null) {
|
||||
LngOpsPurIntVo vo = this.baseMapper.getInfoBygId(id);
|
||||
if (vo == null) {
|
||||
throw new BusinessException(BusinessCode.of(10500, "找不到此数据!"));
|
||||
}
|
||||
LngOpsPurIntVo vo = BeanUtil.toBean(lngOpsPurInt, LngOpsPurIntVo.class);
|
||||
|
||||
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_ops_pur_int", "lngFileUploadList", vo.getId());
|
||||
vo.setLngFileUploadList(fileList);
|
||||
return vo;
|
||||
|
||||
@ -8,11 +8,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.pictc.enums.BusinessCode;
|
||||
import com.xjrsoft.common.exception.BusinessException;
|
||||
import com.xjrsoft.module.ship.entity.LngOpsSalesInt;
|
||||
import com.xjrsoft.module.ship.entity.LngShipSchedule;
|
||||
import com.xjrsoft.module.ship.mapper.LngOpsSalesIntMapper;
|
||||
import com.xjrsoft.module.ship.service.IOpsSalesIntService;
|
||||
import com.xjrsoft.module.ship.vo.LngOpsSalesIntVo;
|
||||
import com.xjrsoft.module.ship.vo.LngShipScheduleVo;
|
||||
import com.xjrsoft.module.system.client.IFileClient;
|
||||
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||
|
||||
@ -33,11 +31,11 @@ public class OpsSalesIntServiceImpl extends ServiceImpl<LngOpsSalesIntMapper, Ln
|
||||
|
||||
@Override
|
||||
public LngOpsSalesIntVo getOpsSalesIntById(Long id) {
|
||||
LngOpsSalesInt lngOpsSalesInt = this.getById(id);
|
||||
if (lngOpsSalesInt == null) {
|
||||
LngOpsSalesIntVo vo = this.baseMapper.getInfoBygId(id);
|
||||
if (vo == null) {
|
||||
throw new BusinessException(BusinessCode.of(10500, "找不到此数据!"));
|
||||
}
|
||||
LngOpsSalesIntVo vo = BeanUtil.toBean(lngOpsSalesInt, LngOpsSalesIntVo.class);
|
||||
|
||||
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_ops_sales_int", "lngFileUploadList", vo.getId());
|
||||
vo.setLngFileUploadList(fileList);
|
||||
return vo;
|
||||
|
||||
Reference in New Issue
Block a user