已发布物料查询
This commit is contained in:
parent
d5a4e1b130
commit
cfe463e1f1
|
|
@ -12,12 +12,15 @@ import com.nflg.product.bomnew.pojo.dto.OptionalEbomMainDelDTO;
|
|||
import com.nflg.product.bomnew.pojo.dto.OptionalEbomSubmitEditDTO;
|
||||
import com.nflg.product.bomnew.pojo.query.OptionalEbomConfigListQuery;
|
||||
import com.nflg.product.bomnew.pojo.query.OptionalEbomMainListQuery;
|
||||
import com.nflg.product.bomnew.pojo.query.OptionalMbomMaterialListQuery;
|
||||
import com.nflg.product.bomnew.pojo.vo.OptionalEbomConfigAggregVO;
|
||||
import com.nflg.product.bomnew.pojo.vo.OptionalEbomConfigVO;
|
||||
import com.nflg.product.bomnew.pojo.vo.OptionalEbomMainVO;
|
||||
import com.nflg.product.bomnew.pojo.vo.OptionalMbomMaterialVO;
|
||||
import com.nflg.product.bomnew.service.OptionalEbomConfigService;
|
||||
import com.nflg.product.bomnew.service.OptionalEbomImportChildService;
|
||||
import com.nflg.product.bomnew.service.OptionalEbomMainService;
|
||||
import com.nflg.product.bomnew.service.OptionalMbomMaterialService;
|
||||
import com.nflg.product.bomnew.service.aggreg.AggregOptionConfigService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -53,7 +56,8 @@ public class OptionalMbomApi extends BaseApi {
|
|||
@Resource
|
||||
private OptionalEbomImportChildService optionalEbomImportChildService;
|
||||
|
||||
|
||||
@Resource
|
||||
private OptionalMbomMaterialService optionalMbomMaterialService;
|
||||
|
||||
@PostMapping("getPublishListPage")
|
||||
@ApiOperation("已发布机型分页数据")
|
||||
|
|
@ -65,6 +69,24 @@ public class OptionalMbomApi extends BaseApi {
|
|||
|
||||
|
||||
|
||||
@PostMapping("getMaterialParentList")
|
||||
@ApiOperation("物料分页数据")
|
||||
public ResultVO<IPage<OptionalMbomMaterialVO>> getMaterialParentList(@RequestBody OptionalMbomMaterialListQuery query) {
|
||||
return ResultVO.success(this.optionalMbomMaterialService.getListPage(query));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("getMaterialChildList")
|
||||
@ApiOperation("物料子数据")
|
||||
public ResultVO<List<OptionalMbomMaterialVO>> getMaterialChildList(@ApiParam("父id") @RequestParam("rowId") Long rowId) {
|
||||
return ResultVO.success(this.optionalMbomMaterialService.getChild(rowId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,14 @@ package com.nflg.product.bomnew.mapper.master;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nflg.product.bomnew.pojo.entity.OptionalEbomMainEntity;
|
||||
import com.nflg.product.bomnew.pojo.entity.OptionalMbomMaterialEntity;
|
||||
import com.nflg.product.bomnew.pojo.query.OptionalEbomMainListQuery;
|
||||
import com.nflg.product.bomnew.pojo.query.OptionalMbomMaterialListQuery;
|
||||
import com.nflg.product.bomnew.pojo.vo.OptionalEbomMainVO;
|
||||
import com.nflg.product.bomnew.pojo.vo.OptionalMbomMaterialVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
@ -19,9 +26,10 @@ import java.util.List;
|
|||
*/
|
||||
@Mapper
|
||||
public interface OptionalMbomMaterialMapper extends BaseMapper<OptionalMbomMaterialEntity> {
|
||||
|
||||
|
||||
|
||||
|
||||
IPage<OptionalMbomMaterialVO> getListPage(Page<OptionalMbomMaterialVO> page, @Param("query") OptionalMbomMaterialListQuery query);
|
||||
public List<OptionalMbomMaterialVO> getChild(@Param("rowId") Long rowId);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nflg.product.bomnew.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class OptionalEbomImportExcelDTO {
|
||||
|
||||
private OptionalEbomMainDTO deviceInfo;
|
||||
private List<OptionalEbomImportDTO> optionInfo;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package com.nflg.product.bomnew.pojo.dto;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel("发布")
|
||||
@Accessors(chain = true)
|
||||
public class OptionalEbomPublishDTO<T> implements Serializable {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty(value = "发布数据id")
|
||||
private Long rowId;
|
||||
/**
|
||||
* 根节点id
|
||||
*/
|
||||
@ApiModelProperty(value = "根节点id")
|
||||
private Long rootRowId;
|
||||
/**
|
||||
* 上层id
|
||||
*/
|
||||
@ApiModelProperty(value = "上层id")
|
||||
private Long parentRowId;
|
||||
/**
|
||||
* 选项名
|
||||
*/
|
||||
@ApiModelProperty(value = "选项名")
|
||||
private String optionName;
|
||||
|
||||
@ApiModelProperty(value = "选项图号")
|
||||
private String optionDrawingNo;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -26,16 +26,14 @@ public class OptionalMbomMaterialDTO implements Serializable {
|
|||
*/
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Long rowId;
|
||||
/**
|
||||
* 父表Id (t_optional_ebom_config )
|
||||
*/
|
||||
@ApiModelProperty(value = "父表Id (t_optional_ebom_config )")
|
||||
|
||||
@ApiModelProperty(value = "上层id")
|
||||
private Long parentRowId;
|
||||
/**
|
||||
* 上层id
|
||||
*/
|
||||
@ApiModelProperty(value = "上层id")
|
||||
private Long levelRowId;
|
||||
@ApiModelProperty(value = "根id")
|
||||
private Long rootRowId;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -32,17 +32,17 @@ public class OptionalMbomMaterialEntity implements Serializable {
|
|||
|
||||
|
||||
/**
|
||||
* 父表Id (t_optional_ebom_config )
|
||||
*
|
||||
*/
|
||||
@TableField(value = "parent_row_id")
|
||||
@ApiModelProperty(value = "父表Id (t_optional_ebom_config )")
|
||||
@ApiModelProperty(value = "上层Id ")
|
||||
private Long parentRowId;
|
||||
/**
|
||||
* 上层id
|
||||
*/
|
||||
@TableField(value = "level_row_id")
|
||||
@ApiModelProperty(value = "上层id")
|
||||
private Long levelRowId;
|
||||
@TableField(value = "root_row_id")
|
||||
@ApiModelProperty(value = "根id")
|
||||
private Long rootRowId;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
package com.nflg.product.bomnew.pojo.query;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ApiModel("选配方案清单")
|
||||
@Accessors(chain = true)
|
||||
public class OptionalMbomMaterialListQuery extends BasePageQuery implements Serializable {
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private Date startTime;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@ApiModelProperty(value = "物料编码")
|
||||
private String materialNo;
|
||||
|
||||
/**
|
||||
* 图号
|
||||
*/
|
||||
@ApiModelProperty(value = "图号")
|
||||
private String drawingNo;
|
||||
|
||||
}
|
||||
|
|
@ -3,38 +3,71 @@ package com.nflg.product.bomnew.pojo.query;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ApiModel("mbom发布生成的物料信息")
|
||||
@Accessors(chain = true)
|
||||
public class OptionalMbomMaterialQuery implements Serializable {
|
||||
/**主键*/ @ApiModelProperty(value = "主键")
|
||||
public class OptionalMbomMaterialQuery implements Serializable {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Long rowId;
|
||||
/**父表Id (t_optional_ebom_config )*/ @ApiModelProperty(value = "父表Id (t_optional_ebom_config )")
|
||||
|
||||
@ApiModelProperty(value = "上层id")
|
||||
private Long parentRowId;
|
||||
/**上层id*/ @ApiModelProperty(value = "上层id")
|
||||
private Long levelRowId;
|
||||
/**物料编码*/ @ApiModelProperty(value = "物料编码")
|
||||
/**
|
||||
* 上层id
|
||||
*/
|
||||
@ApiModelProperty(value = "根id")
|
||||
private Long rootRowId;;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@ApiModelProperty(value = "物料编码")
|
||||
private String materialNo;
|
||||
/**物料名*/ @ApiModelProperty(value = "物料名")
|
||||
/**
|
||||
* 物料名
|
||||
*/
|
||||
@ApiModelProperty(value = "物料名")
|
||||
private String materialName;
|
||||
/**物料描述*/ @ApiModelProperty(value = "物料描述")
|
||||
/**
|
||||
* 物料描述
|
||||
*/
|
||||
@ApiModelProperty(value = "物料描述")
|
||||
private String materialDesc;
|
||||
/**图号*/ @ApiModelProperty(value = "图号")
|
||||
/**
|
||||
* 图号
|
||||
*/
|
||||
@ApiModelProperty(value = "图号")
|
||||
private String drawingNo;
|
||||
/**备注*/ @ApiModelProperty(value = "备注")
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remak;
|
||||
/**创建时间*/ @ApiModelProperty(value = "创建时间")
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createdTime;
|
||||
/**操作人编码*/ @ApiModelProperty(value = "操作人编码")
|
||||
/**
|
||||
* 操作人编码
|
||||
*/
|
||||
@ApiModelProperty(value = "操作人编码")
|
||||
private String createdBy;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,39 +3,105 @@ package com.nflg.product.bomnew.pojo.vo;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ApiModel("mbom发布生成的物料信息")
|
||||
@Accessors(chain = true)
|
||||
public class OptionalMbomMaterialVO implements Serializable {
|
||||
/**主键*/ @ApiModelProperty(value = "主键")
|
||||
public class OptionalMbomMaterialVO implements Serializable {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Long rowId;
|
||||
/**父表Id (t_optional_ebom_config )*/ @ApiModelProperty(value = "父表Id (t_optional_ebom_config )")
|
||||
/**
|
||||
* 父表Id (t_optional_ebom_config )
|
||||
*/
|
||||
@ApiModelProperty(value = "上层id")
|
||||
private Long parentRowId;
|
||||
/**上层id*/ @ApiModelProperty(value = "上层id")
|
||||
private Long levelRowId;
|
||||
/**物料编码*/ @ApiModelProperty(value = "物料编码")
|
||||
/**
|
||||
* 上层id
|
||||
*/
|
||||
@ApiModelProperty(value = "根id")
|
||||
private Long rootRowId;;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@ApiModelProperty(value = "物料编码")
|
||||
private String materialNo;
|
||||
/**物料名*/ @ApiModelProperty(value = "物料名")
|
||||
/**
|
||||
* 物料名
|
||||
*/
|
||||
@ApiModelProperty(value = "物料名")
|
||||
private String materialName;
|
||||
/**物料描述*/ @ApiModelProperty(value = "物料描述")
|
||||
/**
|
||||
* 物料描述
|
||||
*/
|
||||
@ApiModelProperty(value = "物料描述")
|
||||
private String materialDesc;
|
||||
/**图号*/ @ApiModelProperty(value = "图号")
|
||||
/**
|
||||
* 图号
|
||||
*/
|
||||
@ApiModelProperty(value = "图号")
|
||||
private String drawingNo;
|
||||
/**备注*/ @ApiModelProperty(value = "备注")
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remak;
|
||||
/**创建时间*/ @ApiModelProperty(value = "创建时间")
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createdTime;
|
||||
/**操作人编码*/ @ApiModelProperty(value = "操作人编码")
|
||||
/**
|
||||
* 操作人编码
|
||||
*/
|
||||
@ApiModelProperty(value = "操作人编码")
|
||||
private String createdBy;
|
||||
|
||||
/**
|
||||
* 机型编号
|
||||
*/
|
||||
@ApiModelProperty(value = "机型编号")
|
||||
private String deviceNo;
|
||||
/**
|
||||
* 机型名称
|
||||
*/
|
||||
@ApiModelProperty(value = "机型名称")
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 是否导入sap(0 :否 1: 是)
|
||||
*/
|
||||
@ApiModelProperty(value = "是否导入sap(0 :否 1: 是)")
|
||||
private Integer uploadSapStatus;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
private String deptName;
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty(value = "部门id")
|
||||
private Long deptRowId;
|
||||
/**
|
||||
* 操作人姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "操作人姓名")
|
||||
private String realName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,41 @@
|
|||
package com.nflg.product.bomnew.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import com.nflg.product.base.core.vo.PageVO;
|
||||
import com.nflg.product.bomnew.mapper.master.OptionalMbomMaterialMapper;
|
||||
|
||||
import com.nflg.product.bomnew.pojo.entity.OptionalMbomMaterialEntity;
|
||||
import com.nflg.product.bomnew.service.OptionalMbomMaterialService;
|
||||
|
||||
import com.nflg.product.bomnew.pojo.query.OptionalMbomMaterialListQuery;
|
||||
|
||||
import com.nflg.product.bomnew.pojo.vo.OptionalMbomMaterialVO;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* mbom发布生成的物料信息(OptionalMbomMaterial)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-26 22:24:13
|
||||
|
||||
*/
|
||||
@Service
|
||||
public class OptionalMbomMaterialService extends ServiceImpl<OptionalMbomMaterialMapper, OptionalMbomMaterialEntity > {
|
||||
|
||||
|
||||
public IPage<OptionalMbomMaterialVO> getListPage(OptionalMbomMaterialListQuery query) {
|
||||
|
||||
IPage<OptionalMbomMaterialVO> list = this.getBaseMapper().getListPage(new Page<>(query.getPage(), query.getPageSize()), query);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<OptionalMbomMaterialVO> getChild(Long rowId) {
|
||||
return this.getBaseMapper().getChild(rowId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,12 @@ import cn.hutool.core.collection.ListUtil;
|
|||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.lang.TypeReference;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nflg.product.bomnew.constant.OptionalBomConstant;
|
||||
import com.nflg.product.bomnew.pojo.dto.OptionalEbomConfigDTO;
|
||||
import com.nflg.product.bomnew.pojo.dto.OptionalEbomSubmitEditDTO;
|
||||
import com.nflg.product.bomnew.pojo.entity.OptionalEbomConfigEntity;
|
||||
import com.nflg.product.bomnew.pojo.entity.OptionalEbomConfigREntity;
|
||||
import com.nflg.product.bomnew.pojo.entity.OptionalEbomImportChildEntity;
|
||||
import com.nflg.product.bomnew.pojo.entity.OptionalEbomMainEntity;
|
||||
import com.nflg.product.bomnew.pojo.vo.*;
|
||||
|
|
@ -83,7 +85,7 @@ public class AggregOptionConfigService {
|
|||
for (; iter.hasNext(); ) {
|
||||
|
||||
OptionalEbomImportVO node = iter.next();
|
||||
if (tree.getRowId() == node.getParentRowId()) {
|
||||
if (tree.getRowId().equals(node.getParentRowId()) ) {
|
||||
tree.getChild().add(node);
|
||||
|
||||
}
|
||||
|
|
@ -108,6 +110,7 @@ public class AggregOptionConfigService {
|
|||
for (OptionalEbomImportVO parent :
|
||||
listParent) {
|
||||
List<OptionalEbomImportVO> childList = parent.getChild();
|
||||
|
||||
for (OptionalEbomImportVO childVO :
|
||||
childList) {
|
||||
|
||||
|
|
@ -208,14 +211,18 @@ public class AggregOptionConfigService {
|
|||
*/
|
||||
public Boolean submiTmpOptionTree(OptionalEbomConfigDTO dto) {
|
||||
|
||||
OptionalEbomConfigEntity entity= optionalEbomConfigService.getById(dto.getRowId());
|
||||
OptionalEbomConfigEntity optionalEbomConfigEntity =new OptionalEbomConfigEntity();
|
||||
optionalEbomConfigEntity.setRowId(dto.getRowId());
|
||||
optionalEbomConfigEntity.setRemark(dto.getRemark());
|
||||
|
||||
optionalEbomConfigEntity.setUpdatedTime(new Date());
|
||||
optionalEbomConfigService.updateById(optionalEbomConfigEntity);
|
||||
|
||||
return optionalEbomConfigService.insertConfigRelation(dto.getRowId(),dto.getOptions());
|
||||
if(entity.getEditStatus()==OptionalBomConstant.PublishEnum.TMP.getValue()) {
|
||||
return optionalEbomConfigService.insertConfigRelation(dto.getRowId(), dto.getOptions());
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -242,4 +249,12 @@ public class AggregOptionConfigService {
|
|||
return tmpVo;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
<mapper namespace="com.nflg.product.bomnew.mapper.master.OptionalMbomMaterialMapper">
|
||||
|
||||
<resultMap type="com.nflg.product.bomnew.pojo.entity.OptionalMbomMaterialEntity" id="OptionalMbomMaterialMap">
|
||||
<result property="rowId" column="row_id" jdbcType="INTEGER"/>
|
||||
<result property="parentRowId" column="parent_row_id" jdbcType="INTEGER"/>
|
||||
<result property="levelRowId" column="level_row_id" jdbcType="INTEGER"/>
|
||||
<result property="rowId" column="row_id" jdbcType="BIGINT"/>
|
||||
<result property="parentRowId" column="parent_row_id" jdbcType="BIGINT"/>
|
||||
<result property="rootRowId" column="root_row_id" jdbcType="BIGINT"/>
|
||||
<result property="materialNo" column="material_no" jdbcType="VARCHAR"/>
|
||||
<result property="materialName" column="material_name" jdbcType="VARCHAR"/>
|
||||
<result property="materialDesc" column="material_desc" jdbcType="VARCHAR"/>
|
||||
|
|
@ -16,10 +16,86 @@
|
|||
</resultMap>
|
||||
<sql id="Base_Column_List" >
|
||||
row_id,parent_row_id,level_row_id,material_no,material_name,material_desc,drawing_no,remak,created_time,created_by,
|
||||
</sql>
|
||||
|
||||
</sql>
|
||||
|
||||
<!-- <select id="getListPage" resultType="com.nflg.product.bomnew.pojo.vo.OptionalMbomMaterialVO" >-->
|
||||
<!-- select-->
|
||||
<!-- t1.*-->
|
||||
<!-- from t_optional_mbom_material as t1-->
|
||||
|
||||
|
||||
<!-- <where>-->
|
||||
<!-- t1.parent_row_id is null-->
|
||||
|
||||
<!-- <if test="query.materialNo != null and query.materialNo != ''">-->
|
||||
<!-- and t1.material_no like concat('%', '${query.materialNo}', '%')-->
|
||||
<!-- </if>-->
|
||||
|
||||
|
||||
<!-- <if test="query.drawingNo != null">-->
|
||||
<!-- and t1.drawing_no like concat('%', '${query.drawingNo}', '%')-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- <if test="query.startTime != null and query.endTime != null">-->
|
||||
<!-- <![CDATA[ and t1.created_time >= #{query.startTime} and t1.created_time < #{query.endTime}]]>-->
|
||||
<!-- </if>-->
|
||||
|
||||
|
||||
<!-- </where>-->
|
||||
|
||||
<!-- order by t1.created_time DESC-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="getListPage" resultType="com.nflg.product.bomnew.pojo.vo.OptionalMbomMaterialVO" >
|
||||
select
|
||||
t1.*,t2.device_name,
|
||||
t2.device_no,
|
||||
t2.upload_sap_status,
|
||||
t2.dept_name,
|
||||
t2.real_name
|
||||
from t_optional_mbom_material as t1
|
||||
left join t_optional_ebom_config as t2
|
||||
on t1.root_row_id=t2.row_id
|
||||
|
||||
<where>
|
||||
t1.parent_row_id is null
|
||||
|
||||
<if test="query.materialNo != null and query.materialNo != ''">
|
||||
and t1.material_no like concat('%', '${query.materialNo}', '%')
|
||||
</if>
|
||||
|
||||
|
||||
<if test="query.drawingNo != null">
|
||||
and t1.drawing_no like concat('%', '${query.drawingNo}', '%')
|
||||
</if>
|
||||
|
||||
<if test="query.startTime != null and query.endTime != null">
|
||||
<![CDATA[ and t1.created_time >= #{query.startTime} and t1.created_time < #{query.endTime}]]>
|
||||
</if>
|
||||
|
||||
|
||||
</where>
|
||||
|
||||
order by t1.created_time DESC
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getChild" resultType="com.nflg.product.bomnew.pojo.vo.OptionalMbomMaterialVO" >
|
||||
select
|
||||
t1.*,t2.device_name,
|
||||
t2.device_no,
|
||||
t2.upload_sap_status,
|
||||
t2.dept_name,
|
||||
t2.real_name
|
||||
from t_optional_mbom_material as t1
|
||||
left join t_optional_ebom_config as t2
|
||||
on t1.root_row_id=t2.row_id
|
||||
|
||||
where t1.parent_row_id=#{rowId}
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue