This commit is contained in:
linfso 2025-01-05 09:08:18 +08:00
parent 852f0dae13
commit a653c5e867
3 changed files with 28 additions and 35 deletions

View File

@ -66,16 +66,15 @@ public class EmisWarehouseIn extends BaseEntity
private String status;
/* 0-未入仓 1-已入仓 */
private String stockInFlag;
/* 是否上传图片 1-是 0-未 */
private String blUploadPic;
/* 总件数 */
private Integer totalParcelQty;
/* 总体积 */
private BigDecimal totalVolume;
/* 总重量 */
private BigDecimal totalWeight;
// --------- 扩展参数
// 是否上传图片
private String blUploadPic;
private EmisWaybill waybillDetail;
// 入仓批次信息

View File

@ -156,6 +156,7 @@ public class EmisWarehouseInBatchServiceImpl extends EmisBaseService implements
BigDecimal totalAllWeight = BigDecimal.ZERO;
BigDecimal totalAllVolume = BigDecimal.ZERO;
Integer totalAllParcelQty = 0;
String blUploadPic="0";
if(!CollectionUtils.isEmpty(batchList)){
for (EmisWarehouseInBatch emisWarehouseInBatch:batchList) {
@ -175,6 +176,10 @@ public class EmisWarehouseInBatchServiceImpl extends EmisBaseService implements
totalAllParcelQty = totalAllParcelQty+parcelQty;
}
if(!StringUtils.isEmpty(emisWarehouseInBatch.getPicUrl())){
blUploadPic="1";
}
}
}
@ -183,6 +188,7 @@ public class EmisWarehouseInBatchServiceImpl extends EmisBaseService implements
emisWarehouseIn.setTotalVolume(totalAllVolume);
emisWarehouseIn.setTotalParcelQty(totalAllParcelQty);
emisWarehouseIn.setInNo(inNo);
emisWarehouseIn.setBlUploadPic(blUploadPic);
// 更新入库状态
emisWarehouseInMapper.updateTotalWeightInfo(emisWarehouseIn);
}

View File

@ -18,12 +18,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="usedStatus" column="used_status" />
<result property="status" column="status" />
<result property="stockInFlag" column="stock_in_flag" />
<result property="blUploadPic" column="bl_upload_pic" />
<result property="totalParcelQty" column="total_parcel_qty" />
<result property="totalVolume" column="total_volume" />
<result property="totalWeight" column="total_weight" />
<result property="blUploadPic" column="bl_upload_pic" />
</resultMap>
<resultMap id="EmisWarehouseInResult" type="EmisWarehouseIn" extends="BaseEmisWarehouseInResult" >
@ -45,11 +43,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectEmisWarehouseInVo">
select id, serial_no, in_no, order_sn, bill_code, customer_code, customer_name, entry_date, confirm_status, confirm_date, used_status, status, stock_in_flag, total_parcel_qty, total_volume, total_weight, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_warehouse_in
select id, serial_no, in_no, order_sn, bill_code, customer_code, customer_name, entry_date, confirm_status, confirm_date, used_status, status, stock_in_flag, bl_upload_pic, total_parcel_qty, total_volume, total_weight, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_warehouse_in
</sql>
<select id="selectEmisWarehouseInListByOms" parameterType="EmisWarehouseIn" resultMap="EmisWarehouseInResult">
select id, serial_no, in_no, order_sn, bill_code, customer_code, customer_name, entry_date, confirm_status, confirm_date, used_status, status, stock_in_flag, total_parcel_qty, total_volume, total_weight, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
select id, serial_no, in_no, order_sn, bill_code, customer_code, customer_name, entry_date, confirm_status, confirm_date, used_status, status, stock_in_flag, bl_upload_pic, total_parcel_qty, total_volume, total_weight, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_warehouse_in a
<where>
del_flag='0'
@ -66,6 +64,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="confirmStatus != null and confirmStatus != ''"> and confirm_status=#{confirmStatus}</if>
<if test="confirmDate != null "> and confirm_date = #{confirmDate}</if>
<if test="blUploadPic != null and blUploadPic != ''"> and bl_upload_pic=#{blUploadPic}</if>
<if test="status != null and status != ''"> and status=#{status}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</if>
@ -123,7 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectEmisWarehouseInList" parameterType="EmisWarehouseIn" resultMap="EmisWarehouseInResult">
select id, serial_no, in_no, order_sn, bill_code, customer_code, customer_name, entry_date, confirm_status, confirm_date, used_status, status, stock_in_flag, total_parcel_qty, total_volume, total_weight, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
select id, serial_no, in_no, order_sn, bill_code, customer_code, customer_name, entry_date, confirm_status, confirm_date, used_status, status, stock_in_flag, bl_upload_pic, total_parcel_qty, total_volume, total_weight, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_warehouse_in a
<where>
del_flag='0'
@ -139,6 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="entryDate != null "> and entry_date = #{entryDate}</if>
<if test="confirmStatus != null and confirmStatus != ''"> and confirm_status=#{confirmStatus}</if>
<if test="confirmDate != null "> and confirm_date = #{confirmDate}</if>
<if test="blUploadPic != null and blUploadPic != ''"> and bl_upload_pic=#{blUploadPic}</if>
<if test="status != null and status != ''"> and status=#{status}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
@ -162,7 +164,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and used_status= '0'
</if>
<if test="stockInFlag != null and stockInFlag != ''"> and stock_in_flag=#{stockInFlag}</if>
<if test="params.queryStatusType != null and params.queryStatusType == 0">
and confirm_status= '0'
@ -226,26 +227,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
)
<if test="params.blUploadGoodsPic != null and params.blUploadGoodsPic == 1">
and EXISTS (
select 1 from emis_warehouse_in_batch ewib
where
ewib.del_flag='0'
and a.in_no=ewib.in_no
and ewib.pic_url is not null
)
</if>
<if test="params.blUploadGoodsPic != null and params.blUploadGoodsPic == 0">
and EXISTS (
select 1 from emis_warehouse_in_batch ewib
where
ewib.del_flag='0'
and a.in_no=ewib.in_no
and ewib.pic_url is null
)
</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != ''">
and create_time <![CDATA[ >= ]]> #{params.beginCreateTime}
@ -260,13 +241,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectEmisWarehouseInById" parameterType="Long" resultMap="EmisWarehouseInResult">
select id, serial_no, in_no, order_sn, bill_code, customer_code, customer_name, entry_date, confirm_status, confirm_date, used_status, status, stock_in_flag, total_parcel_qty, total_volume, total_weight, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
select id, serial_no, in_no, order_sn, bill_code, customer_code, customer_name, entry_date, confirm_status, confirm_date, used_status, status, stock_in_flag, bl_upload_pic, total_parcel_qty, total_volume, total_weight, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_warehouse_in a
where a.id = #{id}
</select>
<select id="selectEmisWarehouseInByInNo" parameterType="String" resultMap="EmisWarehouseInResult">
select id, serial_no, in_no, order_sn, bill_code, customer_code, customer_name, entry_date, confirm_status, confirm_date, used_status, status, stock_in_flag, total_parcel_qty, total_volume, total_weight, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
select id, serial_no, in_no, order_sn, bill_code, customer_code, customer_name, entry_date, confirm_status, confirm_date, used_status, status, stock_in_flag, bl_upload_pic, total_parcel_qty, total_volume, total_weight, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_warehouse_in a
where a.in_no = #{inNo} limit 1
</select>
@ -286,6 +267,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="usedStatus != null and usedStatus != ''">used_status,</if>
<if test="status != null and status != ''">status,</if>
<if test="stockInFlag != null and stockInFlag != ''">stock_in_flag,</if>
<if test="blUploadPic != null and blUploadPic != ''">bl_upload_pic,</if>
<if test="totalParcelQty != null">total_parcel_qty,</if>
<if test="totalVolume != null">total_volume,</if>
<if test="totalWeight != null">total_weight,</if>
@ -312,6 +294,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="usedStatus != null and usedStatus != ''">#{usedStatus},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="stockInFlag != null and stockInFlag != ''">#{stockInFlag},</if>
<if test="blUploadPic != null and blUploadPic != ''">#{blUploadPic},</if>
<if test="totalParcelQty != null">#{totalParcelQty},</if>
<if test="totalVolume != null">#{totalVolume},</if>
<if test="totalWeight != null">#{totalWeight},</if>
@ -342,6 +325,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="usedStatus != null and usedStatus != ''">used_status = #{usedStatus},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="stockInFlag != null and stockInFlag != ''">stock_in_flag = #{stockInFlag},</if>
<if test="blUploadPic != null and blUploadPic != ''">bl_upload_pic = #{blUploadPic},</if>
<if test="totalParcelQty != null">total_parcel_qty = #{totalParcelQty},</if>
<if test="totalVolume != null">total_volume = #{totalVolume},</if>
<if test="totalWeight != null">total_weight = #{totalWeight},</if>
@ -384,7 +368,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateTotalWeightInfo" parameterType="EmisWarehouseIn">
update emis_warehouse_in
set stock_in_flag = '1',total_parcel_qty=#{totalParcelQty},total_volume=#{totalVolume},total_weight=#{totalWeight}
set stock_in_flag = '1',
total_parcel_qty=#{totalParcelQty},
total_volume=#{totalVolume},
total_weight=#{totalWeight},
bl_upload_pic=#{blUploadPic}
where in_no = #{inNo}
</update>
@ -394,11 +382,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteEmisWarehouseInById" parameterType="Long">
delete from emis_warehouse_in where id = #{id}
update emis_warehouse_in set del_flag='1' where id = #{id}
</delete>
<delete id="deleteEmisWarehouseInByIds" parameterType="String">
delete from emis_warehouse_in where id in
update emis_warehouse_in set del_flag='1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>