Merge remote-tracking branch 'origin/0.8.X' into 0.8.X
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
package com.klp.controller;
|
package com.klp.controller;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@@ -9,7 +8,6 @@ import com.klp.domain.vo.*;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import com.klp.common.annotation.RepeatSubmit;
|
import com.klp.common.annotation.RepeatSubmit;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class WmsSchedulePlanDetail extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 批次id
|
* 批次id
|
||||||
*/
|
*/
|
||||||
private Long batchId;
|
private Long taskId;
|
||||||
/**
|
/**
|
||||||
* 产品ID
|
* 产品ID
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -36,9 +36,9 @@ public class WmsSchedulePlanDetailBo extends BaseEntity {
|
|||||||
private Long lineId;
|
private Long lineId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批次id
|
* 生产任务ID(原批次id)
|
||||||
*/
|
*/
|
||||||
private Long batchId;
|
private Long taskId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 产品ID
|
* 产品ID
|
||||||
|
|||||||
@@ -41,10 +41,10 @@ public class WmsSchedulePlanDetailVo {
|
|||||||
private Long lineId;
|
private Long lineId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批次id
|
* 生产任务id(原批次id)
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "批次id")
|
@ExcelProperty(value = "生产任务id")
|
||||||
private Long batchId;
|
private Long taskId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 产品ID
|
* 产品ID
|
||||||
@@ -108,4 +108,15 @@ public class WmsSchedulePlanDetailVo {
|
|||||||
@ExcelProperty(value = "批次号")
|
@ExcelProperty(value = "批次号")
|
||||||
private String batchNo;
|
private String batchNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计划名称")
|
||||||
|
private String planName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划编码
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计划编码")
|
||||||
|
private String planCode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,4 +22,6 @@ public interface WmsSchedulePlanDetailMapper extends BaseMapperPlus<WmsScheduleP
|
|||||||
List<PlanTimeAgg> selectPlanTimeAgg(@Param("planIds") List<Long> planIds);
|
List<PlanTimeAgg> selectPlanTimeAgg(@Param("planIds") List<Long> planIds);
|
||||||
|
|
||||||
Page<WmsSchedulePlanDetailVo> selectVoPagePlus(Page<Object> build,@Param("ew") QueryWrapper<WmsSchedulePlanDetail> lqw);
|
Page<WmsSchedulePlanDetailVo> selectVoPagePlus(Page<Object> build,@Param("ew") QueryWrapper<WmsSchedulePlanDetail> lqw);
|
||||||
|
|
||||||
|
List<WmsSchedulePlanDetailVo> selectVoListWithName(@Param("ew") QueryWrapper<WmsSchedulePlanDetail> lqw);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,20 +55,8 @@ public class WmsSchedulePlanDetailServiceImpl implements IWmsSchedulePlanDetailS
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<WmsSchedulePlanDetailVo> queryList(WmsSchedulePlanDetailBo bo) {
|
public List<WmsSchedulePlanDetailVo> queryList(WmsSchedulePlanDetailBo bo) {
|
||||||
LambdaQueryWrapper<WmsSchedulePlanDetail> lqw = buildQueryWrapper(bo);
|
QueryWrapper<WmsSchedulePlanDetail> lqw = buildQueryWrapperPlus(bo);
|
||||||
return baseMapper.selectVoList(lqw);
|
return baseMapper.selectVoListWithName(lqw);
|
||||||
}
|
|
||||||
private LambdaQueryWrapper<WmsSchedulePlanDetail> buildQueryWrapper(WmsSchedulePlanDetailBo bo) {
|
|
||||||
Map<String, Object> params = bo.getParams();
|
|
||||||
LambdaQueryWrapper<WmsSchedulePlanDetail> lqw = Wrappers.lambdaQuery();
|
|
||||||
lqw.eq(bo.getPlanId() != null, WmsSchedulePlanDetail::getPlanId, bo.getPlanId());
|
|
||||||
lqw.eq(bo.getLineId() != null, WmsSchedulePlanDetail::getLineId, bo.getLineId());
|
|
||||||
lqw.eq(bo.getBatchId() != null, WmsSchedulePlanDetail::getBatchId, bo.getBatchId());
|
|
||||||
lqw.eq(bo.getProductId() != null, WmsSchedulePlanDetail::getProductId, bo.getProductId());
|
|
||||||
lqw.eq(bo.getQuantity() != null, WmsSchedulePlanDetail::getQuantity, bo.getQuantity());
|
|
||||||
lqw.eq(bo.getStartDate() != null, WmsSchedulePlanDetail::getStartDate, bo.getStartDate());
|
|
||||||
lqw.eq(bo.getEndDate() != null, WmsSchedulePlanDetail::getEndDate, bo.getEndDate());
|
|
||||||
return lqw;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private QueryWrapper<WmsSchedulePlanDetail> buildQueryWrapperPlus(WmsSchedulePlanDetailBo bo) {
|
private QueryWrapper<WmsSchedulePlanDetail> buildQueryWrapperPlus(WmsSchedulePlanDetailBo bo) {
|
||||||
@@ -78,7 +66,7 @@ public class WmsSchedulePlanDetailServiceImpl implements IWmsSchedulePlanDetailS
|
|||||||
lqw.eq("wspd.del_flag", 0);
|
lqw.eq("wspd.del_flag", 0);
|
||||||
lqw.eq( bo.getPlanId()!=null ,"wspd.plan_id", bo.getPlanId());
|
lqw.eq( bo.getPlanId()!=null ,"wspd.plan_id", bo.getPlanId());
|
||||||
lqw.eq(bo.getLineId()!=null ,"wspd.line_id", bo.getLineId());
|
lqw.eq(bo.getLineId()!=null ,"wspd.line_id", bo.getLineId());
|
||||||
lqw.eq(bo.getBatchId()!=null ,"wspd.batch_id", bo.getBatchId());
|
lqw.eq(bo.getTaskId()!=null ,"wspd.task_id", bo.getTaskId());
|
||||||
lqw.eq(bo.getProductId()!=null ,"wspd.product_id", bo.getProductId());
|
lqw.eq(bo.getProductId()!=null ,"wspd.product_id", bo.getProductId());
|
||||||
lqw.eq(bo.getQuantity()!=null ,"wspd.quantity", bo.getQuantity());
|
lqw.eq(bo.getQuantity()!=null ,"wspd.quantity", bo.getQuantity());
|
||||||
lqw.eq(bo.getStartDate()!=null ,"wspd.start_date", bo.getStartDate());
|
lqw.eq(bo.getStartDate()!=null ,"wspd.start_date", bo.getStartDate());
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="detailId" column="detail_id"/>
|
<result property="detailId" column="detail_id"/>
|
||||||
<result property="planId" column="plan_id"/>
|
<result property="planId" column="plan_id"/>
|
||||||
<result property="lineId" column="line_id"/>
|
<result property="lineId" column="line_id"/>
|
||||||
<result property="batchId" column="batch_id"/>
|
<result property="taskId" column="task_id"/>
|
||||||
<result property="productId" column="product_id"/>
|
<result property="productId" column="product_id"/>
|
||||||
<result property="quantity" column="quantity"/>
|
<result property="quantity" column="quantity"/>
|
||||||
<result property="startDate" column="start_date"/>
|
<result property="startDate" column="start_date"/>
|
||||||
@@ -39,10 +39,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<select id="selectVoPagePlus" resultType="com.klp.domain.vo.WmsSchedulePlanDetailVo">
|
<select id="selectVoPagePlus" resultType="com.klp.domain.vo.WmsSchedulePlanDetailVo">
|
||||||
SELECT *,
|
SELECT *,
|
||||||
wpl.line_name AS lineName,
|
wpl.line_name AS lineName,
|
||||||
wbt.batch_no AS batchNo
|
wpt.plan_name AS planName,
|
||||||
|
wpt.plan_code AS planCode
|
||||||
FROM wms_schedule_plan_detail wspd
|
FROM wms_schedule_plan_detail wspd
|
||||||
left join wms_production_line wpl on wspd.line_id = wpl.line_id
|
left join wms_production_line wpl on wspd.line_id = wpl.line_id
|
||||||
left join wms_batch wbt on wspd.batch_id = wbt.batch_id
|
left join wms_production_task wpt on wspd.task_id = wpt.task_id
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectVoListWithName" resultType="com.klp.domain.vo.WmsSchedulePlanDetailVo">
|
||||||
|
SELECT *,
|
||||||
|
wpl.line_name AS lineName,
|
||||||
|
wpt.plan_name AS planName,
|
||||||
|
wpt.plan_code AS planCode
|
||||||
|
FROM wms_schedule_plan_detail wspd
|
||||||
|
left join wms_production_line wpl on wspd.line_id = wpl.line_id
|
||||||
|
left join wms_production_task wpt on wspd.task_id = wpt.task_id
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user