Merge branch 'dev_js_20260313'
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package com.lideeyunji.core.framework.config.job;
|
||||
|
||||
import com.lideeyunji.core.framework.service.IGrBiFsBusinessRealService;
|
||||
import com.lideeyunji.tool.framework.common.constant.lideeYunJiBaseConstant;
|
||||
import com.lideeyunji.tool.framework.quartz.core.handler.JobHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 经营指标完成情况
|
||||
* oracle gr_bi_fs_business_real -> mysql gr_bi_fs_business_real
|
||||
*/
|
||||
@Slf4j
|
||||
@Component("generateBusinessRealJob")
|
||||
public class GenerateBusinessRealJob implements JobHandler {
|
||||
|
||||
@Resource
|
||||
private IGrBiFsBusinessRealService grBiFsBusinessRealService;
|
||||
|
||||
@Override
|
||||
public String execute(String param) throws Exception {
|
||||
log.info("*********** 开始生成经营指标完成情况 ************");
|
||||
grBiFsBusinessRealService.generateBusinessReal(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
||||
log.info("*********** 生成经营指标完成情况完成 ************");
|
||||
return "*********** 生成经营指标完成情况完成 ************";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.lideeyunji.core.framework.config.job;
|
||||
|
||||
import com.lideeyunji.core.framework.service.IGrBiStLotService;
|
||||
import com.lideeyunji.tool.framework.common.constant.lideeYunJiBaseConstant;
|
||||
import com.lideeyunji.tool.framework.quartz.core.handler.JobHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 物料产品库存统计表
|
||||
* oracle gr_bi_st_lot -> mysql gr_bi_st_lot
|
||||
*/
|
||||
@Slf4j
|
||||
@Component("generateStLotJob")
|
||||
public class GenerateStLotJob implements JobHandler {
|
||||
|
||||
@Resource
|
||||
private IGrBiStLotService grBiFsStLotService;
|
||||
|
||||
@Override
|
||||
public String execute(String param) throws Exception {
|
||||
log.info("*********** 开始生成物料产品库存统计表 ************");
|
||||
grBiFsStLotService.generateStLot(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
||||
log.info("*********** 生成物料产品库存统计表完成 ************");
|
||||
return "*********** 生成物料产品库存统计表完成 ************";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.lideeyunji.core.framework.config.job;
|
||||
|
||||
import com.lideeyunji.core.framework.service.IGrBiStProductAvlService;
|
||||
import com.lideeyunji.tool.framework.common.constant.lideeYunJiBaseConstant;
|
||||
import com.lideeyunji.tool.framework.quartz.core.handler.JobHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 产品可销库存对象
|
||||
* oracle gr_bi_st_product_avl -> mysql gr_bi_st_product_avl
|
||||
*/
|
||||
@Slf4j
|
||||
@Component("generateStProductAvlJob")
|
||||
public class GenerateStProductAvlJob implements JobHandler {
|
||||
|
||||
@Resource
|
||||
private IGrBiStProductAvlService grBiFsStProductAvlService;
|
||||
|
||||
@Override
|
||||
public String execute(String param) throws Exception {
|
||||
log.info("*********** 开始生成产品可销库存对象 ************");
|
||||
grBiFsStProductAvlService.generateStProductAvl(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
||||
log.info("*********** 生成产品可销库存对象完成 ************");
|
||||
return "*********** 生成产品可销库存对象完成 ************";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.lideeyunji.core.framework.config.job;
|
||||
|
||||
import com.lideeyunji.core.framework.service.IGrBiStProductService;
|
||||
import com.lideeyunji.tool.framework.common.constant.lideeYunJiBaseConstant;
|
||||
import com.lideeyunji.tool.framework.quartz.core.handler.JobHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 库存产品占比表对象
|
||||
* oracle gr_bi_st_product -> mysql gr_bi_st_product
|
||||
*/
|
||||
@Slf4j
|
||||
@Component("generateStProductJob")
|
||||
public class GenerateStProductJob implements JobHandler {
|
||||
|
||||
@Resource
|
||||
private IGrBiStProductService grBiFsStProductService;
|
||||
|
||||
@Override
|
||||
public String execute(String param) throws Exception {
|
||||
log.info("*********** 开始生成库存产品占比表对象 ************");
|
||||
grBiFsStProductService.generateStProduct(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
||||
log.info("*********** 生成库存产品占比表对象完成 ************");
|
||||
return "*********** 生成库存产品占比表对象完成 ************";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.lideeyunji.core.framework.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.lideeyunji.tool.framework.yunji.model.global.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.lideeyunji.tool.framework.yunji.model.global.BaseTenantEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 经营指标完成情况对象 gr_bi_fs_business_real
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-03-12
|
||||
*/
|
||||
@TableName("gr_bi_fs_business_real")
|
||||
@Data
|
||||
public class GrBiFsBusinessReal implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "ID", type = IdType.INPUT)
|
||||
private Long id;
|
||||
|
||||
@TableField(value = "USEYEAR")
|
||||
private String useYear;
|
||||
|
||||
@TableField(value = "USEMONTH")
|
||||
private String useMonth;
|
||||
|
||||
@TableField(value = "ITEMID")
|
||||
private String itemId;
|
||||
|
||||
@TableField(value = "ITEMNAME")
|
||||
private String itemName;
|
||||
|
||||
@TableField(value = "ITEMORDER")
|
||||
private String itemOrder;
|
||||
|
||||
@TableField(value = "MONTH_REAL")
|
||||
private String monthReal;
|
||||
|
||||
@TableField(value = "YEAR_REAL")
|
||||
private String yearReal;
|
||||
|
||||
@TableField(value = "MONTH_DIFF")
|
||||
private String monthDiff;
|
||||
|
||||
@TableField(value = "YEAR_PLAN")
|
||||
private String yearPlan;
|
||||
|
||||
@TableField(value = "YEAR_RATE")
|
||||
private String yearRate;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.lideeyunji.core.framework.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.lideeyunji.tool.framework.yunji.model.global.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.lideeyunji.tool.framework.yunji.model.global.BaseTenantEntity;
|
||||
|
||||
/**
|
||||
* 物料产品库存统计表对象 gr_bi_st_lot
|
||||
*
|
||||
* @author king
|
||||
* @date 2026-03-12
|
||||
*/
|
||||
@TableName("gr_bi_st_lot")
|
||||
@Data
|
||||
public class GrBiStLot implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "ID", type = IdType.INPUT)
|
||||
private Long id;
|
||||
|
||||
@TableField(value = "GOODSID")
|
||||
private Long goodsId;
|
||||
|
||||
@TableField(value = "GOODSNAME")
|
||||
private String goodsName;
|
||||
|
||||
@TableField(value = "GOODSTYPE")
|
||||
private String goodsType;
|
||||
|
||||
@TableField(value = "GOODSUNIT")
|
||||
private String goodsUnit;
|
||||
|
||||
@TableField(value = "CLASSID")
|
||||
private Long classid;
|
||||
|
||||
@TableField(value = "CLASSNAME")
|
||||
private String className;
|
||||
|
||||
@TableField(value = "LOTID")
|
||||
private Long lotId;
|
||||
|
||||
@TableField(value = "LOTNO")
|
||||
private String lotNo;
|
||||
|
||||
@TableField(value = "GOODSQTY")
|
||||
private Long goodsQty;
|
||||
|
||||
@TableField(value = "PRODDATE")
|
||||
private Date prodDate;
|
||||
|
||||
@TableField(value = "INVALIDDATE")
|
||||
private String invalidDate;
|
||||
|
||||
@TableField(value = "INVALIDDAYS")
|
||||
private Long invalidDays;
|
||||
|
||||
@TableField(value = "STINDATE")
|
||||
private String stInDate;
|
||||
|
||||
@TableField(value = "STOUTDATE")
|
||||
private String stOutDate;
|
||||
|
||||
@TableField(value = "INVALIDDAYSTYPEID")
|
||||
private Long invalidDaysTypeId;
|
||||
|
||||
@TableField(value = "INVALIDDAYSTYPE")
|
||||
private String invalidDaysType;
|
||||
|
||||
@TableField(value = "OUTTYPE")
|
||||
private Long outType;
|
||||
|
||||
@TableField(value = "STORAGEID")
|
||||
private Long storageId;
|
||||
|
||||
@TableField(value = "STORAGENAME")
|
||||
private String storageName;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.lideeyunji.core.framework.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.lideeyunji.tool.framework.yunji.model.global.BaseTenantEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 库存产品占比表对象 gr_bi_st_product
|
||||
*
|
||||
* @author king
|
||||
* @date 2026-03-12
|
||||
*/
|
||||
@TableName("gr_bi_st_product")
|
||||
@Data
|
||||
public class GrBiStProduct implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "ID", type = IdType.INPUT)
|
||||
private Long id;
|
||||
|
||||
@TableField(value = "GOODSID")
|
||||
private Long goodsId;
|
||||
|
||||
@TableField(value = "GOODSNAME")
|
||||
private String goodsName;
|
||||
|
||||
@TableField(value = "GOODSTYPE")
|
||||
private String goodsType;
|
||||
|
||||
@TableField(value = "GOODSUNIT")
|
||||
private String goodsUnit;
|
||||
|
||||
@TableField(value = "GOODSCLASSID")
|
||||
private Long goodsClassId;
|
||||
|
||||
@TableField(value = "GOODSCLASSNAME")
|
||||
private String goodsClassName;
|
||||
|
||||
@TableField(value = "QTY")
|
||||
private Long qty;
|
||||
|
||||
@TableField(value = "QTY_PROP")
|
||||
private Long qtyProp;
|
||||
|
||||
@TableField(value = "MONEY")
|
||||
private Long money;
|
||||
|
||||
@TableField(value = "MONEY_PROP")
|
||||
private Long moneyProp;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.lideeyunji.core.framework.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.lideeyunji.tool.framework.yunji.model.global.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.lideeyunji.tool.framework.yunji.model.global.BaseTenantEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 产品可销库存对象 gr_bi_st_product_avl
|
||||
*
|
||||
* @author king
|
||||
* @date 2026-03-12
|
||||
*/
|
||||
@TableName("gr_bi_st_product_avl")
|
||||
@Data
|
||||
public class GrBiStProductAvl implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "ID", type = IdType.INPUT)
|
||||
private Long id;
|
||||
|
||||
@TableField(value = "GOODSID")
|
||||
private Long goodsId;
|
||||
|
||||
@TableField(value = "GOODSNAME")
|
||||
private String goodsName;
|
||||
|
||||
@TableField(value = "GOODSTYPE")
|
||||
private String goodsType;
|
||||
|
||||
@TableField(value = "GOODSUNIT")
|
||||
private String goodsUnit;
|
||||
|
||||
@TableField(value = "PACKSIZE")
|
||||
private Long packSize;
|
||||
|
||||
@TableField(value = "SORT")
|
||||
private Long sort;
|
||||
|
||||
@TableField(value = "SEMIREM")
|
||||
private Long semiRem;
|
||||
|
||||
@TableField(value = "TODAYIN")
|
||||
private String todayIn;
|
||||
|
||||
@TableField(value = "REM")
|
||||
private Long rem;
|
||||
|
||||
@TableField(value = "THISMONTHOUT")
|
||||
private Long thisMonthOut;
|
||||
|
||||
@TableField(value = "LASTMONTHOUT")
|
||||
private Long lastMonthOut;
|
||||
|
||||
@TableField(value = "THISYEAROUT")
|
||||
private Long thisYearOut;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.lideeyunji.core.framework.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.lideeyunji.core.framework.entity.GrBiFsBusinessReal;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.lideeyunji.core.framework.entity.GrBiSaAgg;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 经营指标完成情况Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-03-12
|
||||
*/
|
||||
public interface GrBiFsBusinessRealMapper extends BaseMapper<GrBiFsBusinessReal>
|
||||
{
|
||||
/**
|
||||
* 查询经营指标完成情况
|
||||
*
|
||||
* @param ID 经营指标完成情况主键
|
||||
* @return 经营指标完成情况
|
||||
*/
|
||||
public GrBiFsBusinessReal selectGrBiFsBusinessRealByID(String ID);
|
||||
|
||||
/**
|
||||
* 查询经营指标完成情况列表
|
||||
*
|
||||
* @param grBiFsBusinessReal 经营指标完成情况
|
||||
* @return 经营指标完成情况集合
|
||||
*/
|
||||
public List<GrBiFsBusinessReal> selectGrBiFsBusinessRealList(GrBiFsBusinessReal grBiFsBusinessReal);
|
||||
|
||||
/**
|
||||
* 新增经营指标完成情况
|
||||
*
|
||||
* @param grBiFsBusinessReal 经营指标完成情况
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGrBiFsBusinessReal(GrBiFsBusinessReal grBiFsBusinessReal);
|
||||
|
||||
/**
|
||||
* 修改经营指标完成情况
|
||||
*
|
||||
* @param grBiFsBusinessReal 经营指标完成情况
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGrBiFsBusinessReal(GrBiFsBusinessReal grBiFsBusinessReal);
|
||||
|
||||
/**
|
||||
* 删除经营指标完成情况
|
||||
*
|
||||
* @param ID 经营指标完成情况主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGrBiFsBusinessRealByID(String ID);
|
||||
|
||||
/**
|
||||
* 批量删除经营指标完成情况
|
||||
*
|
||||
* @param IDs 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGrBiFsBusinessRealByIDs(String[] IDs);
|
||||
|
||||
@DS(value = "#dataSourceType")
|
||||
List<GrBiFsBusinessReal> getBusinessRealList(@Param("dataSourceType") String dataSourceType, @Param("pastYearMonth") Integer pastYearMonth,
|
||||
@Param("currentYearMonth") Integer currentYearMonth);
|
||||
@DS(value = "#dataSourceType")
|
||||
int deleteOldBusinessReal(@Param("dataSourceType") String dataSourceType, @Param("pastYearMonth") Integer pastYearMonth,
|
||||
@Param("currentYearMonth") Integer currentYearMonth);
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.lideeyunji.core.framework.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.lideeyunji.core.framework.entity.GrBiStLot;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 物料产品库存统计表Mapper接口
|
||||
*
|
||||
* @author king
|
||||
* @date 2026-03-12
|
||||
*/
|
||||
public interface GrBiStLotMapper extends BaseMapper<GrBiStLot>
|
||||
{
|
||||
/**
|
||||
* 查询物料产品库存统计表
|
||||
*
|
||||
* @param ID 物料产品库存统计表主键
|
||||
* @return 物料产品库存统计表
|
||||
*/
|
||||
public GrBiStLot selectGrBiStLotByID(Long ID);
|
||||
|
||||
/**
|
||||
* 查询物料产品库存统计表列表
|
||||
*
|
||||
* @param grBiStLot 物料产品库存统计表
|
||||
* @return 物料产品库存统计表集合
|
||||
*/
|
||||
public List<GrBiStLot> selectGrBiStLotList(GrBiStLot grBiStLot);
|
||||
|
||||
/**
|
||||
* 新增物料产品库存统计表
|
||||
*
|
||||
* @param grBiStLot 物料产品库存统计表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGrBiStLot(GrBiStLot grBiStLot);
|
||||
|
||||
/**
|
||||
* 修改物料产品库存统计表
|
||||
*
|
||||
* @param grBiStLot 物料产品库存统计表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGrBiStLot(GrBiStLot grBiStLot);
|
||||
|
||||
/**
|
||||
* 删除物料产品库存统计表
|
||||
*
|
||||
* @param ID 物料产品库存统计表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGrBiStLotByID(Long ID);
|
||||
|
||||
/**
|
||||
* 批量删除物料产品库存统计表
|
||||
*
|
||||
* @param IDs 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGrBiStLotByIDs(Long[] IDs);
|
||||
|
||||
@DS(value = "#dataSourceType")
|
||||
default List<GrBiStLot> getStLotList(@Param("dataSourceType") String dataSourceType){
|
||||
return this.selectList(new QueryWrapper<>());
|
||||
}
|
||||
|
||||
@DS(value = "#dataSourceType")
|
||||
default int deleteOldStLot(@Param("dataSourceType") String dataSourceType){
|
||||
return this.delete(new QueryWrapper<>());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.lideeyunji.core.framework.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.lideeyunji.core.framework.entity.GrBiStProductAvl;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 产品可销库存Mapper接口
|
||||
*
|
||||
* @author king
|
||||
* @date 2026-03-12
|
||||
*/
|
||||
public interface GrBiStProductAvlMapper extends BaseMapper<GrBiStProductAvl>
|
||||
{
|
||||
/**
|
||||
* 查询产品可销库存
|
||||
*
|
||||
* @param ID 产品可销库存主键
|
||||
* @return 产品可销库存
|
||||
*/
|
||||
public GrBiStProductAvl selectGrBiStProductAvlByID(Long ID);
|
||||
|
||||
/**
|
||||
* 查询产品可销库存列表
|
||||
*
|
||||
* @param grBiStProductAvl 产品可销库存
|
||||
* @return 产品可销库存集合
|
||||
*/
|
||||
public List<GrBiStProductAvl> selectGrBiStProductAvlList(GrBiStProductAvl grBiStProductAvl);
|
||||
|
||||
/**
|
||||
* 新增产品可销库存
|
||||
*
|
||||
* @param grBiStProductAvl 产品可销库存
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGrBiStProductAvl(GrBiStProductAvl grBiStProductAvl);
|
||||
|
||||
/**
|
||||
* 修改产品可销库存
|
||||
*
|
||||
* @param grBiStProductAvl 产品可销库存
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGrBiStProductAvl(GrBiStProductAvl grBiStProductAvl);
|
||||
|
||||
/**
|
||||
* 删除产品可销库存
|
||||
*
|
||||
* @param ID 产品可销库存主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGrBiStProductAvlByID(Long ID);
|
||||
|
||||
/**
|
||||
* 批量删除产品可销库存
|
||||
*
|
||||
* @param IDs 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGrBiStProductAvlByIDs(Long[] IDs);
|
||||
|
||||
@DS(value = "#dataSourceType")
|
||||
default List<GrBiStProductAvl> getStProductList(@Param("dataSourceType") String dataSourceType){
|
||||
return this.selectList(new QueryWrapper<>());
|
||||
}
|
||||
|
||||
@DS(value = "#dataSourceType")
|
||||
default int deleteOldStProduct(@Param("dataSourceType") String dataSourceType){
|
||||
return this.delete(new QueryWrapper<>());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.lideeyunji.core.framework.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.lideeyunji.core.framework.entity.GrBiStProduct;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 库存产品占比表Mapper接口
|
||||
*
|
||||
* @author king
|
||||
* @date 2026-03-12
|
||||
*/
|
||||
public interface GrBiStProductMapper extends BaseMapper<GrBiStProduct>
|
||||
{
|
||||
/**
|
||||
* 查询库存产品占比表
|
||||
*
|
||||
* @param ID 库存产品占比表主键
|
||||
* @return 库存产品占比表
|
||||
*/
|
||||
public GrBiStProduct selectGrBiStProductByID(Long ID);
|
||||
|
||||
/**
|
||||
* 查询库存产品占比表列表
|
||||
*
|
||||
* @param grBiStProduct 库存产品占比表
|
||||
* @return 库存产品占比表集合
|
||||
*/
|
||||
public List<GrBiStProduct> selectGrBiStProductList(GrBiStProduct grBiStProduct);
|
||||
|
||||
/**
|
||||
* 新增库存产品占比表
|
||||
*
|
||||
* @param grBiStProduct 库存产品占比表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGrBiStProduct(GrBiStProduct grBiStProduct);
|
||||
|
||||
/**
|
||||
* 修改库存产品占比表
|
||||
*
|
||||
* @param grBiStProduct 库存产品占比表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGrBiStProduct(GrBiStProduct grBiStProduct);
|
||||
|
||||
/**
|
||||
* 删除库存产品占比表
|
||||
*
|
||||
* @param ID 库存产品占比表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGrBiStProductByID(Long ID);
|
||||
|
||||
/**
|
||||
* 批量删除库存产品占比表
|
||||
*
|
||||
* @param IDs 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGrBiStProductByIDs(Long[] IDs);
|
||||
|
||||
@DS(value = "#dataSourceType")
|
||||
default List<GrBiStProduct> getStProductList(@Param("dataSourceType") String dataSourceType){
|
||||
return this.selectList(new QueryWrapper<>());
|
||||
}
|
||||
|
||||
@DS(value = "#dataSourceType")
|
||||
default int deleteOldStProduct(@Param("dataSourceType") String dataSourceType){
|
||||
return this.delete(new QueryWrapper<>());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.lideeyunji.core.framework.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.lideeyunji.core.framework.entity.GrBiFsBusinessReal;
|
||||
|
||||
/**
|
||||
* 经营指标完成情况Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-03-12
|
||||
*/
|
||||
public interface IGrBiFsBusinessRealService
|
||||
{
|
||||
/**
|
||||
* 查询经营指标完成情况
|
||||
*
|
||||
* @param ID 经营指标完成情况主键
|
||||
* @return 经营指标完成情况
|
||||
*/
|
||||
public GrBiFsBusinessReal selectGrBiFsBusinessRealByID(String ID);
|
||||
|
||||
/**
|
||||
* 查询经营指标完成情况列表
|
||||
*
|
||||
* @param grBiFsBusinessReal 经营指标完成情况
|
||||
* @return 经营指标完成情况集合
|
||||
*/
|
||||
public List<GrBiFsBusinessReal> selectGrBiFsBusinessRealList(GrBiFsBusinessReal grBiFsBusinessReal);
|
||||
|
||||
/**
|
||||
* 新增经营指标完成情况
|
||||
*
|
||||
* @param grBiFsBusinessReal 经营指标完成情况
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGrBiFsBusinessReal(GrBiFsBusinessReal grBiFsBusinessReal);
|
||||
|
||||
/**
|
||||
* 修改经营指标完成情况
|
||||
*
|
||||
* @param grBiFsBusinessReal 经营指标完成情况
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGrBiFsBusinessReal(GrBiFsBusinessReal grBiFsBusinessReal);
|
||||
|
||||
/**
|
||||
* 批量删除经营指标完成情况
|
||||
*
|
||||
* @param IDs 需要删除的经营指标完成情况主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGrBiFsBusinessRealByIDs(String[] IDs);
|
||||
|
||||
/**
|
||||
* 删除经营指标完成情况信息
|
||||
*
|
||||
* @param ID 经营指标完成情况主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGrBiFsBusinessRealByID(String ID);
|
||||
|
||||
void generateBusinessReal(String dataSourceType);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.lideeyunji.core.framework.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.lideeyunji.core.framework.entity.GrBiStLot;
|
||||
|
||||
/**
|
||||
* 物料产品库存统计表Service接口
|
||||
*
|
||||
* @author king
|
||||
* @date 2026-03-12
|
||||
*/
|
||||
public interface IGrBiStLotService
|
||||
{
|
||||
/**
|
||||
* 查询物料产品库存统计表
|
||||
*
|
||||
* @param ID 物料产品库存统计表主键
|
||||
* @return 物料产品库存统计表
|
||||
*/
|
||||
public GrBiStLot selectGrBiStLotByID(Long ID);
|
||||
|
||||
/**
|
||||
* 查询物料产品库存统计表列表
|
||||
*
|
||||
* @param grBiStLot 物料产品库存统计表
|
||||
* @return 物料产品库存统计表集合
|
||||
*/
|
||||
public List<GrBiStLot> selectGrBiStLotList(GrBiStLot grBiStLot);
|
||||
|
||||
/**
|
||||
* 新增物料产品库存统计表
|
||||
*
|
||||
* @param grBiStLot 物料产品库存统计表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGrBiStLot(GrBiStLot grBiStLot);
|
||||
|
||||
/**
|
||||
* 修改物料产品库存统计表
|
||||
*
|
||||
* @param grBiStLot 物料产品库存统计表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGrBiStLot(GrBiStLot grBiStLot);
|
||||
|
||||
/**
|
||||
* 批量删除物料产品库存统计表
|
||||
*
|
||||
* @param IDs 需要删除的物料产品库存统计表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGrBiStLotByIDs(Long[] IDs);
|
||||
|
||||
/**
|
||||
* 删除物料产品库存统计表信息
|
||||
*
|
||||
* @param ID 物料产品库存统计表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGrBiStLotByID(Long ID);
|
||||
|
||||
void generateStLot(String dataSourceType);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.lideeyunji.core.framework.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.lideeyunji.core.framework.entity.GrBiStProductAvl;
|
||||
|
||||
/**
|
||||
* 产品可销库存Service接口
|
||||
*
|
||||
* @author king
|
||||
* @date 2026-03-12
|
||||
*/
|
||||
public interface IGrBiStProductAvlService
|
||||
{
|
||||
/**
|
||||
* 查询产品可销库存
|
||||
*
|
||||
* @param ID 产品可销库存主键
|
||||
* @return 产品可销库存
|
||||
*/
|
||||
public GrBiStProductAvl selectGrBiStProductAvlByID(Long ID);
|
||||
|
||||
/**
|
||||
* 查询产品可销库存列表
|
||||
*
|
||||
* @param grBiStProductAvl 产品可销库存
|
||||
* @return 产品可销库存集合
|
||||
*/
|
||||
public List<GrBiStProductAvl> selectGrBiStProductAvlList(GrBiStProductAvl grBiStProductAvl);
|
||||
|
||||
/**
|
||||
* 新增产品可销库存
|
||||
*
|
||||
* @param grBiStProductAvl 产品可销库存
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGrBiStProductAvl(GrBiStProductAvl grBiStProductAvl);
|
||||
|
||||
/**
|
||||
* 修改产品可销库存
|
||||
*
|
||||
* @param grBiStProductAvl 产品可销库存
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGrBiStProductAvl(GrBiStProductAvl grBiStProductAvl);
|
||||
|
||||
/**
|
||||
* 批量删除产品可销库存
|
||||
*
|
||||
* @param IDs 需要删除的产品可销库存主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGrBiStProductAvlByIDs(Long[] IDs);
|
||||
|
||||
/**
|
||||
* 删除产品可销库存信息
|
||||
*
|
||||
* @param ID 产品可销库存主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGrBiStProductAvlByID(Long ID);
|
||||
|
||||
void generateStProductAvl(String dataSourceType);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.lideeyunji.core.framework.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.lideeyunji.core.framework.entity.GrBiStProduct;
|
||||
|
||||
/**
|
||||
* 库存产品占比表Service接口
|
||||
*
|
||||
* @author king
|
||||
* @date 2026-03-12
|
||||
*/
|
||||
public interface IGrBiStProductService
|
||||
{
|
||||
/**
|
||||
* 查询库存产品占比表
|
||||
*
|
||||
* @param ID 库存产品占比表主键
|
||||
* @return 库存产品占比表
|
||||
*/
|
||||
public GrBiStProduct selectGrBiStProductByID(Long ID);
|
||||
|
||||
/**
|
||||
* 查询库存产品占比表列表
|
||||
*
|
||||
* @param grBiStProduct 库存产品占比表
|
||||
* @return 库存产品占比表集合
|
||||
*/
|
||||
public List<GrBiStProduct> selectGrBiStProductList(GrBiStProduct grBiStProduct);
|
||||
|
||||
/**
|
||||
* 新增库存产品占比表
|
||||
*
|
||||
* @param grBiStProduct 库存产品占比表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGrBiStProduct(GrBiStProduct grBiStProduct);
|
||||
|
||||
/**
|
||||
* 修改库存产品占比表
|
||||
*
|
||||
* @param grBiStProduct 库存产品占比表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGrBiStProduct(GrBiStProduct grBiStProduct);
|
||||
|
||||
/**
|
||||
* 批量删除库存产品占比表
|
||||
*
|
||||
* @param IDs 需要删除的库存产品占比表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGrBiStProductByIDs(Long[] IDs);
|
||||
|
||||
/**
|
||||
* 删除库存产品占比表信息
|
||||
*
|
||||
* @param ID 库存产品占比表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGrBiStProductByID(Long ID);
|
||||
|
||||
void generateStProduct(String dataSourceType);
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.lideeyunji.core.framework.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.lideeyunji.core.framework.entity.GrBiFsBusinessReal;
|
||||
import com.lideeyunji.core.framework.mapper.GrBiFsBusinessRealMapper;
|
||||
import com.lideeyunji.core.framework.service.IGrBiFsBusinessRealService;
|
||||
import com.lideeyunji.tool.framework.common.constant.lideeYunJiBaseConstant;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 经营指标完成情况Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-03-12
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class GrBiFsBusinessRealServiceImpl extends ServiceImpl<GrBiFsBusinessRealMapper, GrBiFsBusinessReal> implements IGrBiFsBusinessRealService
|
||||
{
|
||||
|
||||
|
||||
@Override
|
||||
@DS(value = "#dataSourceType")
|
||||
public void generateBusinessReal(String dataSourceType) {
|
||||
//获取本地mysql数据库中表中UPDATE_TIME最新的数据
|
||||
LambdaQueryWrapper<GrBiFsBusinessReal> queryWrapper = new LambdaQueryWrapper<GrBiFsBusinessReal>().orderByDesc(GrBiFsBusinessReal::getUseYear, GrBiFsBusinessReal::getUseMonth).last("LIMIT 1");
|
||||
GrBiFsBusinessReal real = this.baseMapper.selectOne(queryWrapper);
|
||||
int lastUserYear = 2022;
|
||||
int lastUserMonth = 1;
|
||||
if(real != null){
|
||||
lastUserYear = Integer.parseInt(real.getUseYear());
|
||||
lastUserMonth = Integer.parseInt(real.getUseMonth());
|
||||
}
|
||||
// 获取当前时间的年和月
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
int currentYear = now.getYear();
|
||||
int currentMonth = now.getMonthValue();
|
||||
|
||||
// 获取三个月前的时间和年月
|
||||
LocalDateTime threeMonthsAgo = now.minusMonths(3);
|
||||
int pastYear = threeMonthsAgo.getYear();
|
||||
int pastMonth = threeMonthsAgo.getMonthValue();
|
||||
|
||||
log.info("最后更新的年月:{}年{}月", lastUserYear, lastUserMonth);
|
||||
log.info("当前:{}年{}月", currentYear, currentMonth);
|
||||
log.info("三个月前:{}年{}月", pastYear, pastMonth);
|
||||
if (lastUserYear < pastYear || (lastUserYear == pastYear && lastUserMonth < pastMonth)) {
|
||||
pastYear = lastUserYear;
|
||||
pastMonth = lastUserMonth;
|
||||
}
|
||||
log.info("开始时间:{}年{}月, 结束时间:{}年{}月", pastYear, pastMonth, currentYear, currentMonth);
|
||||
|
||||
// 获取三个月前的数据
|
||||
List<GrBiFsBusinessReal> grBiSaSetdtlList = this.baseMapper.getBusinessRealList(lideeYunJiBaseConstant.DS_ORACLE_GRYYBI,pastYear * 100 + pastMonth, currentYear * 100 + currentMonth);
|
||||
if (CollUtil.isEmpty(grBiSaSetdtlList)) {
|
||||
return;
|
||||
}
|
||||
//保存数据
|
||||
int reNum = this.baseMapper.deleteOldBusinessReal(lideeYunJiBaseConstant.DS_ERP_BI_DATA,pastYear * 100 + pastMonth, currentYear * 100 + currentMonth);
|
||||
log.info("删除数量:{}", reNum);
|
||||
for (GrBiFsBusinessReal grBiSaSetdtl : grBiSaSetdtlList) {
|
||||
int re = this.baseMapper.insert(grBiSaSetdtl);
|
||||
if (re < 1) {
|
||||
throw new RuntimeException("批量新增异常");
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 查询经营指标完成情况
|
||||
*
|
||||
* @param ID 经营指标完成情况主键
|
||||
* @return 经营指标完成情况
|
||||
*/
|
||||
@Override
|
||||
public GrBiFsBusinessReal selectGrBiFsBusinessRealByID(String ID)
|
||||
{
|
||||
return this.baseMapper.selectGrBiFsBusinessRealByID(ID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询经营指标完成情况列表
|
||||
*
|
||||
* @param grBiFsBusinessReal 经营指标完成情况
|
||||
* @return 经营指标完成情况
|
||||
*/
|
||||
@Override
|
||||
public List<GrBiFsBusinessReal> selectGrBiFsBusinessRealList(GrBiFsBusinessReal grBiFsBusinessReal)
|
||||
{
|
||||
return this.baseMapper.selectGrBiFsBusinessRealList(grBiFsBusinessReal);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增经营指标完成情况
|
||||
*
|
||||
* @param grBiFsBusinessReal 经营指标完成情况
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertGrBiFsBusinessReal(GrBiFsBusinessReal grBiFsBusinessReal)
|
||||
{
|
||||
return this.baseMapper.insertGrBiFsBusinessReal(grBiFsBusinessReal);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改经营指标完成情况
|
||||
*
|
||||
* @param grBiFsBusinessReal 经营指标完成情况
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateGrBiFsBusinessReal(GrBiFsBusinessReal grBiFsBusinessReal)
|
||||
{
|
||||
return this.baseMapper.updateGrBiFsBusinessReal(grBiFsBusinessReal);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除经营指标完成情况
|
||||
*
|
||||
* @param IDs 需要删除的经营指标完成情况主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGrBiFsBusinessRealByIDs(String[] IDs)
|
||||
{
|
||||
return this.baseMapper.deleteGrBiFsBusinessRealByIDs(IDs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除经营指标完成情况信息
|
||||
*
|
||||
* @param ID 经营指标完成情况主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGrBiFsBusinessRealByID(String ID)
|
||||
{
|
||||
return this.baseMapper.deleteGrBiFsBusinessRealByID(ID);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.lideeyunji.core.framework.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.lideeyunji.core.framework.entity.GrBiStLot;
|
||||
import com.lideeyunji.core.framework.mapper.GrBiStLotMapper;
|
||||
import com.lideeyunji.core.framework.service.IGrBiStLotService;
|
||||
import com.lideeyunji.tool.framework.common.constant.lideeYunJiBaseConstant;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料产品库存统计表Service业务层处理
|
||||
*
|
||||
* @author king
|
||||
* @date 2026-03-12
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class GrBiStLotServiceImpl extends ServiceImpl<GrBiStLotMapper, GrBiStLot> implements IGrBiStLotService
|
||||
{
|
||||
|
||||
@Override
|
||||
@DS(value = "#dataSourceType")
|
||||
public void generateStLot(String dataSourceType) {
|
||||
//获取本地mysql数据库中表中UPDATE_TIME最新的数据
|
||||
// LambdaQueryWrapper<GrBiStLot> queryWrapper = new LambdaQueryWrapper<GrBiStLot>().orderByDesc(GrBiStLot::getUseYear, GrBiStLot::getUseMonth).last("LIMIT 1");
|
||||
// GrBiStLot real = this.baseMapper.selectOne(queryWrapper);
|
||||
// int lastUserYear = 2022;
|
||||
// int lastUserMonth = 1;
|
||||
// if(real != null){
|
||||
// lastUserYear = Integer.parseInt(real.getUseYear());
|
||||
// lastUserMonth = Integer.parseInt(real.getUseMonth());
|
||||
// }
|
||||
// // 获取当前时间的年和月
|
||||
// LocalDateTime now = LocalDateTime.now();
|
||||
// int currentYear = now.getYear();
|
||||
// int currentMonth = now.getMonthValue();
|
||||
//
|
||||
// // 获取三个月前的时间和年月
|
||||
// LocalDateTime threeMonthsAgo = now.minusMonths(3);
|
||||
// int pastYear = threeMonthsAgo.getYear();
|
||||
// int pastMonth = threeMonthsAgo.getMonthValue();
|
||||
//
|
||||
// log.info("最后更新的年月:{}年{}月", lastUserYear, lastUserMonth);
|
||||
// log.info("当前:{}年{}月", currentYear, currentMonth);
|
||||
// log.info("三个月前:{}年{}月", pastYear, pastMonth);
|
||||
// if (lastUserYear < pastYear || (lastUserYear == pastYear && lastUserMonth < pastMonth)) {
|
||||
// pastYear = lastUserYear;
|
||||
// pastMonth = lastUserMonth;
|
||||
// }
|
||||
// log.info("开始时间:{}年{}月, 结束时间:{}年{}月", pastYear, pastMonth, currentYear, currentMonth);
|
||||
|
||||
// 获取数据
|
||||
List<GrBiStLot> grBiSaSetdtlList = this.baseMapper.getStLotList(lideeYunJiBaseConstant.DS_ORACLE_GRYYBI);
|
||||
if (CollUtil.isEmpty(grBiSaSetdtlList)) {
|
||||
return;
|
||||
}
|
||||
//保存数据
|
||||
int reNum = this.baseMapper.deleteOldStLot(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
||||
log.info("删除数量:{}", reNum);
|
||||
for (GrBiStLot grBiSaSetdtl : grBiSaSetdtlList) {
|
||||
int re = this.baseMapper.insert(grBiSaSetdtl);
|
||||
if (re < 1) {
|
||||
throw new RuntimeException("批量新增异常");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询物料产品库存统计表
|
||||
*
|
||||
* @param ID 物料产品库存统计表主键
|
||||
* @return 物料产品库存统计表
|
||||
*/
|
||||
@Override
|
||||
public GrBiStLot selectGrBiStLotByID(Long ID)
|
||||
{
|
||||
return this.baseMapper.selectGrBiStLotByID(ID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询物料产品库存统计表列表
|
||||
*
|
||||
* @param grBiStLot 物料产品库存统计表
|
||||
* @return 物料产品库存统计表
|
||||
*/
|
||||
@Override
|
||||
public List<GrBiStLot> selectGrBiStLotList(GrBiStLot grBiStLot)
|
||||
{
|
||||
return this.baseMapper.selectGrBiStLotList(grBiStLot);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物料产品库存统计表
|
||||
*
|
||||
* @param grBiStLot 物料产品库存统计表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertGrBiStLot(GrBiStLot grBiStLot)
|
||||
{
|
||||
return this.baseMapper.insertGrBiStLot(grBiStLot);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料产品库存统计表
|
||||
*
|
||||
* @param grBiStLot 物料产品库存统计表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateGrBiStLot(GrBiStLot grBiStLot)
|
||||
{
|
||||
return this.baseMapper.updateGrBiStLot(grBiStLot);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除物料产品库存统计表
|
||||
*
|
||||
* @param IDs 需要删除的物料产品库存统计表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGrBiStLotByIDs(Long[] IDs)
|
||||
{
|
||||
return this.baseMapper.deleteGrBiStLotByIDs(IDs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除物料产品库存统计表信息
|
||||
*
|
||||
* @param ID 物料产品库存统计表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGrBiStLotByID(Long ID)
|
||||
{
|
||||
return this.baseMapper.deleteGrBiStLotByID(ID);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
package com.lideeyunji.core.framework.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.lideeyunji.core.framework.entity.GrBiStProduct;
|
||||
import com.lideeyunji.tool.framework.common.constant.lideeYunJiBaseConstant;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.lideeyunji.core.framework.mapper.GrBiStProductAvlMapper;
|
||||
import com.lideeyunji.core.framework.entity.GrBiStProductAvl;
|
||||
import com.lideeyunji.core.framework.service.IGrBiStProductAvlService;
|
||||
|
||||
/**
|
||||
* 产品可销库存Service业务层处理
|
||||
*
|
||||
* @author king
|
||||
* @date 2026-03-12
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class GrBiStProductAvlServiceImpl extends ServiceImpl<GrBiStProductAvlMapper, GrBiStProductAvl> implements IGrBiStProductAvlService
|
||||
{
|
||||
|
||||
@Override
|
||||
@DS(value = "#dataSourceType")
|
||||
public void generateStProductAvl(String dataSourceType) {
|
||||
//获取本地mysql数据库中表中UPDATE_TIME最新的数据
|
||||
// LambdaQueryWrapper<grBiStProductAvl> queryWrapper = new LambdaQueryWrapper<grBiStProductAvl>().orderByDesc(grBiStProductAvl::getUseYear, grBiStProductAvl::getUseMonth).last("LIMIT 1");
|
||||
// grBiStProductAvl real = this.baseMapper.selectOne(queryWrapper);
|
||||
// int lastUserYear = 2022;
|
||||
// int lastUserMonth = 1;
|
||||
// if(real != null){
|
||||
// lastUserYear = Integer.parseInt(real.getUseYear());
|
||||
// lastUserMonth = Integer.parseInt(real.getUseMonth());
|
||||
// }
|
||||
// // 获取当前时间的年和月
|
||||
// LocalDateTime now = LocalDateTime.now();
|
||||
// int currentYear = now.getYear();
|
||||
// int currentMonth = now.getMonthValue();
|
||||
//
|
||||
// // 获取三个月前的时间和年月
|
||||
// LocalDateTime threeMonthsAgo = now.minusMonths(3);
|
||||
// int pastYear = threeMonthsAgo.getYear();
|
||||
// int pastMonth = threeMonthsAgo.getMonthValue();
|
||||
//
|
||||
// log.info("最后更新的年月:{}年{}月", lastUserYear, lastUserMonth);
|
||||
// log.info("当前:{}年{}月", currentYear, currentMonth);
|
||||
// log.info("三个月前:{}年{}月", pastYear, pastMonth);
|
||||
// if (lastUserYear < pastYear || (lastUserYear == pastYear && lastUserMonth < pastMonth)) {
|
||||
// pastYear = lastUserYear;
|
||||
// pastMonth = lastUserMonth;
|
||||
// }
|
||||
// log.info("开始时间:{}年{}月, 结束时间:{}年{}月", pastYear, pastMonth, currentYear, currentMonth);
|
||||
|
||||
// 获取数据
|
||||
List<GrBiStProductAvl> grBiSaSetdtlList = this.baseMapper.getStProductList(lideeYunJiBaseConstant.DS_ORACLE_GRYYBI);
|
||||
if (CollUtil.isEmpty(grBiSaSetdtlList)) {
|
||||
return;
|
||||
}
|
||||
//保存数据
|
||||
int reNum = this.baseMapper.deleteOldStProduct(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
||||
log.info("删除数量:{}", reNum);
|
||||
for (GrBiStProductAvl grBiStProductAvl : grBiSaSetdtlList) {
|
||||
int re = this.baseMapper.insert(grBiStProductAvl);
|
||||
if (re < 1) {
|
||||
throw new RuntimeException("批量新增异常");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 查询产品可销库存
|
||||
*
|
||||
* @param ID 产品可销库存主键
|
||||
* @return 产品可销库存
|
||||
*/
|
||||
@Override
|
||||
public GrBiStProductAvl selectGrBiStProductAvlByID(Long ID)
|
||||
{
|
||||
return this.baseMapper.selectGrBiStProductAvlByID(ID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产品可销库存列表
|
||||
*
|
||||
* @param grBiStProductAvl 产品可销库存
|
||||
* @return 产品可销库存
|
||||
*/
|
||||
@Override
|
||||
public List<GrBiStProductAvl> selectGrBiStProductAvlList(GrBiStProductAvl grBiStProductAvl)
|
||||
{
|
||||
return this.baseMapper.selectGrBiStProductAvlList(grBiStProductAvl);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增产品可销库存
|
||||
*
|
||||
* @param grBiStProductAvl 产品可销库存
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertGrBiStProductAvl(GrBiStProductAvl grBiStProductAvl)
|
||||
{
|
||||
return this.baseMapper.insertGrBiStProductAvl(grBiStProductAvl);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产品可销库存
|
||||
*
|
||||
* @param grBiStProductAvl 产品可销库存
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateGrBiStProductAvl(GrBiStProductAvl grBiStProductAvl)
|
||||
{
|
||||
return this.baseMapper.updateGrBiStProductAvl(grBiStProductAvl);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除产品可销库存
|
||||
*
|
||||
* @param IDs 需要删除的产品可销库存主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGrBiStProductAvlByIDs(Long[] IDs)
|
||||
{
|
||||
return this.baseMapper.deleteGrBiStProductAvlByIDs(IDs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除产品可销库存信息
|
||||
*
|
||||
* @param ID 产品可销库存主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGrBiStProductAvlByID(Long ID)
|
||||
{
|
||||
return this.baseMapper.deleteGrBiStProductAvlByID(ID);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
package com.lideeyunji.core.framework.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.lideeyunji.core.framework.entity.GrBiStProduct;
|
||||
import com.lideeyunji.tool.framework.common.constant.lideeYunJiBaseConstant;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.lideeyunji.core.framework.mapper.GrBiStProductMapper;
|
||||
import com.lideeyunji.core.framework.entity.GrBiStProduct;
|
||||
import com.lideeyunji.core.framework.service.IGrBiStProductService;
|
||||
|
||||
/**
|
||||
* 库存产品占比表Service业务层处理
|
||||
*
|
||||
* @author king
|
||||
* @date 2026-03-12
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class GrBiStProductServiceImpl extends ServiceImpl<GrBiStProductMapper, GrBiStProduct> implements IGrBiStProductService
|
||||
{
|
||||
@Override
|
||||
@DS(value = "#dataSourceType")
|
||||
public void generateStProduct(String dataSourceType) {
|
||||
//获取本地mysql数据库中表中UPDATE_TIME最新的数据
|
||||
// LambdaQueryWrapper<GrBiStProduct> queryWrapper = new LambdaQueryWrapper<GrBiStProduct>().orderByDesc(GrBiStProduct::getUseYear, GrBiStProduct::getUseMonth).last("LIMIT 1");
|
||||
// GrBiStProduct real = this.baseMapper.selectOne(queryWrapper);
|
||||
// int lastUserYear = 2022;
|
||||
// int lastUserMonth = 1;
|
||||
// if(real != null){
|
||||
// lastUserYear = Integer.parseInt(real.getUseYear());
|
||||
// lastUserMonth = Integer.parseInt(real.getUseMonth());
|
||||
// }
|
||||
// // 获取当前时间的年和月
|
||||
// LocalDateTime now = LocalDateTime.now();
|
||||
// int currentYear = now.getYear();
|
||||
// int currentMonth = now.getMonthValue();
|
||||
//
|
||||
// // 获取三个月前的时间和年月
|
||||
// LocalDateTime threeMonthsAgo = now.minusMonths(3);
|
||||
// int pastYear = threeMonthsAgo.getYear();
|
||||
// int pastMonth = threeMonthsAgo.getMonthValue();
|
||||
//
|
||||
// log.info("最后更新的年月:{}年{}月", lastUserYear, lastUserMonth);
|
||||
// log.info("当前:{}年{}月", currentYear, currentMonth);
|
||||
// log.info("三个月前:{}年{}月", pastYear, pastMonth);
|
||||
// if (lastUserYear < pastYear || (lastUserYear == pastYear && lastUserMonth < pastMonth)) {
|
||||
// pastYear = lastUserYear;
|
||||
// pastMonth = lastUserMonth;
|
||||
// }
|
||||
// log.info("开始时间:{}年{}月, 结束时间:{}年{}月", pastYear, pastMonth, currentYear, currentMonth);
|
||||
|
||||
// 获取数据
|
||||
List<GrBiStProduct> grBiSaSetdtlList = this.baseMapper.getStProductList(lideeYunJiBaseConstant.DS_ORACLE_GRYYBI);
|
||||
if (CollUtil.isEmpty(grBiSaSetdtlList)) {
|
||||
return;
|
||||
}
|
||||
//保存数据
|
||||
int reNum = this.baseMapper.deleteOldStProduct(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
||||
log.info("删除数量:{}", reNum);
|
||||
for (GrBiStProduct grBiSaSetdtl : grBiSaSetdtlList) {
|
||||
int re = this.baseMapper.insert(grBiSaSetdtl);
|
||||
if (re < 1) {
|
||||
throw new RuntimeException("批量新增异常");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询库存产品占比表
|
||||
*
|
||||
* @param ID 库存产品占比表主键
|
||||
* @return 库存产品占比表
|
||||
*/
|
||||
@Override
|
||||
public GrBiStProduct selectGrBiStProductByID(Long ID)
|
||||
{
|
||||
return this.baseMapper.selectGrBiStProductByID(ID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询库存产品占比表列表
|
||||
*
|
||||
* @param grBiStProduct 库存产品占比表
|
||||
* @return 库存产品占比表
|
||||
*/
|
||||
@Override
|
||||
public List<GrBiStProduct> selectGrBiStProductList(GrBiStProduct grBiStProduct)
|
||||
{
|
||||
return this.baseMapper.selectGrBiStProductList(grBiStProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存产品占比表
|
||||
*
|
||||
* @param grBiStProduct 库存产品占比表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertGrBiStProduct(GrBiStProduct grBiStProduct)
|
||||
{
|
||||
return this.baseMapper.insertGrBiStProduct(grBiStProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存产品占比表
|
||||
*
|
||||
* @param grBiStProduct 库存产品占比表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateGrBiStProduct(GrBiStProduct grBiStProduct)
|
||||
{
|
||||
return this.baseMapper.updateGrBiStProduct(grBiStProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除库存产品占比表
|
||||
*
|
||||
* @param IDs 需要删除的库存产品占比表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGrBiStProductByIDs(Long[] IDs)
|
||||
{
|
||||
return this.baseMapper.deleteGrBiStProductByIDs(IDs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除库存产品占比表信息
|
||||
*
|
||||
* @param ID 库存产品占比表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGrBiStProductByID(Long ID)
|
||||
{
|
||||
return this.baseMapper.deleteGrBiStProductByID(ID);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
<?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">
|
||||
<mapper namespace="com.lideeyunji.core.framework.mapper.GrBiFsBusinessRealMapper">
|
||||
|
||||
<resultMap type="com.lideeyunji.core.framework.entity.GrBiFsBusinessReal" id="GrBiFsBusinessRealResult">
|
||||
<result property="id" column="ID" />
|
||||
<result property="useYear" column="USEYEAR" />
|
||||
<result property="useMonth" column="USEMONTH" />
|
||||
<result property="itemId" column="ITEMID" />
|
||||
<result property="itemName" column="ITEMNAME" />
|
||||
<result property="itemOrder" column="ITEMORDER" />
|
||||
<result property="monthReal" column="MONTH_REAL" />
|
||||
<result property="yearReal" column="YEAR_REAL" />
|
||||
<result property="monthDiff" column="MONTH_DIFF" />
|
||||
<result property="yearPlan" column="YEAR_PLAN" />
|
||||
<result property="yearRate" column="YEAR_RATE" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGrBiFsBusinessRealVo">
|
||||
select ID, USEYEAR, USEMONTH, ITEMID, ITEMNAME, ITEMORDER, MONTH_REAL, YEAR_REAL, MONTH_DIFF, YEAR_PLAN, YEAR_RATE from gr_bi_fs_business_real
|
||||
</sql>
|
||||
<select id="getBusinessRealList" resultMap="GrBiFsBusinessRealResult">
|
||||
<include refid="selectGrBiFsBusinessRealVo"/>
|
||||
<where>
|
||||
USEYEAR is not NULL
|
||||
and (USEYEAR * 100 + USEMONTH) BETWEEN #{pastYearMonth} AND #{currentYearMonth}
|
||||
</where>
|
||||
order by USEYEAR, USEMONTH
|
||||
</select>
|
||||
<delete id="deleteOldBusinessReal">
|
||||
delete from gr_bi_fs_business_real
|
||||
where (USEYEAR * 100 + USEMONTH) BETWEEN #{pastYearMonth} AND #{currentYearMonth}
|
||||
</delete>
|
||||
<select id="selectGrBiFsBusinessRealList" parameterType="com.lideeyunji.core.framework.entity.GrBiFsBusinessReal" resultMap="GrBiFsBusinessRealResult">
|
||||
<include refid="selectGrBiFsBusinessRealVo"/>
|
||||
<where>
|
||||
<if test="ID != null and ID != ''"> and ID = #{ID}</if>
|
||||
<if test="USEYEAR != null and USEYEAR != ''"> and USEYEAR = #{USEYEAR}</if>
|
||||
<if test="USEMONTH != null and USEMONTH != ''"> and USEMONTH = #{USEMONTH}</if>
|
||||
<if test="ITEMID != null and ITEMID != ''"> and ITEMID = #{ITEMID}</if>
|
||||
<if test="ITEMNAME != null and ITEMNAME != ''"> and ITEMNAME like concat('%', #{ITEMNAME}, '%')</if>
|
||||
<if test="ITEMORDER != null and ITEMORDER != ''"> and ITEMORDER = #{ITEMORDER}</if>
|
||||
<if test="monthReal != null and monthReal != ''"> and MONTH_REAL = #{monthReal}</if>
|
||||
<if test="yearReal != null and yearReal != ''"> and YEAR_REAL = #{yearReal}</if>
|
||||
<if test="monthDiff != null and monthDiff != ''"> and MONTH_DIFF = #{monthDiff}</if>
|
||||
<if test="yearPlan != null and yearPlan != ''"> and YEAR_PLAN = #{yearPlan}</if>
|
||||
<if test="yearRate != null and yearRate != ''"> and YEAR_RATE = #{yearRate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGrBiFsBusinessRealByID" parameterType="String" resultMap="GrBiFsBusinessRealResult">
|
||||
<include refid="selectGrBiFsBusinessRealVo"/>
|
||||
where ID = #{ID}
|
||||
</select>
|
||||
|
||||
<insert id="insertGrBiFsBusinessReal" parameterType="com.lideeyunji.core.framework.entity.GrBiFsBusinessReal">
|
||||
insert into gr_bi_fs_business_real
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="ID != null">ID,</if>
|
||||
<if test="USEYEAR != null">USEYEAR,</if>
|
||||
<if test="USEMONTH != null">USEMONTH,</if>
|
||||
<if test="ITEMID != null">ITEMID,</if>
|
||||
<if test="ITEMNAME != null">ITEMNAME,</if>
|
||||
<if test="ITEMORDER != null">ITEMORDER,</if>
|
||||
<if test="monthReal != null">MONTH_REAL,</if>
|
||||
<if test="yearReal != null">YEAR_REAL,</if>
|
||||
<if test="monthDiff != null">MONTH_DIFF,</if>
|
||||
<if test="yearPlan != null">YEAR_PLAN,</if>
|
||||
<if test="yearRate != null">YEAR_RATE,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="ID != null">#{ID},</if>
|
||||
<if test="USEYEAR != null">#{USEYEAR},</if>
|
||||
<if test="USEMONTH != null">#{USEMONTH},</if>
|
||||
<if test="ITEMID != null">#{ITEMID},</if>
|
||||
<if test="ITEMNAME != null">#{ITEMNAME},</if>
|
||||
<if test="ITEMORDER != null">#{ITEMORDER},</if>
|
||||
<if test="monthReal != null">#{monthReal},</if>
|
||||
<if test="yearReal != null">#{yearReal},</if>
|
||||
<if test="monthDiff != null">#{monthDiff},</if>
|
||||
<if test="yearPlan != null">#{yearPlan},</if>
|
||||
<if test="yearRate != null">#{yearRate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGrBiFsBusinessReal" parameterType="com.lideeyunji.core.framework.entity.GrBiFsBusinessReal">
|
||||
update gr_bi_fs_business_real
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="USEYEAR != null">USEYEAR = #{USEYEAR},</if>
|
||||
<if test="USEMONTH != null">USEMONTH = #{USEMONTH},</if>
|
||||
<if test="ITEMID != null">ITEMID = #{ITEMID},</if>
|
||||
<if test="ITEMNAME != null">ITEMNAME = #{ITEMNAME},</if>
|
||||
<if test="ITEMORDER != null">ITEMORDER = #{ITEMORDER},</if>
|
||||
<if test="monthReal != null">MONTH_REAL = #{monthReal},</if>
|
||||
<if test="yearReal != null">YEAR_REAL = #{yearReal},</if>
|
||||
<if test="monthDiff != null">MONTH_DIFF = #{monthDiff},</if>
|
||||
<if test="yearPlan != null">YEAR_PLAN = #{yearPlan},</if>
|
||||
<if test="yearRate != null">YEAR_RATE = #{yearRate},</if>
|
||||
</trim>
|
||||
where ID = #{ID}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGrBiFsBusinessRealByID" parameterType="String">
|
||||
delete from gr_bi_fs_business_real where ID = #{ID}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGrBiFsBusinessRealByIDs" parameterType="String">
|
||||
delete from gr_bi_fs_business_real where ID in
|
||||
<foreach item="ID" collection="array" open="(" separator="," close=")">
|
||||
#{ID}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,149 @@
|
||||
<?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">
|
||||
<mapper namespace="com.lideeyunji.core.framework.mapper.GrBiStLotMapper">
|
||||
|
||||
<resultMap type="com.lideeyunji.core.framework.entity.GrBiStLot" id="GrBiStLotResult">
|
||||
<result property="id" column="ID" />
|
||||
<result property="goodsId" column="GOODSID" />
|
||||
<result property="goodsName" column="GOODSNAME" />
|
||||
<result property="goodsType" column="GOODSTYPE" />
|
||||
<result property="goodsUnit" column="GOODSUNIT" />
|
||||
<result property="classid" column="CLASSID" />
|
||||
<result property="className" column="CLASSNAME" />
|
||||
<result property="lotId" column="LOTID" />
|
||||
<result property="lotNo" column="LOTNO" />
|
||||
<result property="goodsQty" column="GOODSQTY" />
|
||||
<result property="prodDate" column="PRODDATE" />
|
||||
<result property="invalidDate" column="INVALIDDATE" />
|
||||
<result property="invalidDays" column="INVALIDDAYS" />
|
||||
<result property="stInDate" column="STINDATE" />
|
||||
<result property="stOutDate" column="STOUTDATE" />
|
||||
<result property="invalidDaysTypeId" column="INVALIDDAYSTYPEID" />
|
||||
<result property="invalidDaysType" column="INVALIDDAYSTYPE" />
|
||||
<result property="outType" column="OUTTYPE" />
|
||||
<result property="storageId" column="STORAGEID" />
|
||||
<result property="storageName" column="STORAGENAME" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGrBiStLotVo">
|
||||
select ID, GOODSID, GOODSNAME, GOODSTYPE, GOODSUNIT, CLASSID, CLASSNAME, LOTID, LOTNO, GOODSQTY, PRODDATE, INVALIDDATE, INVALIDDAYS, STINDATE, STOUTDATE, INVALIDDAYSTYPEID, INVALIDDAYSTYPE, OUTTYPE, STORAGEID, STORAGENAME from gr_bi_st_lot
|
||||
</sql>
|
||||
|
||||
<select id="selectGrBiStLotList" parameterType="com.lideeyunji.core.framework.entity.GrBiStLot" resultMap="GrBiStLotResult">
|
||||
<include refid="selectGrBiStLotVo"/>
|
||||
<where>
|
||||
<if test="ID != null "> and ID = #{ID}</if>
|
||||
<if test="GOODSID != null "> and GOODSID = #{GOODSID}</if>
|
||||
<if test="GOODSNAME != null and GOODSNAME != ''"> and GOODSNAME like concat('%', #{GOODSNAME}, '%')</if>
|
||||
<if test="GOODSTYPE != null and GOODSTYPE != ''"> and GOODSTYPE = #{GOODSTYPE}</if>
|
||||
<if test="GOODSUNIT != null and GOODSUNIT != ''"> and GOODSUNIT = #{GOODSUNIT}</if>
|
||||
<if test="CLASSID != null "> and CLASSID = #{CLASSID}</if>
|
||||
<if test="CLASSNAME != null and CLASSNAME != ''"> and CLASSNAME like concat('%', #{CLASSNAME}, '%')</if>
|
||||
<if test="LOTID != null "> and LOTID = #{LOTID}</if>
|
||||
<if test="LOTNO != null and LOTNO != ''"> and LOTNO = #{LOTNO}</if>
|
||||
<if test="GOODSQTY != null "> and GOODSQTY = #{GOODSQTY}</if>
|
||||
<if test="PRODDATE != null "> and PRODDATE = #{PRODDATE}</if>
|
||||
<if test="INVALIDDATE != null and INVALIDDATE != ''"> and INVALIDDATE = #{INVALIDDATE}</if>
|
||||
<if test="INVALIDDAYS != null "> and INVALIDDAYS = #{INVALIDDAYS}</if>
|
||||
<if test="STINDATE != null and STINDATE != ''"> and STINDATE = #{STINDATE}</if>
|
||||
<if test="STOUTDATE != null and STOUTDATE != ''"> and STOUTDATE = #{STOUTDATE}</if>
|
||||
<if test="INVALIDDAYSTYPEID != null "> and INVALIDDAYSTYPEID = #{INVALIDDAYSTYPEID}</if>
|
||||
<if test="INVALIDDAYSTYPE != null and INVALIDDAYSTYPE != ''"> and INVALIDDAYSTYPE = #{INVALIDDAYSTYPE}</if>
|
||||
<if test="OUTTYPE != null "> and OUTTYPE = #{OUTTYPE}</if>
|
||||
<if test="STORAGEID != null "> and STORAGEID = #{STORAGEID}</if>
|
||||
<if test="STORAGENAME != null and STORAGENAME != ''"> and STORAGENAME like concat('%', #{STORAGENAME}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGrBiStLotByID" parameterType="Long" resultMap="GrBiStLotResult">
|
||||
<include refid="selectGrBiStLotVo"/>
|
||||
where ID = #{ID}
|
||||
</select>
|
||||
|
||||
<insert id="insertGrBiStLot" parameterType="com.lideeyunji.core.framework.entity.GrBiStLot">
|
||||
insert into gr_bi_st_lot
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="ID != null">ID,</if>
|
||||
<if test="GOODSID != null">GOODSID,</if>
|
||||
<if test="GOODSNAME != null">GOODSNAME,</if>
|
||||
<if test="GOODSTYPE != null">GOODSTYPE,</if>
|
||||
<if test="GOODSUNIT != null">GOODSUNIT,</if>
|
||||
<if test="CLASSID != null">CLASSID,</if>
|
||||
<if test="CLASSNAME != null">CLASSNAME,</if>
|
||||
<if test="LOTID != null">LOTID,</if>
|
||||
<if test="LOTNO != null">LOTNO,</if>
|
||||
<if test="GOODSQTY != null">GOODSQTY,</if>
|
||||
<if test="PRODDATE != null">PRODDATE,</if>
|
||||
<if test="INVALIDDATE != null">INVALIDDATE,</if>
|
||||
<if test="INVALIDDAYS != null">INVALIDDAYS,</if>
|
||||
<if test="STINDATE != null">STINDATE,</if>
|
||||
<if test="STOUTDATE != null">STOUTDATE,</if>
|
||||
<if test="INVALIDDAYSTYPEID != null">INVALIDDAYSTYPEID,</if>
|
||||
<if test="INVALIDDAYSTYPE != null">INVALIDDAYSTYPE,</if>
|
||||
<if test="OUTTYPE != null">OUTTYPE,</if>
|
||||
<if test="STORAGEID != null">STORAGEID,</if>
|
||||
<if test="STORAGENAME != null">STORAGENAME,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="ID != null">#{ID},</if>
|
||||
<if test="GOODSID != null">#{GOODSID},</if>
|
||||
<if test="GOODSNAME != null">#{GOODSNAME},</if>
|
||||
<if test="GOODSTYPE != null">#{GOODSTYPE},</if>
|
||||
<if test="GOODSUNIT != null">#{GOODSUNIT},</if>
|
||||
<if test="CLASSID != null">#{CLASSID},</if>
|
||||
<if test="CLASSNAME != null">#{CLASSNAME},</if>
|
||||
<if test="LOTID != null">#{LOTID},</if>
|
||||
<if test="LOTNO != null">#{LOTNO},</if>
|
||||
<if test="GOODSQTY != null">#{GOODSQTY},</if>
|
||||
<if test="PRODDATE != null">#{PRODDATE},</if>
|
||||
<if test="INVALIDDATE != null">#{INVALIDDATE},</if>
|
||||
<if test="INVALIDDAYS != null">#{INVALIDDAYS},</if>
|
||||
<if test="STINDATE != null">#{STINDATE},</if>
|
||||
<if test="STOUTDATE != null">#{STOUTDATE},</if>
|
||||
<if test="INVALIDDAYSTYPEID != null">#{INVALIDDAYSTYPEID},</if>
|
||||
<if test="INVALIDDAYSTYPE != null">#{INVALIDDAYSTYPE},</if>
|
||||
<if test="OUTTYPE != null">#{OUTTYPE},</if>
|
||||
<if test="STORAGEID != null">#{STORAGEID},</if>
|
||||
<if test="STORAGENAME != null">#{STORAGENAME},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGrBiStLot" parameterType="com.lideeyunji.core.framework.entity.GrBiStLot">
|
||||
update gr_bi_st_lot
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="GOODSID != null">GOODSID = #{GOODSID},</if>
|
||||
<if test="GOODSNAME != null">GOODSNAME = #{GOODSNAME},</if>
|
||||
<if test="GOODSTYPE != null">GOODSTYPE = #{GOODSTYPE},</if>
|
||||
<if test="GOODSUNIT != null">GOODSUNIT = #{GOODSUNIT},</if>
|
||||
<if test="CLASSID != null">CLASSID = #{CLASSID},</if>
|
||||
<if test="CLASSNAME != null">CLASSNAME = #{CLASSNAME},</if>
|
||||
<if test="LOTID != null">LOTID = #{LOTID},</if>
|
||||
<if test="LOTNO != null">LOTNO = #{LOTNO},</if>
|
||||
<if test="GOODSQTY != null">GOODSQTY = #{GOODSQTY},</if>
|
||||
<if test="PRODDATE != null">PRODDATE = #{PRODDATE},</if>
|
||||
<if test="INVALIDDATE != null">INVALIDDATE = #{INVALIDDATE},</if>
|
||||
<if test="INVALIDDAYS != null">INVALIDDAYS = #{INVALIDDAYS},</if>
|
||||
<if test="STINDATE != null">STINDATE = #{STINDATE},</if>
|
||||
<if test="STOUTDATE != null">STOUTDATE = #{STOUTDATE},</if>
|
||||
<if test="INVALIDDAYSTYPEID != null">INVALIDDAYSTYPEID = #{INVALIDDAYSTYPEID},</if>
|
||||
<if test="INVALIDDAYSTYPE != null">INVALIDDAYSTYPE = #{INVALIDDAYSTYPE},</if>
|
||||
<if test="OUTTYPE != null">OUTTYPE = #{OUTTYPE},</if>
|
||||
<if test="STORAGEID != null">STORAGEID = #{STORAGEID},</if>
|
||||
<if test="STORAGENAME != null">STORAGENAME = #{STORAGENAME},</if>
|
||||
</trim>
|
||||
where ID = #{ID}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGrBiStLotByID" parameterType="Long">
|
||||
delete from gr_bi_st_lot where ID = #{ID}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGrBiStLotByIDs" parameterType="String">
|
||||
delete from gr_bi_st_lot where ID in
|
||||
<foreach item="ID" collection="array" open="(" separator="," close=")">
|
||||
#{ID}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,114 @@
|
||||
<?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">
|
||||
<mapper namespace="com.lideeyunji.core.framework.mapper.GrBiStProductAvlMapper">
|
||||
|
||||
<resultMap type="com.lideeyunji.core.framework.entity.GrBiStProductAvl" id="GrBiStProductAvlResult">
|
||||
<result property="id" column="ID" />
|
||||
<result property="goodsId" column="GOODSID" />
|
||||
<result property="goodsName" column="GOODSNAME" />
|
||||
<result property="goodsType" column="GOODSTYPE" />
|
||||
<result property="goodsUnit" column="GOODSUNIT" />
|
||||
<result property="packSize" column="PACKSIZE" />
|
||||
<result property="sort" column="SORT" />
|
||||
<result property="semiRem" column="SEMIREM" />
|
||||
<result property="todayIn" column="TODAYIN" />
|
||||
<result property="rem" column="REM" />
|
||||
<result property="thisMonthOut" column="THISMONTHOUT" />
|
||||
<result property="lastMonthOut" column="LASTMONTHOUT" />
|
||||
<result property="thisYearOut" column="THISYEAROUT" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGrBiStProductAvlVo">
|
||||
select ID, GOODSID, GOODSNAME, GOODSTYPE, GOODSUNIT, PACKSIZE, SORT, SEMIREM, TODAYIN, REM, THISMONTHOUT, LASTMONTHOUT, THISYEAROUT from gr_bi_st_product_avl
|
||||
</sql>
|
||||
|
||||
<select id="selectGrBiStProductAvlList" parameterType="com.lideeyunji.core.framework.entity.GrBiStProductAvl" resultMap="GrBiStProductAvlResult">
|
||||
<include refid="selectGrBiStProductAvlVo"/>
|
||||
<where>
|
||||
<if test="ID != null "> and ID = #{ID}</if>
|
||||
<if test="GOODSID != null "> and GOODSID = #{GOODSID}</if>
|
||||
<if test="GOODSNAME != null and GOODSNAME != ''"> and GOODSNAME like concat('%', #{GOODSNAME}, '%')</if>
|
||||
<if test="GOODSTYPE != null and GOODSTYPE != ''"> and GOODSTYPE = #{GOODSTYPE}</if>
|
||||
<if test="GOODSUNIT != null and GOODSUNIT != ''"> and GOODSUNIT = #{GOODSUNIT}</if>
|
||||
<if test="PACKSIZE != null "> and PACKSIZE = #{PACKSIZE}</if>
|
||||
<if test="SORT != null "> and SORT = #{SORT}</if>
|
||||
<if test="SEMIREM != null "> and SEMIREM = #{SEMIREM}</if>
|
||||
<if test="TODAYIN != null and TODAYIN != ''"> and TODAYIN = #{TODAYIN}</if>
|
||||
<if test="REM != null "> and REM = #{REM}</if>
|
||||
<if test="THISMONTHOUT != null "> and THISMONTHOUT = #{THISMONTHOUT}</if>
|
||||
<if test="LASTMONTHOUT != null "> and LASTMONTHOUT = #{LASTMONTHOUT}</if>
|
||||
<if test="THISYEAROUT != null "> and THISYEAROUT = #{THISYEAROUT}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGrBiStProductAvlByID" parameterType="Long" resultMap="GrBiStProductAvlResult">
|
||||
<include refid="selectGrBiStProductAvlVo"/>
|
||||
where ID = #{ID}
|
||||
</select>
|
||||
|
||||
<insert id="insertGrBiStProductAvl" parameterType="com.lideeyunji.core.framework.entity.GrBiStProductAvl">
|
||||
insert into gr_bi_st_product_avl
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="ID != null">ID,</if>
|
||||
<if test="GOODSID != null">GOODSID,</if>
|
||||
<if test="GOODSNAME != null">GOODSNAME,</if>
|
||||
<if test="GOODSTYPE != null">GOODSTYPE,</if>
|
||||
<if test="GOODSUNIT != null">GOODSUNIT,</if>
|
||||
<if test="PACKSIZE != null">PACKSIZE,</if>
|
||||
<if test="SORT != null">SORT,</if>
|
||||
<if test="SEMIREM != null">SEMIREM,</if>
|
||||
<if test="TODAYIN != null">TODAYIN,</if>
|
||||
<if test="REM != null">REM,</if>
|
||||
<if test="THISMONTHOUT != null">THISMONTHOUT,</if>
|
||||
<if test="LASTMONTHOUT != null">LASTMONTHOUT,</if>
|
||||
<if test="THISYEAROUT != null">THISYEAROUT,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="ID != null">#{ID},</if>
|
||||
<if test="GOODSID != null">#{GOODSID},</if>
|
||||
<if test="GOODSNAME != null">#{GOODSNAME},</if>
|
||||
<if test="GOODSTYPE != null">#{GOODSTYPE},</if>
|
||||
<if test="GOODSUNIT != null">#{GOODSUNIT},</if>
|
||||
<if test="PACKSIZE != null">#{PACKSIZE},</if>
|
||||
<if test="SORT != null">#{SORT},</if>
|
||||
<if test="SEMIREM != null">#{SEMIREM},</if>
|
||||
<if test="TODAYIN != null">#{TODAYIN},</if>
|
||||
<if test="REM != null">#{REM},</if>
|
||||
<if test="THISMONTHOUT != null">#{THISMONTHOUT},</if>
|
||||
<if test="LASTMONTHOUT != null">#{LASTMONTHOUT},</if>
|
||||
<if test="THISYEAROUT != null">#{THISYEAROUT},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGrBiStProductAvl" parameterType="com.lideeyunji.core.framework.entity.GrBiStProductAvl">
|
||||
update gr_bi_st_product_avl
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="GOODSID != null">GOODSID = #{GOODSID},</if>
|
||||
<if test="GOODSNAME != null">GOODSNAME = #{GOODSNAME},</if>
|
||||
<if test="GOODSTYPE != null">GOODSTYPE = #{GOODSTYPE},</if>
|
||||
<if test="GOODSUNIT != null">GOODSUNIT = #{GOODSUNIT},</if>
|
||||
<if test="PACKSIZE != null">PACKSIZE = #{PACKSIZE},</if>
|
||||
<if test="SORT != null">SORT = #{SORT},</if>
|
||||
<if test="SEMIREM != null">SEMIREM = #{SEMIREM},</if>
|
||||
<if test="TODAYIN != null">TODAYIN = #{TODAYIN},</if>
|
||||
<if test="REM != null">REM = #{REM},</if>
|
||||
<if test="THISMONTHOUT != null">THISMONTHOUT = #{THISMONTHOUT},</if>
|
||||
<if test="LASTMONTHOUT != null">LASTMONTHOUT = #{LASTMONTHOUT},</if>
|
||||
<if test="THISYEAROUT != null">THISYEAROUT = #{THISYEAROUT},</if>
|
||||
</trim>
|
||||
where ID = #{ID}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGrBiStProductAvlByID" parameterType="Long">
|
||||
delete from gr_bi_st_product_avl where ID = #{ID}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGrBiStProductAvlByIDs" parameterType="String">
|
||||
delete from gr_bi_st_product_avl where ID in
|
||||
<foreach item="ID" collection="array" open="(" separator="," close=")">
|
||||
#{ID}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,104 @@
|
||||
<?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">
|
||||
<mapper namespace="com.lideeyunji.core.framework.mapper.GrBiStProductMapper">
|
||||
|
||||
<resultMap type="com.lideeyunji.core.framework.entity.GrBiStProduct" id="GrBiStProductResult">
|
||||
<result property="id" column="ID" />
|
||||
<result property="goodsId" column="GOODSID" />
|
||||
<result property="goodsName" column="GOODSNAME" />
|
||||
<result property="goodsType" column="GOODSTYPE" />
|
||||
<result property="goodsUnit" column="GOODSUNIT" />
|
||||
<result property="goodsClassId" column="GOODSCLASSID" />
|
||||
<result property="goodsClassName" column="GOODSCLASSNAME" />
|
||||
<result property="qty" column="QTY" />
|
||||
<result property="qtyProp" column="QTY_PROP" />
|
||||
<result property="money" column="MONEY" />
|
||||
<result property="moneyProp" column="MONEY_PROP" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGrBiStProductVo">
|
||||
select ID, GOODSID, GOODSNAME, GOODSTYPE, GOODSUNIT, GOODSCLASSID, GOODSCLASSNAME, QTY, QTY_PROP, MONEY, MONEY_PROP from gr_bi_st_product
|
||||
</sql>
|
||||
|
||||
<select id="selectGrBiStProductList" parameterType="com.lideeyunji.core.framework.entity.GrBiStProduct" resultMap="GrBiStProductResult">
|
||||
<include refid="selectGrBiStProductVo"/>
|
||||
<where>
|
||||
<if test="ID != null "> and ID = #{ID}</if>
|
||||
<if test="GOODSID != null "> and GOODSID = #{GOODSID}</if>
|
||||
<if test="GOODSNAME != null and GOODSNAME != ''"> and GOODSNAME like concat('%', #{GOODSNAME}, '%')</if>
|
||||
<if test="GOODSTYPE != null and GOODSTYPE != ''"> and GOODSTYPE = #{GOODSTYPE}</if>
|
||||
<if test="GOODSUNIT != null and GOODSUNIT != ''"> and GOODSUNIT = #{GOODSUNIT}</if>
|
||||
<if test="GOODSCLASSID != null "> and GOODSCLASSID = #{GOODSCLASSID}</if>
|
||||
<if test="GOODSCLASSNAME != null and GOODSCLASSNAME != ''"> and GOODSCLASSNAME like concat('%', #{GOODSCLASSNAME}, '%')</if>
|
||||
<if test="QTY != null "> and QTY = #{QTY}</if>
|
||||
<if test="qtyProp != null "> and QTY_PROP = #{qtyProp}</if>
|
||||
<if test="MONEY != null "> and MONEY = #{MONEY}</if>
|
||||
<if test="moneyProp != null "> and MONEY_PROP = #{moneyProp}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGrBiStProductByID" parameterType="Long" resultMap="GrBiStProductResult">
|
||||
<include refid="selectGrBiStProductVo"/>
|
||||
where ID = #{ID}
|
||||
</select>
|
||||
|
||||
<insert id="insertGrBiStProduct" parameterType="com.lideeyunji.core.framework.entity.GrBiStProduct">
|
||||
insert into gr_bi_st_product
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="ID != null">ID,</if>
|
||||
<if test="GOODSID != null">GOODSID,</if>
|
||||
<if test="GOODSNAME != null">GOODSNAME,</if>
|
||||
<if test="GOODSTYPE != null">GOODSTYPE,</if>
|
||||
<if test="GOODSUNIT != null">GOODSUNIT,</if>
|
||||
<if test="GOODSCLASSID != null">GOODSCLASSID,</if>
|
||||
<if test="GOODSCLASSNAME != null">GOODSCLASSNAME,</if>
|
||||
<if test="QTY != null">QTY,</if>
|
||||
<if test="qtyProp != null">QTY_PROP,</if>
|
||||
<if test="MONEY != null">MONEY,</if>
|
||||
<if test="moneyProp != null">MONEY_PROP,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="ID != null">#{ID},</if>
|
||||
<if test="GOODSID != null">#{GOODSID},</if>
|
||||
<if test="GOODSNAME != null">#{GOODSNAME},</if>
|
||||
<if test="GOODSTYPE != null">#{GOODSTYPE},</if>
|
||||
<if test="GOODSUNIT != null">#{GOODSUNIT},</if>
|
||||
<if test="GOODSCLASSID != null">#{GOODSCLASSID},</if>
|
||||
<if test="GOODSCLASSNAME != null">#{GOODSCLASSNAME},</if>
|
||||
<if test="QTY != null">#{QTY},</if>
|
||||
<if test="qtyProp != null">#{qtyProp},</if>
|
||||
<if test="MONEY != null">#{MONEY},</if>
|
||||
<if test="moneyProp != null">#{moneyProp},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGrBiStProduct" parameterType="com.lideeyunji.core.framework.entity.GrBiStProduct">
|
||||
update gr_bi_st_product
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="GOODSID != null">GOODSID = #{GOODSID},</if>
|
||||
<if test="GOODSNAME != null">GOODSNAME = #{GOODSNAME},</if>
|
||||
<if test="GOODSTYPE != null">GOODSTYPE = #{GOODSTYPE},</if>
|
||||
<if test="GOODSUNIT != null">GOODSUNIT = #{GOODSUNIT},</if>
|
||||
<if test="GOODSCLASSID != null">GOODSCLASSID = #{GOODSCLASSID},</if>
|
||||
<if test="GOODSCLASSNAME != null">GOODSCLASSNAME = #{GOODSCLASSNAME},</if>
|
||||
<if test="QTY != null">QTY = #{QTY},</if>
|
||||
<if test="qtyProp != null">QTY_PROP = #{qtyProp},</if>
|
||||
<if test="MONEY != null">MONEY = #{MONEY},</if>
|
||||
<if test="moneyProp != null">MONEY_PROP = #{moneyProp},</if>
|
||||
</trim>
|
||||
where ID = #{ID}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGrBiStProductByID" parameterType="Long">
|
||||
delete from gr_bi_st_product where ID = #{ID}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGrBiStProductByIDs" parameterType="String">
|
||||
delete from gr_bi_st_product where ID in
|
||||
<foreach item="ID" collection="array" open="(" separator="," close=")">
|
||||
#{ID}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user