Merge remote-tracking branch 'origin/master'

master
zhouhy 2 years ago
commit 84d75200e1

@ -3,6 +3,7 @@ package com.aucma.base.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.aucma.common.core.page.TableDataInfo;
import com.aucma.common.utils.DateUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
@ -39,9 +40,10 @@ public class OrderBomInfoController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('base:orderBomInfo:list')")
@GetMapping("/list")
public AjaxResult list(OrderBomInfo orderBomInfo) {
public TableDataInfo list(OrderBomInfo orderBomInfo) {
startPage();
List<OrderBomInfo> list = orderBomInfoService.selectOrderBomInfoList(orderBomInfo);
return success(list);
return getDataTable(list);
}
/**

@ -108,6 +108,12 @@ public class BaseOrderInfo extends BaseEntity {
@Excel(name = "启用标识")
private Long isFlag;
/**
* 0-1-
*/
@Excel(name = "是否已下达计划")
private Long isRelease;
/**
*
*/
@ -141,6 +147,14 @@ public class BaseOrderInfo extends BaseEntity {
@Excel(name = "完成日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date completeDate;
public Long getIsRelease() {
return isRelease;
}
public void setIsRelease(Long isRelease) {
this.isRelease = isRelease;
}
public void setObjId(Long objId) {
this.objId = objId;
}

@ -25,6 +25,7 @@
<result property="updatedBy" column="updated_by"/>
<result property="updatedTime" column="updated_time"/>
<result property="completeDate" column="complete_date"/>
<result property="isRelease" column="is_release"/>
</resultMap>
<sql id="selectBaseOrderInfoVo">
@ -43,6 +44,7 @@
end_date,
factory_code,
is_flag,
is_release,
created_by,
created_time,
updated_by,
@ -77,7 +79,9 @@
<if test="updatedBy != null and updatedBy != ''">and updated_by = #{updatedBy}</if>
<if test="updatedTime != null ">and updated_time = #{updatedTime}</if>
<if test="completeDate != null ">and complete_date = #{completeDate}</if>
<if test="isRelease != null ">and is_release = #{isRelease}</if>
</where>
order by order_code desc
</select>
<select id="selectBaseOrderInfoByObjId" parameterType="Long" resultMap="BaseOrderInfoResult">
@ -106,6 +110,7 @@
<if test="endDate != null">end_date,</if>
<if test="factoryCode != null">factory_code,</if>
<if test="isFlag != null">is_flag,</if>
<if test="isRelease != null">is_release,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if>
<if test="updatedBy != null">updated_by,</if>
@ -128,6 +133,7 @@
<if test="endDate != null">#{endDate},</if>
<if test="factoryCode != null">#{factoryCode},</if>
<if test="isFlag != null">#{isFlag},</if>
<if test="isRelease != null">#{isRelease},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if>
@ -153,6 +159,7 @@
<if test="endDate != null">end_date = #{endDate},</if>
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
<if test="isFlag != null">is_flag = #{isFlag},</if>
<if test="isRelease != null">is_release = #{isRelease},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>

@ -23,23 +23,21 @@ import java.util.concurrent.TimeUnit;
public class PlanCodeUtils {
public String getPlanCode(){
public static String getPlanCode() {
LocalDate date = LocalDate.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyMMdd");
String format = date.format(formatter);
String format = "plan_code:" + date.format(formatter);
//以当日日期作为key
if (!SpringUtils.getBean(RedisCache.class).hasKey(format)) {
SpringUtils.getBean(RedisCache.class).setCacheObject(format, 1);
SpringUtils.getBean(RedisCache.class).expire(format, getSecondsNextEarlyMorning(), TimeUnit.SECONDS);
}
else{
} else {
//获取当前的value在+1
Object cacheObject = SpringUtils.getBean(RedisCache.class).getCacheObject(format);
String s = String.valueOf(cacheObject);
Integer integer = Integer.valueOf(s);
integer = integer+1;
String value = String.valueOf(cacheObject);
Integer integer = Integer.parseInt(value) + 1;
SpringUtils.getBean(RedisCache.class).setCacheObject(format, integer);
SpringUtils.getBean(RedisCache.class).expire(format, getSecondsNextEarlyMorning(), TimeUnit.SECONDS);
}
Object cacheObject = SpringUtils.getBean(RedisCache.class).getCacheObject(format);
//转成string在转成int
@ -49,7 +47,7 @@ public class PlanCodeUtils {
}
//判断当前时间距离第二天0点时间的秒数
public Long getSecondsNextEarlyMorning() {
public static Long getSecondsNextEarlyMorning() {
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DAY_OF_YEAR, 1);
cal.set(Calendar.HOUR_OF_DAY, 0);
@ -57,13 +55,7 @@ public class PlanCodeUtils {
cal.set(Calendar.MINUTE, 0);
cal.set(Calendar.MILLISECOND, 0);
return (cal.getTimeInMillis() - System.currentTimeMillis()) / 1000;
}
}

@ -3,7 +3,7 @@ package com.aucma.production.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.aucma.common.utils.DateUtils;
import com.aucma.base.domain.BaseOrderInfo;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -98,4 +98,15 @@ public class ProductPlanInfoController extends BaseController {
public AjaxResult remove(@PathVariable Long[] objIds) {
return toAjax(productPlanInfoService.deleteProductPlanInfoByObjIds(objIds));
}
/**
*
* @param baseOrderInfo
* @return
*/
@PostMapping("/releaseOrderPlan")
public AjaxResult releaseOrderPlan(@RequestBody BaseOrderInfo baseOrderInfo) {
return success(productPlanInfoService.releaseOrderPlan(baseOrderInfo));
}
}

@ -64,12 +64,24 @@ public class BaseBomInfo extends TreeStringEntity {
@Excel(name = "工厂编号")
private String plantCode;
/**
*
*/
@Excel(name = "工厂名称")
private String plantName;
/**
* 线/
*/
@Excel(name = "产线/工位")
@Excel(name = "产线/工位编号")
private String productLineCode;
/**
* 线/
*/
@Excel(name = "产线/工位名称")
private String productLineName;
/**
*
*/
@ -102,6 +114,21 @@ public class BaseBomInfo extends TreeStringEntity {
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime;
public String getPlantName() {
return plantName;
}
public void setPlantName(String plantName) {
this.plantName = plantName;
}
public String getProductLineName() {
return productLineName;
}
public void setProductLineName(String productLineName) {
this.productLineName = productLineName;
}
public void setObjId(Long objId) {
this.objId = objId;

@ -59,11 +59,17 @@ public class ProductPlanInfo extends BaseEntity {
private String materialName;
/**
*
*
*/
@Excel(name = "计划工位")
@Excel(name = "计划工位编号")
private String productLineCode;
/**
*
*/
@Excel(name = "计划工位名称")
private String productLineName;
/**
*
*/
@ -122,6 +128,14 @@ public class ProductPlanInfo extends BaseEntity {
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime;
public String getProductLineName() {
return productLineName;
}
public void setProductLineName(String productLineName) {
this.productLineName = productLineName;
}
public void setObjId(Long objId) {
this.objId = objId;
}

@ -58,4 +58,11 @@ public interface IBaseBomInfoService
* @return
*/
public int deleteBaseBomInfoByObjId(Long objId);
/**
* BOM
* @param baseBomInfoList
*/
void checkBomInfo(List<BaseBomInfo> baseBomInfoList);
}

@ -1,6 +1,8 @@
package com.aucma.production.service;
import java.util.List;
import com.aucma.base.domain.BaseOrderInfo;
import com.aucma.production.domain.ProductPlanInfo;
/**
@ -60,4 +62,10 @@ public interface IProductPlanInfoService
public int deleteProductPlanInfoByObjId(Long objId);
/**
*
* @param baseOrderInfo
* @return
*/
public Boolean releaseOrderPlan(BaseOrderInfo baseOrderInfo);
}

@ -2,7 +2,7 @@ package com.aucma.production.service.impl;
import java.util.List;
import com.aucma.common.core.domain.entity.SysDept;
import com.aucma.common.exception.base.BaseException;
import com.aucma.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -55,11 +55,15 @@ public class BaseBomInfoServiceImpl implements IBaseBomInfoService
@Override
public int insertBaseBomInfo(BaseBomInfo baseBomInfo)
{
BaseBomInfo bomInfo = baseBomInfoMapper.selectBaseBomInfoByMaterialCode(baseBomInfo.getMaterialCode());
if (StringUtils.isNotNull(bomInfo)){
throw new BaseException("该物料编号:" + baseBomInfo.getMaterialCode() + "已存在!");
}
if (StringUtils.isNotNull(baseBomInfo.getParentId())){
BaseBomInfo info = baseBomInfoMapper.selectBaseBomInfoByMaterialCode(baseBomInfo.getParentId());
if (StringUtils.isNull(info)){
baseBomInfo.setAncestors(baseBomInfo.getMaterialCode());
}else {
baseBomInfo.setAncestors(info.getAncestors() + "," + baseBomInfo.getMaterialCode());
}else {
baseBomInfo.setAncestors(baseBomInfo.getMaterialCode());
}
return baseBomInfoMapper.insertBaseBomInfo(baseBomInfo);
}
@ -133,4 +137,21 @@ public class BaseBomInfoServiceImpl implements IBaseBomInfoService
{
return baseBomInfoMapper.deleteBaseBomInfoByObjId(objId);
}
/**
* BOM
* @param baseBomInfoList
*/
@Override
public void checkBomInfo(List<BaseBomInfo> baseBomInfoList) {
for (BaseBomInfo baseBomInfo : baseBomInfoList) {
if (baseBomInfo.getStandardAmount() < 1){
throw new BaseException("生产BOM" + baseBomInfo.getMaterialName() + " 标准数量小于1");
}
if (StringUtils.isEmpty(baseBomInfo.getProductLineCode())){
throw new BaseException("生产BOM" + baseBomInfo.getMaterialName() + " 未分配工位!");
}
}
}
}

@ -2,13 +2,22 @@ package com.aucma.production.service.impl;
import java.util.List;
import com.aucma.base.domain.BaseOrderInfo;
import com.aucma.base.service.IBaseOrderInfoService;
import com.aucma.common.exception.base.BaseException;
import com.aucma.common.utils.DateUtils;
import com.aucma.common.utils.StringUtils;
import com.aucma.common.utils.uuid.PlanCodeUtils;
import com.aucma.production.domain.BaseBomInfo;
import com.aucma.production.service.IBaseBomInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.aucma.production.mapper.ProductPlanInfoMapper;
import com.aucma.production.domain.ProductPlanInfo;
import com.aucma.production.service.IProductPlanInfoService;
import static com.aucma.common.utils.SecurityUtils.getUsername;
/**
* Service
*
@ -21,6 +30,12 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService
@Autowired
private ProductPlanInfoMapper productPlanInfoMapper;
@Autowired
private IBaseOrderInfoService baseOrderInfoService;
@Autowired
private IBaseBomInfoService baseBomInfoService;
/**
*
*
@ -54,6 +69,9 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService
@Override
public int insertProductPlanInfo(ProductPlanInfo productPlanInfo)
{
if (StringUtils.isEmpty(productPlanInfo.getCreatedBy())){
productPlanInfo.setCreatedBy(getUsername());
}
productPlanInfo.setCreatedTime(DateUtils.getNowDate());
return productPlanInfoMapper.insertProductPlanInfo(productPlanInfo);
}
@ -95,6 +113,49 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService
return productPlanInfoMapper.deleteProductPlanInfoByObjId(objId);
}
/**
*
* @param baseOrderInfo
* @return
*/
@Override
public Boolean releaseOrderPlan(BaseOrderInfo baseOrderInfo) {
try {
String orderCode = baseOrderInfo.getOrderCode();
String saleOrderCode = baseOrderInfo.getSaleOrderCode();
String saleOrderLineNumber = baseOrderInfo.getSaleOrderLineNumber();
Long orderAmount = baseOrderInfo.getOrderAmount();
if (StringUtils.isNull(orderAmount) || orderAmount < 1L){
throw new BaseException("该工单计划数量不合法!");
}
//获取生产BOM信息
BaseBomInfo bomInfo = new BaseBomInfo();
bomInfo.setParentId(baseOrderInfo.getMaterialCode());
List<BaseBomInfo> baseBomInfoList = baseBomInfoService.selectBaseBomInfoList(bomInfo);
//检查生产BOM是否满足下计划条件
baseBomInfoService.checkBomInfo(baseBomInfoList);
//维护生产计划
for (BaseBomInfo baseBomInfo : baseBomInfoList) {
ProductPlanInfo planInfo = new ProductPlanInfo();
planInfo.setPlanCode(PlanCodeUtils.getPlanCode());
planInfo.setOrderCode(orderCode);
planInfo.setSaleOrderCode(saleOrderCode);
planInfo.setSaleorderLinenumber(saleOrderLineNumber);
planInfo.setMaterialCode(baseBomInfo.getMaterialCode());
planInfo.setMaterialName(baseBomInfo.getMaterialName());
planInfo.setProductLineCode(baseBomInfo.getProductLineCode());
planInfo.setPlanAmount(baseBomInfo.getStandardAmount() * orderAmount);
this.insertProductPlanInfo(planInfo);
}
baseOrderInfo.setIsRelease(0L);
baseOrderInfoService.updateBaseOrderInfo(baseOrderInfo);
} catch (Exception e) {
throw new BaseException(e.getMessage());
}
return true;
}
}

@ -14,46 +14,67 @@
<result property="parentId" column="parent_id" />
<result property="plantCode" column="plant_code" />
<result property="productLineCode" column="product_line_code" />
<result property="productLineName" column="product_line_name" />
<result property="isFlag" column="is_flag" />
<result property="createdBy" column="created_by" />
<result property="createdTime" column="created_time" />
<result property="updatedBy" column="updated_by" />
<result property="updatedTime" column="updated_time" />
<result property="ancestors" column="ancestors" />
<result property="plantName" column="factory_name" />
</resultMap>
<sql id="selectBaseBomInfoVo">
select obj_id, bom_code, material_code, material_name, material_type, standard_amount, parent_id,
plant_code, product_line_code, is_flag, created_by, created_time, updated_by, updated_time, ancestors from base_bominfo
select bb.obj_id,
bb.bom_code,
bb.material_code,
bb.material_name,
bb.material_type,
bb.standard_amount,
bb.parent_id,
bb.plant_code,
bb.product_line_code,
bb.is_flag,
bb.created_by,
bb.created_time,
bb.updated_by,
bb.updated_time,
bb.ancestors,
bf.factory_name,
bpl.PRODUCT_LINE_NAME
from base_bominfo bb
left join base_factory bf on bf.factory_code = plant_code
left join BASE_PRODUCTLINE bpl on bpl.PRODUCT_LINE_CODE = bb.product_line_code
</sql>
<select id="selectBaseBomInfoList" parameterType="BaseBomInfo" resultMap="BaseBomInfoResult">
<include refid="selectBaseBomInfoVo"/>
<where>
<if test="bomCode != null and bomCode != ''"> and bom_code = #{bomCode}</if>
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat(concat('%', #{materialName}), '%')</if>
<if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if>
<if test="standardAmount != null "> and standard_amount = #{standardAmount}</if>
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId}</if>
<if test="plantCode != null and plantCode != ''"> and plant_code = #{plantCode}</if>
<if test="productLineCode != null and productLineCode != ''"> and product_line_code = #{productLineCode}</if>
<if test="isFlag != null "> and is_flag = #{isFlag}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdTime != null "> and created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if>
<if test="updatedTime != null "> and updated_time = #{updatedTime}</if>
<if test="ancestors != null and ancestors != ''"> and ancestors like concat(concat('%', #{ancestors}), '%')</if>
<if test="bomCode != null and bomCode != ''"> and bb.bom_code = #{bomCode}</if>
<if test="materialCode != null and materialCode != ''"> and bb.material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and bb.material_name like concat(concat('%', #{materialName}), '%')</if>
<if test="materialType != null and materialType != ''"> and bb.material_type = #{materialType}</if>
<if test="standardAmount != null "> and bb.standard_amount = #{standardAmount}</if>
<if test="parentId != null and parentId != ''"> and bb.parent_id = #{parentId}</if>
<if test="plantCode != null and plantCode != ''"> and bb.plant_code = #{plantCode}</if>
<if test="productLineCode != null and productLineCode != ''"> and bb.product_line_code = #{productLineCode}</if>
<if test="isFlag != null "> and bb.is_flag = #{isFlag}</if>
<if test="createdBy != null and createdBy != ''"> and bb.created_by = #{createdBy}</if>
<if test="createdTime != null "> and bb.created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''"> and bb.updated_by = #{updatedBy}</if>
<if test="updatedTime != null "> and bb.updated_time = #{updatedTime}</if>
<if test="ancestors != null and ancestors != ''"> and bb.ancestors like concat(concat('%', #{ancestors}), '%')</if>
</where>
order by bb.created_time desc
</select>
<select id="selectBaseBomInfoByObjId" parameterType="Long" resultMap="BaseBomInfoResult">
<include refid="selectBaseBomInfoVo"/>
where obj_id = #{objId}
where bb.obj_id = #{objId}
</select>
<select id="selectBaseBomInfoByMaterialCode" resultMap="BaseBomInfoResult">
<include refid="selectBaseBomInfoVo"/>
where material_code = #{materialCode}
where bb.material_code = #{materialCode}
</select>
<select id="selectChildrenBomById" parameterType="String" resultMap="BaseBomInfoResult">
select * from BASE_BOMINFO where FIND_IN_SET(#{materialCode}, ancestors) <![CDATA[ <> ]]> 0

@ -13,6 +13,7 @@
<result property="materialCode" column="material_code"/>
<result property="materialName" column="material_name"/>
<result property="productLineCode" column="productline_code"/>
<result property="productLineName" column="productLineName"/>
<result property="planAmount" column="plan_amount"/>
<result property="completeAmount" column="complete_amount"/>
<result property="beginTime" column="begin_time"/>
@ -25,62 +26,65 @@
</resultMap>
<sql id="selectProductPlanInfoVo">
select obj_id,
plan_code,
order_code,
saleorder_code,
saleorder_linenumber,
material_code,
material_name,
productline_code,
plan_amount,
complete_amount,
begin_time,
end_time,
is_flag,
created_by,
created_time,
updated_by,
updated_time
from product_planinfo
select pp.obj_id,
pp.plan_code,
pp.order_code,
pp.saleorder_code,
pp.saleorder_linenumber,
pp.material_code,
pp.material_name,
pp.productline_code,
pl.PRODUCT_LINE_NAME productLineName,
pp.plan_amount,
pp.complete_amount,
pp.begin_time,
pp.end_time,
pp.is_flag,
pp.created_by,
pp.created_time,
pp.updated_by,
pp.updated_time
from product_planinfo pp
left join BASE_PRODUCTLINE pl on pl.PRODUCT_LINE_CODE = pp.productline_code
</sql>
<select id="selectProductPlanInfoList" parameterType="ProductPlanInfo" resultMap="ProductPlanInfoResult">
<include refid="selectProductPlanInfoVo"/>
<where>
<if test="planCode != null and planCode != ''">and plan_code like concat(concat('%', #{planCode}), '%')
<if test="planCode != null and planCode != ''">and pp.plan_code like concat(concat('%', #{planCode}), '%')
</if>
<if test="orderCode != null and orderCode != ''">and order_code = #{orderCode}</if>
<if test="saleOrderCode != null and saleOrderCode != ''">and saleorder_code = #{saleOrderCode}</if>
<if test="saleorderLinenumber != null and saleorderLinenumber != ''">and saleorder_linenumber =
<if test="orderCode != null and orderCode != ''">and pp.order_code = #{orderCode}</if>
<if test="saleOrderCode != null and saleOrderCode != ''">and pp.saleorder_code = #{saleOrderCode}</if>
<if test="saleorderLinenumber != null and saleorderLinenumber != ''">and pp.saleorder_linenumber =
#{saleorderLinenumber}
</if>
<if test="materialCode != null and materialCode != ''">and material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''">and material_name like concat(concat('%',
<if test="materialCode != null and materialCode != ''">and pp.material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''">and pp.material_name like concat(concat('%',
#{materialName}), '%')
</if>
<if test="productLineCode != null and productLineCode != ''">and productline_code = #{productLineCode}</if>
<if test="planAmount != null ">and plan_amount = #{planAmount}</if>
<if test="completeAmount != null ">and complete_amount = #{completeAmount}</if>
<if test="productLineCode != null and productLineCode != ''">and pp.productline_code = #{productLineCode}</if>
<if test="planAmount != null ">and pp.plan_amount = #{planAmount}</if>
<if test="completeAmount != null ">and pp.complete_amount = #{completeAmount}</if>
<if test="params.beginBeginTime != null and params.beginBeginTime != '' and params.endBeginTime != null and params.endBeginTime != ''">
and begin_time between to_date(#{params.beginBeginTime}, 'yyyy-mm-dd hh24:mi:ss') and
and pp.begin_time between to_date(#{params.beginBeginTime}, 'yyyy-mm-dd hh24:mi:ss') and
to_date(#{params.endBeginTime}, 'yyyy-mm-dd hh24:mi:ss')
</if>
<if test="params.beginEndTime != null and params.beginEndTime != '' and params.endEndTime != null and params.endEndTime != ''">
and end_time between to_date(#{params.beginEndTime}, 'yyyy-mm-dd hh24:mi:ss') and
and pp.end_time between to_date(#{params.beginEndTime}, 'yyyy-mm-dd hh24:mi:ss') and
to_date(#{params.endEndTime}, 'yyyy-mm-dd hh24:mi:ss')
</if>
<if test="isFlag != null ">and is_flag = #{isFlag}</if>
<if test="createdBy != null and createdBy != ''">and created_by = #{createdBy}</if>
<if test="createdTime != null ">and created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''">and updated_by = #{updatedBy}</if>
<if test="updatedTime != null ">and updated_time = #{updatedTime}</if>
<if test="isFlag != null ">and pp.is_flag = #{isFlag}</if>
<if test="createdBy != null and createdBy != ''">and pp.created_by = #{createdBy}</if>
<if test="createdTime != null ">and pp.created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''">and pp.updated_by = #{updatedBy}</if>
<if test="updatedTime != null ">and pp.updated_time = #{updatedTime}</if>
</where>
order by pp.plan_code desc
</select>
<select id="selectProductPlanInfoByObjId" parameterType="Long" resultMap="ProductPlanInfoResult">
<include refid="selectProductPlanInfoVo"/>
where obj_id = #{objId}
where pp.obj_id = #{objId}
</select>
<insert id="insertProductPlanInfo" parameterType="ProductPlanInfo">

Loading…
Cancel
Save