update 生产订单、生产计划优化查询

master
yinq 1 week ago
parent 943ce88340
commit 4283e3f34c

@ -114,4 +114,14 @@ public class BaseClassTeamInfoController extends BaseController {
public R<List<BaseClassTeamInfoVo>>selectClassTeamList(BaseClassTeamInfoBo bo, PageQuery pageQuery) {
return R.ok(baseClassTeamInfoService.queryList(bo));
}
/**
*
*/
@GetMapping("getBaseClassTeamInfoList")
public R<List<BaseClassTeamInfoVo>> getBaseClassTeamInfolist(BaseClassTeamInfoBo bo) {
List<BaseClassTeamInfoVo> list = baseClassTeamInfoService.queryList(bo);
return R.ok(list);
}
}

@ -36,6 +36,13 @@ public class ProdOrderInfoVo implements Serializable {
@ExcelProperty(value = "主键标识")
private Long productOrderId;
/**
*
*/
@ExcelProperty(value = "租户编号")
private String tenantId;
/**
*
*/
@ -205,5 +212,36 @@ public class ProdOrderInfoVo implements Serializable {
@ExcelProperty(value = "备注")
private String remark;
/**
*
*/
@ExcelProperty(value = "创建部门")
private Long createDept;
/**
*
*/
@ExcelProperty(value = "创建人")
private Long createBy;
/**
*
*/
@ExcelProperty(value = "创建时间")
private Date createTime;
/**
*
*/
@ExcelProperty(value = "更新人")
private Long updateBy;
/**
*
*/
@ExcelProperty(value = "更新时间")
private Date updateTime;
private String materialName;
}

@ -222,5 +222,9 @@ public class ProdPlanInfoVo implements Serializable {
@ExcelProperty(value = "备注")
private String remark;
private String materialCode;
private String materialName;
private String processName;
private String shiftName;
private String teamName;
}

@ -1,9 +1,16 @@
package org.dromara.mes.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.dromara.mes.domain.ProdOrderInfo;
import org.dromara.mes.domain.bo.ProdOrderInfoBo;
import org.dromara.mes.domain.vo.ProdOrderInfoVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
import java.util.List;
/**
* Mapper
*
@ -12,4 +19,14 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
*/
public interface ProdOrderInfoMapper extends BaseMapperPlus<ProdOrderInfo, ProdOrderInfoVo> {
/**
* ;
* @param page
* @param queryWrapper
* @return
*/
public Page<ProdOrderInfoVo> selectProdOrderInfoList(@Param("page") Page<ProdOrderInfoVo> page, @Param(Constants.WRAPPER) Wrapper<ProdOrderInfo> queryWrapper);
}

@ -1,6 +1,12 @@
package org.dromara.mes.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.dromara.mes.domain.ProdOrderInfo;
import org.dromara.mes.domain.ProdPlanInfo;
import org.dromara.mes.domain.vo.ProdOrderInfoVo;
import org.dromara.mes.domain.vo.ProdPlanInfoVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
@ -12,4 +18,13 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
*/
public interface ProdPlanInfoMapper extends BaseMapperPlus<ProdPlanInfo, ProdPlanInfoVo> {
/**
*
* @param page
* @param queryWrapper
* @return
*/
public Page<ProdPlanInfoVo> selectProdPlanInfoList(@Param("page") Page<ProdPlanInfoVo> page, @Param(Constants.WRAPPER) Wrapper<ProdPlanInfo> queryWrapper);
}

@ -1,6 +1,5 @@
package org.dromara.mes.service;
import org.dromara.mes.domain.ProdOrderInfo;
import org.dromara.mes.domain.vo.ProdOrderInfoVo;
import org.dromara.mes.domain.bo.ProdOrderInfoBo;
import org.dromara.common.mybatis.core.page.TableDataInfo;

@ -7,7 +7,6 @@ import org.dromara.common.mybatis.core.page.PageQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.toolkit.JoinWrappers;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.dromara.mes.domain.bo.ProdOrderInfoBo;
@ -53,7 +52,7 @@ public class ProdOrderInfoServiceImpl implements IProdOrderInfoService {
@Override
public TableDataInfo<ProdOrderInfoVo> queryPageList(ProdOrderInfoBo bo, PageQuery pageQuery) {
MPJLambdaWrapper<ProdOrderInfo> lqw = buildQueryWrapper(bo);
Page<ProdOrderInfoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
Page<ProdOrderInfoVo> result = baseMapper.selectProdOrderInfoList(pageQuery.build(), lqw);
return TableDataInfo.build(result);
}

@ -7,7 +7,6 @@ import org.dromara.common.mybatis.core.page.PageQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.toolkit.JoinWrappers;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.dromara.mes.domain.bo.ProdPlanInfoBo;
@ -53,7 +52,7 @@ public class ProdPlanInfoServiceImpl implements IProdPlanInfoService {
@Override
public TableDataInfo<ProdPlanInfoVo> queryPageList(ProdPlanInfoBo bo, PageQuery pageQuery) {
MPJLambdaWrapper<ProdPlanInfo> lqw = buildQueryWrapper(bo);
Page<ProdPlanInfoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
Page<ProdPlanInfoVo> result = baseMapper.selectProdPlanInfoList(pageQuery.build(), lqw);
return TableDataInfo.build(result);
}

@ -1,7 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.mes.mapper.ProdOrderInfoMapper">
<select id="selectProdOrderInfoList" parameterType="ProdOrderInfoBo" resultType="ProdOrderInfoVo">
select
<if test="ew.getSqlSelect != null">
${ew.getSqlSelect},
bmi.material_name
</if>
<if test="ew.getSqlSelect == null">
*
</if>
from prod_order_info t
left join base_material_info bmi on bmi.material_id = t.material_id
${ew.getCustomSqlSegment}
</select>
</mapper>

@ -4,4 +4,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.mes.mapper.ProdPlanInfoMapper">
<select id="selectProdPlanInfoList" parameterType="ProdPlanInfoBo" resultType="ProdPlanInfoVo">
select
<if test="ew.getSqlSelect != null">
${ew.getSqlSelect},
bmi.material_code,
bmi.material_name,
pbpi.process_name,
bsi.shift_name,
bcti.team_name
</if>
<if test="ew.getSqlSelect == null">
*
</if>
from prod_plan_info t
left join base_material_info bmi on bmi.material_id = t.material_id
left join prod_base_process_info pbpi on pbpi.process_id = t.process_id
left join base_shift_info bsi on bsi.shift_id = t.shift_id
left join base_class_team_info bcti on bcti.class_team_id = t.class_team_id
${ew.getCustomSqlSegment}
</select>
</mapper>

Loading…
Cancel
Save