增加关联明细id字段,解决明细中重复商品进行批次发货遇到的问题

This commit is contained in:
季圣华 2022-05-28 22:36:33 +08:00
parent 1cc71232e5
commit d453c659cc
9 changed files with 136 additions and 31 deletions

View File

@ -219,6 +219,7 @@ CREATE TABLE `jsh_depot_item` (
`sn_list` varchar(2000) DEFAULT NULL COMMENT '序列号列表',
`batch_number` varchar(100) DEFAULT NULL COMMENT '批号',
`expiration_date` datetime DEFAULT NULL COMMENT '有效日期',
`link_id` bigint(20) DEFAULT NULL COMMENT '关联明细id',
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
`delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除',
PRIMARY KEY (`id`),
@ -231,24 +232,24 @@ CREATE TABLE `jsh_depot_item` (
-- ----------------------------
-- Records of jsh_depot_item
-- ----------------------------
INSERT INTO `jsh_depot_item` VALUES ('312', '258', '588', '10', '', null, '10.000000', '10.000000', '11.000000', null, '110.000000', null, '14', null, null, null, null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('313', '259', '588', '10', '', null, '10.000000', '10.000000', '11.000000', null, '110.000000', null, '14', null, null, '0.000000', '110.000000', null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('314', '260', '588', '10', '', null, '2.000000', '2.000000', '11.000000', '11.000000', '22.000000', null, '14', null, '0.000000', '0.000000', '22.000000', null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('315', '261', '588', '10', '', null, '2.000000', '2.000000', '22.000000', null, '44.000000', null, '14', null, null, null, null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('316', '262', '588', '10', '', null, '2.000000', '2.000000', '22.000000', null, '44.000000', null, '14', null, null, '0.000000', '44.000000', null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('317', '263', '588', '10', '', null, '1.000000', '1.000000', '22.000000', '22.000000', '22.000000', null, '14', null, '0.000000', '0.000000', '22.000000', null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('318', '264', '588', '10', '', null, '1.000000', '1.000000', '22.000000', null, '22.000000', null, '14', null, null, null, null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('319', '265', '588', '10', '', null, '1.000000', '1.000000', '22.000000', null, '22.000000', null, '14', null, null, null, null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('320', '266', '568', '2', '', null, '5.000000', '5.000000', '11.000000', null, '55.000000', null, '14', null, null, null, null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('321', '267', '568', '2', '', null, '2.000000', '2.000000', '15.000000', null, '30.000000', null, '14', null, null, null, null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('322', '268', '568', '2', '', null, '1.000000', '1.000000', '11.000000', null, '11.000000', null, '14', '15', null, null, null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('323', '269', '588', '10', '', null, '1.000000', '1.000000', '0.000000', null, '0.000000', null, '14', null, null, null, null, '组合件', null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('324', '269', '568', '2', '', null, '1.000000', '1.000000', '0.000000', null, '0.000000', null, '14', null, null, null, null, '普通子件', null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('325', '270', '588', '10', '', null, '1.000000', '1.000000', '0.000000', null, '0.000000', null, '14', null, null, null, null, '组合件', null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('326', '270', '568', '2', '', null, '1.000000', '1.000000', '0.000000', null, '0.000000', null, '14', null, null, null, null, '普通子件', null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('327', '271', '570', '4', '', null, '10.000000', '10.000000', '8.000000', '8.000000', '80.000000', null, '14', null, '0.000000', '0.000000', '80.000000', null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('328', '272', '570', '4', '', null, '2.000000', '2.000000', '14.000000', '14.000000', '28.000000', null, '14', null, '0.000000', '0.000000', '28.000000', null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('330', '273', '619', '37', '', '橙色,L', '5.000000', '5.000000', '12.000000', '12.000000', '60.000000', null, '14', null, '0.000000', '0.000000', '60.000000', null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('312', '258', '588', '10', '', null, '10.000000', '10.000000', '11.000000', null, '110.000000', null, '14', null, null, null, null, null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('313', '259', '588', '10', '', null, '10.000000', '10.000000', '11.000000', null, '110.000000', null, '14', null, null, '0.000000', '110.000000', null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('314', '260', '588', '10', '', null, '2.000000', '2.000000', '11.000000', '11.000000', '22.000000', null, '14', null, '0.000000', '0.000000', '22.000000', null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('315', '261', '588', '10', '', null, '2.000000', '2.000000', '22.000000', null, '44.000000', null, '14', null, null, null, null, null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('316', '262', '588', '10', '', null, '2.000000', '2.000000', '22.000000', null, '44.000000', null, '14', null, null, '0.000000', '44.000000', null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('317', '263', '588', '10', '', null, '1.000000', '1.000000', '22.000000', '22.000000', '22.000000', null, '14', null, '0.000000', '0.000000', '22.000000', null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('318', '264', '588', '10', '', null, '1.000000', '1.000000', '22.000000', null, '22.000000', null, '14', null, null, null, null, null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('319', '265', '588', '10', '', null, '1.000000', '1.000000', '22.000000', null, '22.000000', null, '14', null, null, null, null, null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('320', '266', '568', '2', '', null, '5.000000', '5.000000', '11.000000', null, '55.000000', null, '14', null, null, null, null, null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('321', '267', '568', '2', '', null, '2.000000', '2.000000', '15.000000', null, '30.000000', null, '14', null, null, null, null, null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('322', '268', '568', '2', '', null, '1.000000', '1.000000', '11.000000', null, '11.000000', null, '14', '15', null, null, null, null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('323', '269', '588', '10', '', null, '1.000000', '1.000000', '0.000000', null, '0.000000', null, '14', null, null, null, null, '组合件', null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('324', '269', '568', '2', '', null, '1.000000', '1.000000', '0.000000', null, '0.000000', null, '14', null, null, null, null, '普通子件', null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('325', '270', '588', '10', '', null, '1.000000', '1.000000', '0.000000', null, '0.000000', null, '14', null, null, null, null, '组合件', null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('326', '270', '568', '2', '', null, '1.000000', '1.000000', '0.000000', null, '0.000000', null, '14', null, null, null, null, '普通子件', null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('327', '271', '570', '4', '', null, '10.000000', '10.000000', '8.000000', '8.000000', '80.000000', null, '14', null, '0.000000', '0.000000', '80.000000', null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('328', '272', '570', '4', '', null, '2.000000', '2.000000', '14.000000', '14.000000', '28.000000', null, '14', null, '0.000000', '0.000000', '28.000000', null, null, null, null, null, '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('330', '273', '619', '37', '', '橙色,L', '5.000000', '5.000000', '12.000000', '12.000000', '60.000000', null, '14', null, '0.000000', '0.000000', '60.000000', null, null, null, null, null, '63', '0');
-- ----------------------------
-- Table structure for jsh_function

View File

@ -1353,4 +1353,11 @@ alter table jsh_system_config add sale_agreement varchar(500) DEFAULT NULL COMME
-- --------------------------------------------------------
alter table jsh_depot_head add purchase_status varchar(1) DEFAULT NULL COMMENT '采购状态0未采购、2完成采购、3部分采购' after status;
alter table jsh_system_config add purchase_by_sale_flag varchar(1) DEFAULT '0' COMMENT '以销定购启用标记0未启用1启用' after minus_stock_flag;
update jsh_depot_head set purchase_status='0';
update jsh_depot_head set purchase_status='0';
-- --------------------------------------------------------
-- 时间 2022年05月28日
-- by jishenghua
-- 给单据子表增加关联明细id
-- --------------------------------------------------------
alter table jsh_depot_item add link_id bigint(20) DEFAULT NULL COMMENT '关联明细id' after expiration_date;

View File

@ -207,12 +207,13 @@ public class DepotItemController {
item.put("operNumber", diEx.getOperNumber());
item.put("basicNumber", diEx.getBasicNumber());
item.put("preNumber", diEx.getOperNumber()); //原数量
item.put("finishNumber", depotItemService.getFinishNumber(diEx.getMaterialExtendId(), diEx.getHeaderId(), unitInfo, materialUnit, linkType)); //已入库|已出库
item.put("finishNumber", depotItemService.getFinishNumber(diEx.getMaterialExtendId(), diEx.getId(), diEx.getHeaderId(), unitInfo, materialUnit, linkType)); //已入库|已出库
item.put("purchaseDecimal", diEx.getPurchaseDecimal()); //采购价
item.put("unitPrice", diEx.getUnitPrice());
item.put("taxUnitPrice", diEx.getTaxUnitPrice());
item.put("allPrice", diEx.getAllPrice());
item.put("remark", diEx.getRemark());
item.put("linkId", diEx.getLinkId());
item.put("depotId", diEx.getDepotId() == null ? "" : diEx.getDepotId());
item.put("depotName", diEx.getDepotId() == null ? "" : diEx.getDepotName());
item.put("anotherDepotId", diEx.getAnotherDepotId() == null ? "" : diEx.getAnotherDepotId());

View File

@ -46,6 +46,8 @@ public class DepotItem {
private Date expirationDate;
private Long linkId;
private Long tenantId;
private String deleteFlag;
@ -218,6 +220,14 @@ public class DepotItem {
this.expirationDate = expirationDate;
}
public Long getLinkId() {
return linkId;
}
public void setLinkId(Long linkId) {
this.linkId = linkId;
}
public Long getTenantId() {
return tenantId;
}

View File

@ -1426,6 +1426,66 @@ public class DepotItemExample {
return (Criteria) this;
}
public Criteria andLinkIdIsNull() {
addCriterion("link_id is null");
return (Criteria) this;
}
public Criteria andLinkIdIsNotNull() {
addCriterion("link_id is not null");
return (Criteria) this;
}
public Criteria andLinkIdEqualTo(Long value) {
addCriterion("link_id =", value, "linkId");
return (Criteria) this;
}
public Criteria andLinkIdNotEqualTo(Long value) {
addCriterion("link_id <>", value, "linkId");
return (Criteria) this;
}
public Criteria andLinkIdGreaterThan(Long value) {
addCriterion("link_id >", value, "linkId");
return (Criteria) this;
}
public Criteria andLinkIdGreaterThanOrEqualTo(Long value) {
addCriterion("link_id >=", value, "linkId");
return (Criteria) this;
}
public Criteria andLinkIdLessThan(Long value) {
addCriterion("link_id <", value, "linkId");
return (Criteria) this;
}
public Criteria andLinkIdLessThanOrEqualTo(Long value) {
addCriterion("link_id <=", value, "linkId");
return (Criteria) this;
}
public Criteria andLinkIdIn(List<Long> values) {
addCriterion("link_id in", values, "linkId");
return (Criteria) this;
}
public Criteria andLinkIdNotIn(List<Long> values) {
addCriterion("link_id not in", values, "linkId");
return (Criteria) this;
}
public Criteria andLinkIdBetween(Long value1, Long value2) {
addCriterion("link_id between", value1, value2, "linkId");
return (Criteria) this;
}
public Criteria andLinkIdNotBetween(Long value1, Long value2) {
addCriterion("link_id not between", value1, value2, "linkId");
return (Criteria) this;
}
public Criteria andTenantIdIsNull() {
addCriterion("tenant_id is null");
return (Criteria) this;

View File

@ -143,11 +143,13 @@ public interface DepotItemMapperEx {
BigDecimal getFinishNumber(
@Param("meId") Long meId,
@Param("linkId") Long linkId,
@Param("linkNumber") String linkNumber,
@Param("goToType") String goToType);
BigDecimal getRealFinishNumber(
@Param("meId") Long meId,
@Param("linkId") Long linkId,
@Param("linkNumber") String linkNumber,
@Param("currentHeaderId") Long currentHeaderId,
@Param("goToType") String goToType);

View File

@ -259,12 +259,12 @@ public class DepotItemService {
* @return
* @throws Exception
*/
public DepotItem getPreItemByHeaderIdAndMaterial(String linkNumber, Long meId)throws Exception {
public DepotItem getPreItemByHeaderIdAndMaterial(String linkNumber, Long meId, Long linkId)throws Exception {
DepotItem depotItem = new DepotItem();
try{
DepotHead depotHead = depotHeadService.getDepotHead(linkNumber);
DepotItemExample example = new DepotItemExample();
example.createCriteria().andHeaderIdEqualTo(depotHead.getId()).andMaterialExtendIdEqualTo(meId).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
example.createCriteria().andHeaderIdEqualTo(depotHead.getId()).andMaterialExtendIdEqualTo(meId).andIdEqualTo(linkId).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
List<DepotItem> list = depotItemMapper.selectByExample(example);
if(list!=null && list.size()>0) {
depotItem = list.get(0);
@ -430,6 +430,9 @@ public class DepotItemService {
if (StringUtil.isExist(rowObj.get("sku"))) {
depotItem.setSku(rowObj.getString("sku"));
}
if (StringUtil.isExist(rowObj.get("linkId"))) {
depotItem.setLinkId(rowObj.getLong("linkId"));
}
//以下进行单位换算
Unit unitInfo = materialService.findUnit(materialExtend.getMaterialId()); //查询计量单位信息
if (StringUtil.isExist(rowObj.get("operNumber"))) {
@ -467,9 +470,9 @@ public class DepotItemService {
String unit = rowObj.get("unit").toString();
Long preHeaderId = depotHeadService.getDepotHead(depotHead.getLinkNumber()).getId();
//前一个单据的数量
BigDecimal preNumber = getPreItemByHeaderIdAndMaterial(depotHead.getLinkNumber(), depotItem.getMaterialExtendId()).getOperNumber();
BigDecimal preNumber = getPreItemByHeaderIdAndMaterial(depotHead.getLinkNumber(), depotItem.getMaterialExtendId(), depotItem.getLinkId()).getOperNumber();
//除去此单据之外的已入库|已出库
BigDecimal realFinishNumber = getRealFinishNumber(depotItem.getMaterialExtendId(), preHeaderId, headerId, unitInfo, unit);
BigDecimal realFinishNumber = getRealFinishNumber(depotItem.getMaterialExtendId(), depotItem.getLinkId(), preHeaderId, headerId, unitInfo, unit);
if(depotItem.getOperNumber().add(realFinishNumber).compareTo(preNumber)>0) {
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_NUMBER_NEED_EDIT_FAILED_CODE,
String.format(ExceptionConstants.DEPOT_HEAD_NUMBER_NEED_EDIT_FAILED_MSG, barCode));
@ -853,7 +856,8 @@ public class DepotItemService {
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
public BigDecimal getFinishNumber(Long meId, Long headerId, Unit unitInfo, String materialUnit, String linkType) {
public BigDecimal getFinishNumber(Long meId, Long id, Long headerId, Unit unitInfo, String materialUnit, String linkType) {
Long linkId = id;
String goToType = "";
DepotHead depotHead =depotHeadMapper.selectByPrimaryKey(headerId);
String linkNumber = depotHead.getNumber(); //订单号
@ -869,7 +873,7 @@ public class DepotItemService {
goToType = BusinessConstants.SUB_TYPE_SALES;
}
}
BigDecimal count = depotItemMapperEx.getFinishNumber(meId, linkNumber, goToType);
BigDecimal count = depotItemMapperEx.getFinishNumber(meId, linkId, linkNumber, goToType);
//根据多单位情况进行数量的转换
if(materialUnit.equals(unitInfo.getOtherUnit()) && unitInfo.getRatio() != 0) {
count = count.divide(BigDecimal.valueOf(unitInfo.getRatio()),2,BigDecimal.ROUND_HALF_UP);
@ -886,6 +890,7 @@ public class DepotItemService {
/**
* 除去此单据之外的已入库|已出库
* @param meId
* @param linkId
* @param preHeaderId
* @param currentHeaderId
* @param unitInfo
@ -893,7 +898,7 @@ public class DepotItemService {
* @return
*/
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
public BigDecimal getRealFinishNumber(Long meId, Long preHeaderId, Long currentHeaderId, Unit unitInfo, String materialUnit) {
public BigDecimal getRealFinishNumber(Long meId, Long linkId, Long preHeaderId, Long currentHeaderId, Unit unitInfo, String materialUnit) {
String goToType = "";
DepotHead depotHead =depotHeadMapper.selectByPrimaryKey(preHeaderId);
String linkNumber = depotHead.getNumber(); //订单号
@ -903,7 +908,7 @@ public class DepotItemService {
if(BusinessConstants.SUB_TYPE_SALES_ORDER.equals(depotHead.getSubType())) {
goToType = BusinessConstants.SUB_TYPE_SALES;
}
BigDecimal count = depotItemMapperEx.getRealFinishNumber(meId, linkNumber, currentHeaderId, goToType);
BigDecimal count = depotItemMapperEx.getRealFinishNumber(meId, linkId, linkNumber, currentHeaderId, goToType);
//根据多单位情况进行数量的转换
if(materialUnit.equals(unitInfo.getOtherUnit()) && unitInfo.getRatio() != 0) {
count = count.divide(BigDecimal.valueOf(unitInfo.getRatio()),2,BigDecimal.ROUND_HALF_UP);

View File

@ -23,6 +23,7 @@
<result column="sn_list" jdbcType="VARCHAR" property="snList" />
<result column="batch_number" jdbcType="VARCHAR" property="batchNumber" />
<result column="expiration_date" jdbcType="TIMESTAMP" property="expirationDate" />
<result column="link_id" jdbcType="BIGINT" property="linkId" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
</resultMap>
@ -88,7 +89,7 @@
id, header_id, material_id, material_extend_id, material_unit, sku, oper_number,
basic_number, unit_price, tax_unit_price, all_price, remark, depot_id, another_depot_id,
tax_rate, tax_money, tax_last_money, material_type, sn_list, batch_number, expiration_date,
tenant_id, delete_flag
link_id, tenant_id, delete_flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="BaseResultMap">
select
@ -128,7 +129,8 @@
depot_id, another_depot_id, tax_rate,
tax_money, tax_last_money, material_type,
sn_list, batch_number, expiration_date,
tenant_id, delete_flag)
link_id, tenant_id, delete_flag
)
values (#{id,jdbcType=BIGINT}, #{headerId,jdbcType=BIGINT}, #{materialId,jdbcType=BIGINT},
#{materialExtendId,jdbcType=BIGINT}, #{materialUnit,jdbcType=VARCHAR}, #{sku,jdbcType=VARCHAR},
#{operNumber,jdbcType=DECIMAL}, #{basicNumber,jdbcType=DECIMAL}, #{unitPrice,jdbcType=DECIMAL},
@ -136,7 +138,8 @@
#{depotId,jdbcType=BIGINT}, #{anotherDepotId,jdbcType=BIGINT}, #{taxRate,jdbcType=DECIMAL},
#{taxMoney,jdbcType=DECIMAL}, #{taxLastMoney,jdbcType=DECIMAL}, #{materialType,jdbcType=VARCHAR},
#{snList,jdbcType=VARCHAR}, #{batchNumber,jdbcType=VARCHAR}, #{expirationDate,jdbcType=TIMESTAMP},
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
#{linkId,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.DepotItem">
insert into jsh_depot_item
@ -204,6 +207,9 @@
<if test="expirationDate != null">
expiration_date,
</if>
<if test="linkId != null">
link_id,
</if>
<if test="tenantId != null">
tenant_id,
</if>
@ -275,6 +281,9 @@
<if test="expirationDate != null">
#{expirationDate,jdbcType=TIMESTAMP},
</if>
<if test="linkId != null">
#{linkId,jdbcType=BIGINT},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
@ -355,6 +364,9 @@
<if test="record.expirationDate != null">
expiration_date = #{record.expirationDate,jdbcType=TIMESTAMP},
</if>
<if test="record.linkId != null">
link_id = #{record.linkId,jdbcType=BIGINT},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
@ -389,6 +401,7 @@
sn_list = #{record.snList,jdbcType=VARCHAR},
batch_number = #{record.batchNumber,jdbcType=VARCHAR},
expiration_date = #{record.expirationDate,jdbcType=TIMESTAMP},
link_id = #{record.linkId,jdbcType=BIGINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
@ -458,6 +471,9 @@
<if test="expirationDate != null">
expiration_date = #{expirationDate,jdbcType=TIMESTAMP},
</if>
<if test="linkId != null">
link_id = #{linkId,jdbcType=BIGINT},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
@ -489,6 +505,7 @@
sn_list = #{snList,jdbcType=VARCHAR},
batch_number = #{batchNumber,jdbcType=VARCHAR},
expiration_date = #{expirationDate,jdbcType=TIMESTAMP},
link_id = #{linkId,jdbcType=BIGINT},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}

View File

@ -598,6 +598,7 @@
<select id="getFinishNumber" resultType="java.math.BigDecimal">
select ifnull(sum(di.basic_number),0) from jsh_depot_item di
where di.material_extend_id=#{meId}
and di.link_id=#{linkId}
and ifnull(di.delete_flag,'0') !='1'
and di.header_id
in
@ -615,6 +616,7 @@
<select id="getRealFinishNumber" resultType="java.math.BigDecimal">
select ifnull(sum(di.basic_number),0) from jsh_depot_item di
where di.material_extend_id=#{meId}
and di.link_id=#{linkId}
and ifnull(di.delete_flag,'0') !='1'
and di.header_id
in