提交 141925c3 authored 作者: douxy's avatar douxy

增加奇门接口调用旺店通其他出入库存数据

上级 2b144a0f
package com.sfa.job.controller.order;
import com.sfa.job.service.stock.IWdtOtherStockSyncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
/**
* @Author: DouXinYu
* @Date: 2026-04-18 14:26
* @Description:
*/
@RestController
public class TestController {
@Autowired
private IWdtOtherStockSyncService wdtOtherStockSyncService;
@PostMapping("/test")
public void get(@RequestBody Map<String,String> params){
wdtOtherStockSyncService.syncLastDayOtherStockOut(params.get("startTime"),params.get("endTime"));
}
@PostMapping("/testIn")
public void getIn(@RequestBody Map<String,String> params){
wdtOtherStockSyncService.syncLastDayOtherStockIn(params.get("startTime"),params.get("endTime"));
}
}
package com.sfa.job.domain.stock.dao;
/**
* @Author: DouXinYu
* @Date: 2026-04-17 16:59
* @Description: 旺店通其他数据访问层接口
*/
public interface IWdtOtherStockDao {
void syncLastDayOtherStockOut(String startTime, String endTime);
void syncLastDayOtherStockIn(String startTime, String endTime);
}
package com.sfa.job.domain.stock.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Data
@TableName("wdt_qimen_other_stock_in_order")
public class WdtQimenOtherStockInOrder implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 记录id
*/
private Long recId;
/**
* 其他入库单号
*/
private String otherInNo;
/**
* 外部单号
*/
private String outerNo;
/**
* 仓库号
*/
private String warehouseNo;
/**
* 仓库名称
*/
private String warehouseName;
/**
* 创建时间
*/
private String created;
/**
* 创建人id
*/
private Long creatorId;
/**
* 创建人姓名
*/
private String employeeName;
/**
* 仓库类型
*/
private Integer warehouseType;
/**
* 实际数量
*/
private BigDecimal actualNum;
/**
* 预期数量
*/
private BigDecimal expectNum;
/**
* 物流单号
*/
private String logisticsNo;
/**
* 物流id
*/
private Long logisticsId;
/**
* 物流名称
*/
private String logisticsName;
/**
* 入库原因
*/
private String reason;
/**
* 备注
*/
private String remark;
/**
* 状态
*/
private Integer status;
/**
* 修改时间
*/
private String modified;
/**
* 审核时间
*/
private String checkTime;
/**
* 备注数量
*/
private BigDecimal noteCount;
/**
* 仓库id
*/
private Long warehouseId;
/**
* 其他入库单详情列表
*/
private List<WdtQimenOtherStockInOrderDetail> detailList;
/**
* 总数量
*/
private Integer totalCount;
/**
* 创建时间
*/
private Date createTime;
/**
* 修改时间
*/
private Date updateTime;
/**
* 是否删除
*/
private Integer isDeleted = 1;
}
package com.sfa.job.domain.stock.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
@TableName("wdt_qimen_other_stock_in_order_detail")
public class WdtQimenOtherStockInOrderDetail implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 记录id
*/
private Long recId;
/**
* 其他入库单id
*/
private Long otherInId;
/**
* 商品条码
*/
private String barcode;
/**
* 基础单位id
*/
private Long baseUnitId;
/**
* 基础单位名称
*/
private String baseUnitName;
/**
* 批次号
*/
private String batchNo;
/**
* 批次备注
*/
private String batchRemark;
/**
* 品牌id
*/
private Long brandId;
/**
* 品牌名称
*/
private String brandName;
/**
* 创建日期
*/
private String createdDate;
/**
* 是否缺陷
*/
private Boolean defect;
/**
* 过期日期
*/
private String expireDate;
/**
* 商品id
*/
private Long goodsId;
/**
* 商品名称
*/
private String goodsName;
/**
* 商品编号
*/
private String goodsNo;
/**
* 修改日期
*/
private String modifiedDate;
/**
* 数量
*/
private BigDecimal num;
/**
* 数量2
*/
private BigDecimal num2;
/**
* 入库数量
*/
private BigDecimal inNum;
/**
* 生产日期
*/
private String productionDate;
/**
* 备注
*/
private String remark;
/**
* 商品简称
*/
private String shortName;
/**
* 商品规格编码
*/
private String specCode;
/**
* 商品规格id
*/
private Long specId;
/**
* 商品规格名称
*/
private String specName;
/**
* 商品规格编号
*/
private String specNo;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 是否删除
*/
private Integer isDeleted = 1;
}
package com.sfa.job.domain.stock.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Data
@TableName("wdt_qimen_other_stock_out_order")
public class WdtQimenOtherStockOutOrder implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 记录id
*/
private Long recId;
/**
* 其他出库单编号
*/
private String otherOutNo;
/**
* 外部单号
*/
private String outerNo;
/**
* 仓库编号
*/
private String warehouseNo;
/**
* 仓库名称
*/
private String warehouseName;
/**
* 创建时间
*/
private String created;
/**
* 创建人id
*/
private Long creatorId;
/**
* 创建人姓名
*/
private String employeeName;
/**
* 仓库类型
*/
private Integer warehouseType;
/**
* 实际出库数量
*/
private BigDecimal actualNum;
/**
* 预期出库数量
*/
private BigDecimal expectNum;
/**
* 物流单号
*/
private String logisticsNo;
/**
* 物流id
*/
private Long logisticsId;
/**
* 物流名称
*/
private String logisticsName;
/**
* 接收人姓名
*/
private String receiverName;
/**
* 接收人省份
*/
private String receiverProvince;
/**
* 接收人城市
*/
private String receiverCity;
/**
* 接收人区县
*/
private String receiverDistrict;
/**
* 接收人手机号
*/
private String receiverMobile;
/**
* 接收人地址
*/
private String receiverAddress;
/**
* 出库原因
*/
private String reason;
/**
* 备注
*/
private String remark;
/**
* 状态
*/
private Integer status;
/**
* 修改时间
*/
private String modified;
/**
* 审核时间
*/
private String checkTime;
/**
* 审核备注
*/
private String checkRemark;
/**
* 备注数量
*/
private Integer noteCount;
/**
* 是否预约
*/
private Boolean isReserved;
/**
* 自定义属性值1
*/
private String prop1;
/**
* 自定义属性值2
*/
private String prop2;
/**
* 自定义属性值3
*/
private String prop3;
/**
* 自定义属性值4
*/
private String prop4;
/**
* 自定义属性值5
*/
private String prop5;
/**
* 自定义属性值6
*/
private String prop6;
/**
* 仓库id
*/
private Integer warehouseId;
/**
* 详情列表
*/
private List<WdtQimenOtherStockOutOrderDetail> detailList;
/**
* 总数量
*/
private Integer totalCount;
/**
* 创建时间
*/
private Date createTime;
/**
* 修改时间
*/
private Date updateTime;
/**
* 是否删除
*/
private Integer isDeleted = 1;
}
package com.sfa.job.domain.stock.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
@TableName("wdt_qimen_other_stock_out_order_detail")
public class WdtQimenOtherStockOutOrderDetail implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 记录id
*/
private Long recId;
/**
* 其他出库单id
*/
private Long otherOutId;
/**
* 商品条码
*/
private String barcode;
/**
* 基础单位id
*/
private Integer baseUnitId;
/**
* 基础单位名称
*/
private String baseUnitName;
/**
* 批次号
*/
private String batchNo;
/**
* 批次备注
*/
private String batchRemark;
/**
* 品牌id
*/
private Long brandId;
/**
* 品牌名称
*/
private String brandName;
/**
* 创建时间
*/
private String createdDate;
/**
* 是否缺陷
*/
private Boolean defect;
/**
* 过期时间
*/
private String expireDate;
/**
* 商品id
*/
private Long goodsId;
/**
* 商品名称
*/
private String goodsName;
/**
* 商品编号
*/
private String goodsNo;
/**
* 修改时间
*/
private String modifiedDate;
/**
* 数量
*/
private BigDecimal num;
/**
* 数量2
*/
private BigDecimal num2;
/**
* 出库数量
*/
private BigDecimal outNum;
/**
* 生产时间
*/
private String productionDate;
/**
* 备注
*/
private String remark;
/**
* 商品简称
*/
private String shortName;
/**
* 商品规格
*/
private String specCode;
/**
* 商品规格id
*/
private Long specId;
/**
* 商品规格名称
*/
private String specName;
/**
* 商品规格编号
*/
private String specNo;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 是否删除
*/
private Integer isDeleted = 1;
}
package com.sfa.job.domain.stock.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sfa.job.domain.stock.entity.WdtQimenOtherStockInOrderDetail;
import java.util.List;
/**
* 其他入库单明细 Mapper
*/
public interface WdtQimenOtherStockInOrderDetailMapper extends BaseMapper<WdtQimenOtherStockInOrderDetail> {
void insertOrUpdateBatch(List<WdtQimenOtherStockInOrderDetail> stockInDetailList);
}
package com.sfa.job.domain.stock.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sfa.job.domain.stock.entity.WdtQimenOtherStockInOrder;
import java.util.List;
/**
* 其他入库单 Mapper
*/
public interface WdtQimenOtherStockInOrderMapper extends BaseMapper<WdtQimenOtherStockInOrder> {
/**
* 插入或更新其他入库单
* @param stockInOrder 其他入库单
* @return 影响的行数
*/
int insertOrUpdate(WdtQimenOtherStockInOrder stockInOrder);
/**
* 批量插入或更新其他入库单
* @param stockInOrders 其他入库单列表
* @return 影响的行数
*/
int insertOrUpdateBatch(List<WdtQimenOtherStockInOrder> stockInOrders);
}
package com.sfa.job.domain.stock.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sfa.job.domain.stock.entity.WdtQimenOtherStockOutOrderDetail;
import java.util.List;
/**
* 其他出库单明细 Mapper
*/
public interface WdtQimenOtherStockOutOrderDetailMapper extends BaseMapper<WdtQimenOtherStockOutOrderDetail> {
void insertOrUpdateBatch(List<WdtQimenOtherStockOutOrderDetail> stockoutDetailList);
}
\ No newline at end of file
package com.sfa.job.domain.stock.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sfa.job.domain.stock.entity.WdtQimenOtherStockOutOrder;
import java.util.List;
/**
* 其他出库单 Mapper
*/
public interface WdtQimenOtherStockOutOrderMapper extends BaseMapper<WdtQimenOtherStockOutOrder> {
/**
* 插入或更新其他出库单
* @param stockoutOrder 其他出库单
* @return 影响的行数
*/
int insertOrUpdate(WdtQimenOtherStockOutOrder stockoutOrder);
/**
* 批量插入或更新其他出库单
* @param stockoutOrders 其他出库单列表
* @return 影响的行数
*/
int insertOrUpdateBatch(List<WdtQimenOtherStockOutOrder> stockoutOrders);
}
\ No newline at end of file
package com.sfa.job.pojo.response;
import com.taobao.api.TaobaoResponse;
import lombok.Data;
/**
* @Author: DouXinYu
* @Date: 2026-04-20 18:32
* @Description: 旺店通基础响应类
*/
@Data
public class BaseResponse extends TaobaoResponse{
String flag;
String message;
String subMessage;
String code;
String data;
String result;
String requestId;
}
package com.sfa.job.service.stock;
/**
* @Author: DouXinYu
* @Date: 2026-04-17 16:52
* @Description: 旺店通其他出库单服务同步接口
*/
public interface IWdtOtherStockSyncService {
void syncLastDayOtherStockOut(String startTime, String endTime);
void syncLastDayOtherStockIn(String startTime, String endTime);
}
package com.sfa.job.service.stock.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.sfa.job.domain.stock.dao.IWdtOtherStockDao;
import com.sfa.job.service.stock.IWdtOtherStockSyncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Author: DouXinYu
* @Date: 2026-04-17 16:54
* @Description: 旺店通其他入库单同步服务实现类
*/
@Service
@DS("bi")
public class WdtOtherStockSyncServiceImpl implements IWdtOtherStockSyncService {
@Autowired
private IWdtOtherStockDao wdtOtherStockDao;
/**
* 同步昨日其他出库单
*/
@Override
public void syncLastDayOtherStockOut(String startTime, String endTime) {
wdtOtherStockDao.syncLastDayOtherStockOut(startTime, endTime);
}
@Override
public void syncLastDayOtherStockIn(String startTime, String endTime) {
wdtOtherStockDao.syncLastDayOtherStockIn(startTime, endTime);
}
}
<?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.sfa.job.domain.stock.mapper.WdtQimenOtherStockInOrderDetailMapper">
<!-- 批量插入或更新其他入库单明细 -->
<insert id="insertOrUpdateBatch" parameterType="java.util.List">
INSERT INTO wdt_qimen_other_stock_in_order_detail (
rec_id,
other_in_id,
barcode,
base_unit_id,
base_unit_name,
batch_no,
batch_remark,
brand_id,
brand_name,
created_date,
defect,
expire_date,
goods_id,
goods_name,
goods_no,
modified_date,
num,
num2,
in_num,
production_date,
remark,
short_name,
spec_code,
spec_id,
spec_name,
spec_no
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.recId},
#{item.otherInId},
#{item.barcode},
#{item.baseUnitId},
#{item.baseUnitName},
#{item.batchNo},
#{item.batchRemark},
#{item.brandId},
#{item.brandName},
#{item.createdDate},
#{item.defect},
#{item.expireDate},
#{item.goodsId},
#{item.goodsName},
#{item.goodsNo},
#{item.modifiedDate},
#{item.num},
#{item.num2},
#{item.inNum},
#{item.productionDate},
#{item.remark},
#{item.shortName},
#{item.specCode},
#{item.specId},
#{item.specName},
#{item.specNo}
)
</foreach>
ON DUPLICATE KEY UPDATE
other_in_id = VALUES(other_in_id),
barcode = VALUES(barcode),
base_unit_id = VALUES(base_unit_id),
base_unit_name = VALUES(base_unit_name),
batch_no = VALUES(batch_no),
batch_remark = VALUES(batch_remark),
brand_id = VALUES(brand_id),
brand_name = VALUES(brand_name),
created_date = VALUES(created_date),
defect = VALUES(defect),
expire_date = VALUES(expire_date),
goods_id = VALUES(goods_id),
goods_name = VALUES(goods_name),
goods_no = VALUES(goods_no),
modified_date = VALUES(modified_date),
num = VALUES(num),
num2 = VALUES(num2),
in_num = VALUES(in_num),
production_date = VALUES(production_date),
remark = VALUES(remark),
short_name = VALUES(short_name),
spec_code = VALUES(spec_code),
spec_id = VALUES(spec_id),
spec_name = VALUES(spec_name),
spec_no = VALUES(spec_no)
</insert>
</mapper>
<?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.sfa.job.domain.stock.mapper.WdtQimenOtherStockInOrderMapper">
<!-- 插入或更新其他入库单 -->
<insert id="insertOrUpdate" parameterType="com.sfa.job.domain.stock.entity.WdtQimenOtherStockInOrder">
INSERT INTO wdt_qimen_other_stock_in_order (
rec_id,
other_in_no,
outer_no,
warehouse_no,
warehouse_name,
created,
creator_id,
employee_name,
warehouse_type,
actual_num,
expect_num,
logistics_no,
logistics_id,
logistics_name,
reason,
remark,
status,
modified,
check_time,
note_count,
warehouse_id
) VALUES (
#{recId},
#{otherInNo},
#{outerNo},
#{warehouseNo},
#{warehouseName},
#{created},
#{creatorId},
#{employeeName},
#{warehouseType},
#{actualNum},
#{expectNum},
#{logisticsNo},
#{logisticsId},
#{logisticsName},
#{reason},
#{remark},
#{status},
#{modified},
#{checkTime},
#{noteCount},
#{warehouseId}
)
ON DUPLICATE KEY UPDATE
other_in_no = VALUES(other_in_no),
outer_no = VALUES(outer_no),
warehouse_no = VALUES(warehouse_no),
warehouse_name = VALUES(warehouse_name),
created = VALUES(created),
creator_id = VALUES(creator_id),
employee_name = VALUES(employee_name),
warehouse_type = VALUES(warehouse_type),
actual_num = VALUES(actual_num),
expect_num = VALUES(expect_num),
logistics_no = VALUES(logistics_no),
logistics_id = VALUES(logistics_id),
logistics_name = VALUES(logistics_name),
reason = VALUES(reason),
remark = VALUES(remark),
status = VALUES(status),
modified = VALUES(modified),
check_time = VALUES(check_time),
note_count = VALUES(note_count),
warehouse_id = VALUES(warehouse_id)
</insert>
<!-- 批量插入或更新其他入库单 -->
<insert id="insertOrUpdateBatch" parameterType="java.util.List">
INSERT INTO wdt_qimen_other_stock_in_order (
rec_id,
other_in_no,
outer_no,
warehouse_no,
warehouse_name,
created,
creator_id,
employee_name,
warehouse_type,
actual_num,
expect_num,
logistics_no,
logistics_id,
logistics_name,
reason,
remark,
status,
modified,
check_time,
note_count,
warehouse_id
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.recId},
#{item.otherInNo},
#{item.outerNo},
#{item.warehouseNo},
#{item.warehouseName},
#{item.created},
#{item.creatorId},
#{item.employeeName},
#{item.warehouseType},
#{item.actualNum},
#{item.expectNum},
#{item.logisticsNo},
#{item.logisticsId},
#{item.logisticsName},
#{item.reason},
#{item.remark},
#{item.status},
#{item.modified},
#{item.checkTime},
#{item.noteCount},
#{item.warehouseId}
)
</foreach>
ON DUPLICATE KEY UPDATE
other_in_no = VALUES(other_in_no),
outer_no = VALUES(outer_no),
warehouse_no = VALUES(warehouse_no),
warehouse_name = VALUES(warehouse_name),
created = VALUES(created),
creator_id = VALUES(creator_id),
employee_name = VALUES(employee_name),
warehouse_type = VALUES(warehouse_type),
actual_num = VALUES(actual_num),
expect_num = VALUES(expect_num),
logistics_no = VALUES(logistics_no),
logistics_id = VALUES(logistics_id),
logistics_name = VALUES(logistics_name),
reason = VALUES(reason),
remark = VALUES(remark),
status = VALUES(status),
modified = VALUES(modified),
check_time = VALUES(check_time),
note_count = VALUES(note_count),
warehouse_id = VALUES(warehouse_id)
</insert>
</mapper>
<?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.sfa.job.domain.stock.mapper.WdtQimenOtherStockOutOrderDetailMapper">
<!-- 批量插入或更新其他出库单明细 -->
<insert id="insertOrUpdateBatch" parameterType="java.util.List">
INSERT INTO wdt_qimen_other_stock_out_order_detail (
rec_id,
other_out_id,
barcode,
base_unit_id,
base_unit_name,
batch_no,
batch_remark,
brand_id,
brand_name,
created_date,
defect,
expire_date,
goods_id,
goods_name,
goods_no,
modified_date,
num,
num2,
out_num,
production_date,
remark,
short_name,
spec_code,
spec_id,
spec_name,
spec_no
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.recId},
#{item.otherOutId},
#{item.barcode},
#{item.baseUnitId},
#{item.baseUnitName},
#{item.batchNo},
#{item.batchRemark},
#{item.brandId},
#{item.brandName},
#{item.createdDate},
#{item.defect},
#{item.expireDate},
#{item.goodsId},
#{item.goodsName},
#{item.goodsNo},
#{item.modifiedDate},
#{item.num},
#{item.num2},
#{item.outNum},
#{item.productionDate},
#{item.remark},
#{item.shortName},
#{item.specCode},
#{item.specId},
#{item.specName},
#{item.specNo}
)
</foreach>
ON DUPLICATE KEY UPDATE
other_out_id = VALUES(other_out_id),
barcode = VALUES(barcode),
base_unit_id = VALUES(base_unit_id),
base_unit_name = VALUES(base_unit_name),
batch_no = VALUES(batch_no),
batch_remark = VALUES(batch_remark),
brand_id = VALUES(brand_id),
brand_name = VALUES(brand_name),
created_date = VALUES(created_date),
defect = VALUES(defect),
expire_date = VALUES(expire_date),
goods_id = VALUES(goods_id),
goods_name = VALUES(goods_name),
goods_no = VALUES(goods_no),
modified_date = VALUES(modified_date),
num = VALUES(num),
num2 = VALUES(num2),
out_num = VALUES(out_num),
production_date = VALUES(production_date),
remark = VALUES(remark),
short_name = VALUES(short_name),
spec_code = VALUES(spec_code),
spec_id = VALUES(spec_id),
spec_name = VALUES(spec_name),
spec_no = VALUES(spec_no)
</insert>
</mapper>
<?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.sfa.job.domain.stock.mapper.WdtQimenOtherStockOutOrderMapper">
<!-- 插入或更新其他出库单 -->
<insert id="insertOrUpdate" parameterType="com.sfa.job.domain.stock.entity.WdtQimenOtherStockOutOrder">
INSERT INTO wdt_qimen_other_stock_out_order (
rec_id,
other_out_no,
outer_no,
warehouse_no,
warehouse_name,
created,
creator_id,
employee_name,
warehouse_type,
actual_num,
expect_num,
logistics_no,
logistics_id,
logistics_name,
receiver_name,
receiver_province,
receiver_city,
receiver_district,
receiver_mobile,
receiver_address,
reason,
remark,
status,
modified,
check_time,
note_count,
is_reserved,
prop1,
prop2,
prop3,
prop4,
prop5,
prop6,
warehouse_id
) VALUES (
#{recId},
#{otherOutNo},
#{outerNo},
#{warehouseNo},
#{warehouseName},
#{created},
#{creatorId},
#{employeeName},
#{warehouseType},
#{actualNum},
#{expectNum},
#{logisticsNo},
#{logisticsId},
#{logisticsName},
#{receiverName},
#{receiverProvince},
#{receiverCity},
#{receiverDistrict},
#{receiverMobile},
#{receiverAddress},
#{reason},
#{remark},
#{status},
#{modified},
#{checkTime},
#{noteCount},
#{isReserved},
#{prop1},
#{prop2},
#{prop3},
#{prop4},
#{prop5},
#{prop6},
#{warehouseId}
)
ON DUPLICATE KEY UPDATE
other_out_no = VALUES(other_out_no),
outer_no = VALUES(outer_no),
warehouse_no = VALUES(warehouse_no),
warehouse_name = VALUES(warehouse_name),
created = VALUES(created),
creator_id = VALUES(creator_id),
employee_name = VALUES(employee_name),
warehouse_type = VALUES(warehouse_type),
actual_num = VALUES(actual_num),
expect_num = VALUES(expect_num),
logistics_no = VALUES(logistics_no),
logistics_id = VALUES(logistics_id),
logistics_name = VALUES(logistics_name),
receiver_name = VALUES(receiver_name),
receiver_province = VALUES(receiver_province),
receiver_city = VALUES(receiver_city),
receiver_district = VALUES(receiver_district),
receiver_mobile = VALUES(receiver_mobile),
receiver_address = VALUES(receiver_address),
reason = VALUES(reason),
remark = VALUES(remark),
status = VALUES(status),
modified = VALUES(modified),
check_time = VALUES(check_time),
note_count = VALUES(note_count),
is_reserved = VALUES(is_reserved),
prop1 = VALUES(prop1),
prop2 = VALUES(prop2),
prop3 = VALUES(prop3),
prop4 = VALUES(prop4),
prop5 = VALUES(prop5),
prop6 = VALUES(prop6),
warehouse_id = VALUES(warehouse_id)
</insert>
<!-- 批量插入或更新其他出库单 -->
<insert id="insertOrUpdateBatch" parameterType="java.util.List">
INSERT INTO wdt_qimen_other_stock_out_order (
rec_id,
other_out_no,
outer_no,
warehouse_no,
warehouse_name,
created,
creator_id,
employee_name,
warehouse_type,
actual_num,
expect_num,
logistics_no,
logistics_id,
logistics_name,
receiver_name,
receiver_province,
receiver_city,
receiver_district,
receiver_mobile,
receiver_address,
reason,
remark,
status,
modified,
check_time,
note_count,
is_reserved,
prop1,
prop2,
prop3,
prop4,
prop5,
prop6,
warehouse_id
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.recId},
#{item.otherOutNo},
#{item.outerNo},
#{item.warehouseNo},
#{item.warehouseName},
#{item.created},
#{item.creatorId},
#{item.employeeName},
#{item.warehouseType},
#{item.actualNum},
#{item.expectNum},
#{item.logisticsNo},
#{item.logisticsId},
#{item.logisticsName},
#{item.receiverName},
#{item.receiverProvince},
#{item.receiverCity},
#{item.receiverDistrict},
#{item.receiverMobile},
#{item.receiverAddress},
#{item.reason},
#{item.remark},
#{item.status},
#{item.modified},
#{item.checkTime},
#{item.noteCount},
#{item.isReserved},
#{item.prop1},
#{item.prop2},
#{item.prop3},
#{item.prop4},
#{item.prop5},
#{item.prop6},
#{item.warehouseId}
)
</foreach>
ON DUPLICATE KEY UPDATE
other_out_no = VALUES(other_out_no),
outer_no = VALUES(outer_no),
warehouse_no = VALUES(warehouse_no),
warehouse_name = VALUES(warehouse_name),
created = VALUES(created),
creator_id = VALUES(creator_id),
employee_name = VALUES(employee_name),
warehouse_type = VALUES(warehouse_type),
actual_num = VALUES(actual_num),
expect_num = VALUES(expect_num),
logistics_no = VALUES(logistics_no),
logistics_id = VALUES(logistics_id),
logistics_name = VALUES(logistics_name),
receiver_name = VALUES(receiver_name),
receiver_province = VALUES(receiver_province),
receiver_city = VALUES(receiver_city),
receiver_district = VALUES(receiver_district),
receiver_mobile = VALUES(receiver_mobile),
receiver_address = VALUES(receiver_address),
reason = VALUES(reason),
remark = VALUES(remark),
status = VALUES(status),
modified = VALUES(modified),
check_time = VALUES(check_time),
note_count = VALUES(note_count),
is_reserved = VALUES(is_reserved),
prop1 = VALUES(prop1),
prop2 = VALUES(prop2),
prop3 = VALUES(prop3),
prop4 = VALUES(prop4),
prop5 = VALUES(prop5),
prop6 = VALUES(prop6),
warehouse_id = VALUES(warehouse_id)
</insert>
</mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论