Merge remote-tracking branch 'origin/feature/DM/nflg-bom' into feature/DM/nflg-bom

This commit is contained in:
大米 2024-01-17 09:35:09 +08:00
commit d6fa200648
6 changed files with 40 additions and 21 deletions

View File

@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nflg.product.base.core.conmon.util.SessionUtil; import com.nflg.product.base.core.conmon.util.SessionUtil;
import com.nflg.product.base.core.exception.NflgBusinessException; import com.nflg.product.base.core.exception.NflgBusinessException;
import com.nflg.product.bomnew.constant.OptionalBomConstant; import com.nflg.product.bomnew.constant.OptionalBomConstant;
@ -262,7 +263,7 @@ public class OptionalEbomApi extends BaseApi {
@PostMapping("getTmpListPage") @PostMapping("getTmpListPage")
@ApiOperation("暂存方案分页数据") @ApiOperation("暂存方案分页数据")
public ResultVO<IPage<OptionalEbomConfigVO>> getTmpListPage(@RequestBody OptionalEbomConfigListQuery query) { public ResultVO<Page<OptionalEbomConfigVO>> getTmpListPage(@RequestBody OptionalEbomConfigListQuery query) {
query.setCreatedBy(SessionUtil.getUserCode()); query.setCreatedBy(SessionUtil.getUserCode());
return ResultVO.success(this.optionalEbomConfigService.getTmpListPage(query)); return ResultVO.success(this.optionalEbomConfigService.getTmpListPage(query));
} }

View File

@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.digest.MD5; import cn.hutool.crypto.digest.MD5;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nflg.product.base.core.api.BaseApi; import com.nflg.product.base.core.api.BaseApi;
import com.nflg.product.base.core.conmon.util.SessionUtil; import com.nflg.product.base.core.conmon.util.SessionUtil;
import com.nflg.product.base.core.exception.NflgBusinessException; import com.nflg.product.base.core.exception.NflgBusinessException;
@ -60,7 +61,7 @@ public class OptionalMbomApi extends BaseApi {
@PostMapping("getPublishListPage") @PostMapping("getPublishListPage")
@ApiOperation("已发布机型分页数据") @ApiOperation("已发布机型分页数据")
public ResultVO<IPage<OptionalEbomConfigVO>> getPublishListPage(@RequestBody OptionalEbomConfigListQuery query) { public ResultVO<Page<OptionalEbomConfigVO>> getPublishListPage(@RequestBody OptionalEbomConfigListQuery query) {
query.setCreatedBy(SessionUtil.getUserCode()); query.setCreatedBy(SessionUtil.getUserCode());
return ResultVO.success(this.optionalEbomConfigService.getPublishListPage(query)); return ResultVO.success(this.optionalEbomConfigService.getPublishListPage(query));

View File

@ -30,7 +30,7 @@ import java.util.List;
public interface OptionalEbomConfigMapper extends BaseMapper<OptionalEbomConfigEntity> { public interface OptionalEbomConfigMapper extends BaseMapper<OptionalEbomConfigEntity> {
IPage<OptionalEbomConfigVO> getListPage(Page<OptionalEbomConfigEntity> page, @Param("query") OptionalEbomConfigListQuery query); Page<OptionalEbomConfigVO> getListPage(Page<OptionalEbomConfigEntity> page, @Param("query") OptionalEbomConfigListQuery query);
List<OptionalEbomImportChildVO> getTmpOptionList(@Param("rowId") Long rowId); List<OptionalEbomImportChildVO> getTmpOptionList(@Param("rowId") Long rowId);

View File

@ -92,5 +92,16 @@ public class OptionalEbomConfigVO implements Serializable {
@ApiModelProperty(value = "变更时间") @ApiModelProperty(value = "变更时间")
private Date updatedTime; private Date updatedTime;
@ApiModelProperty("物料编码")
private String materialNo;
@ApiModelProperty("物料名称")
private String materialName;
@ApiModelProperty("图号")
private String drawingNo;
@ApiModelProperty("物料描述")
private String materialDesc;
} }

View File

@ -54,10 +54,10 @@ public class OptionalEbomConfigService extends ServiceImpl<OptionalEbomConfigMap
* @param query * @param query
* @return * @return
*/ */
public IPage<OptionalEbomConfigVO> getTmpListPage(OptionalEbomConfigListQuery query) { public Page<OptionalEbomConfigVO> getTmpListPage(OptionalEbomConfigListQuery query) {
query.setEditStatus(0); query.setEditStatus(0);
Page<OptionalEbomConfigEntity> page = new PageVO<>(query.getPage(), query.getPageSize()); Page<OptionalEbomConfigEntity> page = new PageVO<>(query.getPage(), query.getPageSize());
IPage<OptionalEbomConfigVO> list = this.baseMapper.getListPage(page, query); Page<OptionalEbomConfigVO> list = this.baseMapper.getListPage(page, query);
return list; return list;
} }
@ -67,11 +67,11 @@ public class OptionalEbomConfigService extends ServiceImpl<OptionalEbomConfigMap
* @param query * @param query
* @return * @return
*/ */
public IPage<OptionalEbomConfigVO> getPublishListPage(OptionalEbomConfigListQuery query) { public Page<OptionalEbomConfigVO> getPublishListPage(OptionalEbomConfigListQuery query) {
query.setEditStatus(1); query.setEditStatus(1);
Page<OptionalEbomConfigEntity> page = new PageVO<>(query.getPage(), query.getPageSize()); Page<OptionalEbomConfigEntity> page = new PageVO<>(query.getPage(), query.getPageSize());
IPage<OptionalEbomConfigVO> list = this.baseMapper.getListPage(page, query); Page<OptionalEbomConfigVO> list = this.baseMapper.getListPage(page, query);
return list; return list;
} }

View File

@ -20,36 +20,42 @@
</resultMap> </resultMap>
<sql id="Base_Column_List" > <sql id="Base_Column_List" >
row_id,config_no,parent_row_id,device_no,device_name,edit_status,upload_sap_status,remark,dept_name,real_name,created_by,created_time,updated_time row_id,config_no,parent_row_id,device_no,device_name,edit_status,upload_sap_status,remark,dept_name,real_name,created_by,created_time,updated_time
</sql>
</sql>
<!--查询指定行数据--> <!--查询指定行数据-->
<select id="getListPage" resultType="com.nflg.product.bomnew.pojo.vo.OptionalEbomConfigVO" > <select id="getListPage" resultType="com.nflg.product.bomnew.pojo.vo.OptionalEbomConfigVO" >
select select
<include refid="Base_Column_List" /> t1.*,t2.material_no,
t2.material_name,
from t_optional_ebom_config t2. material_desc,
<where> t2.drawing_no
edit_status = #{query.editStatus} from t_optional_ebom_config as t1
left join
t_optional_mbom_material as t2
on t1.row_id=t2.root_row_id
where
t1.edit_status = #{query.editStatus}
<if test="query.editStatus != null and query.editStatus==1">
and t2.parent_row_id=0
</if>
<if test="query.deviceName != null and query.deviceName != ''"> <if test="query.deviceName != null and query.deviceName != ''">
and( device_name like concat('%', '${query.deviceName}', '%') or device_no like concat('%', '${query.deviceName}', '%') ) and( t1.device_name like concat('%', '${query.deviceName}', '%') or t1.device_no like concat('%', '${query.deviceName}', '%') )
</if> </if>
<if test="query.createdBy != null and query.createdBy != ''"> <if test="query.createdBy != null and query.createdBy != ''">
and created_by = #{query.createdBy} and t1.created_by = #{query.createdBy}
</if> </if>
<if test="query.startDate!= null and query.startDate!= '' and query.endDate != null and query.endDate!= '' "> <if test="query.startDate!= null and query.startDate!= '' and query.endDate != null and query.endDate!= '' ">
<![CDATA[and created_time >= #{query.startDate} and created_time <= #{query.endDate} ]]> <![CDATA[and t1.created_time >= #{query.startDate} and t1.created_time <= #{query.endDate} ]]>
</if> </if>
order by t1.created_time desc
</where>
order by created_time desc
</select> </select>