供应链管理
This commit is contained in:
parent
9d83a44f32
commit
0b8d75223e
|
|
@ -170,6 +170,12 @@ public class ImsOutInventoryServiceImpl implements IImsOutInventoryService
|
||||||
Long outId = imsOutInventory.getOutId();
|
Long outId = imsOutInventory.getOutId();
|
||||||
if (StringUtils.isNotNull(imsOutInventoryDetailAddList))
|
if (StringUtils.isNotNull(imsOutInventoryDetailAddList))
|
||||||
{
|
{
|
||||||
|
if(Long.valueOf(3).equals(imsOutInventory.getOutType())) {
|
||||||
|
boolean flag = imsOutInventoryDetailAddList.stream().anyMatch(item -> Objects.isNull(item.getIntoDetailId()));
|
||||||
|
if(flag) {
|
||||||
|
throw new ServiceException("请选择入库批次");
|
||||||
|
}
|
||||||
|
}
|
||||||
List<ImsOutInventoryDetail> list = new ArrayList<>();
|
List<ImsOutInventoryDetail> list = new ArrayList<>();
|
||||||
long totalPriceSum = 0L;
|
long totalPriceSum = 0L;
|
||||||
for (ImsOutInventoryDetailAdd imsOutInventoryDetailAdd : imsOutInventoryDetailAddList)
|
for (ImsOutInventoryDetailAdd imsOutInventoryDetailAdd : imsOutInventoryDetailAddList)
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="minNum != null">min_num,</if>
|
<if test="minNum != null">min_num,</if>
|
||||||
<if test="maxNum != null">max_num,</if>
|
<if test="maxNum != null">max_num,</if>
|
||||||
<if test="materialNum != null">material_num,</if>
|
<if test="materialNum != null">material_num,</if>
|
||||||
<if test="inventoryStatus != null">inventory_status,</if>
|
inventory_status,
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
<if test="delFlag != null">del_flag,</if>
|
<if test="delFlag != null">del_flag,</if>
|
||||||
<if test="createBy != null">create_by,</if>
|
<if test="createBy != null">create_by,</if>
|
||||||
|
|
@ -111,6 +111,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="maxNum != null">#{maxNum},</if>
|
<if test="maxNum != null">#{maxNum},</if>
|
||||||
<if test="materialNum != null">#{materialNum},</if>
|
<if test="materialNum != null">#{materialNum},</if>
|
||||||
<if test="inventoryStatus != null">#{inventoryStatus},</if>
|
<if test="inventoryStatus != null">#{inventoryStatus},</if>
|
||||||
|
<if test="inventoryStatus == null">
|
||||||
|
inventory_status = CASE
|
||||||
|
WHEN material_num <![CDATA[ < ]]> min_num THEN 2
|
||||||
|
WHEN material_num <![CDATA[ > ]]> max_num THEN 3
|
||||||
|
ELSE 1
|
||||||
|
END,
|
||||||
|
</if>
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
<if test="delFlag != null">#{delFlag},</if>
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
<if test="createBy != null">#{createBy},</if>
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
|
@ -119,6 +126,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<!-- <if test="updateTime != null">#{updateTime},</if>-->
|
<!-- <if test="updateTime != null">#{updateTime},</if>-->
|
||||||
</trim>
|
</trim>
|
||||||
on duplicate key update material_num = material_num + #{materialNum},
|
on duplicate key update material_num = material_num + #{materialNum},
|
||||||
|
inventory_status = CASE
|
||||||
|
WHEN material_num <![CDATA[ < ]]> min_num THEN 2
|
||||||
|
WHEN material_num <![CDATA[ > ]]> max_num THEN 3
|
||||||
|
ELSE 1
|
||||||
|
END,
|
||||||
update_by = #{updateBy},
|
update_by = #{updateBy},
|
||||||
update_time = #{updateTime}
|
update_time = #{updateTime}
|
||||||
</insert>
|
</insert>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue