UDI同步库查询i优化

zhairh
anthonyywj2 3 years ago
parent 265dae837d
commit cedb87b620

@ -482,7 +482,6 @@ public class WareHouseController {
UdiEntity udiEntity = FilterUdiUtils.getUdi(code);
if (udiEntity == null) {
String sptmtodi = systemParamConfigService.selectValueByParamKey(Constant.SPTM_TO_DI);
if (sptmtodi.equals("1")) {
if (code.length() == 13) {

@ -610,20 +610,22 @@
</select>
<select id="selectByBillNo" resultType="com.glxp.sale.admin.entity.inout.OrderEntity">
select *
select io_order.*, auth_dept.name deptName
from io_order
where status = 4
and (id = #{billNo} or erpFk = #{billNo})
left join auth_dept on io_order.deptCode = auth_dept.code
where io_order.status = 4
and (io_order.id = #{billNo} or io_order.erpFk = #{billNo})
</select>
<select id="selectByIds" resultType="com.glxp.sale.admin.entity.inout.OrderEntity">
select *
select io_order.*,auth_dept.name deptName
from io_order
where id in
left join auth_dept on io_order.deptCode =auth_dept.code
where io_order.id in
<foreach collection="orderIds" separator="," index="index" item="item" open="(" close=")">
#{item}
</foreach>
order by id desc
order by io_order.id desc
</select>
<update id="updateOrderTime">

@ -246,10 +246,11 @@
<select id="findOne" parameterType="com.glxp.sale.admin.req.inout.StockOrderFilterRequest"
resultType="com.glxp.sale.admin.entity.inout.StockOrderEntity">
SELECT * FROM stock_order
select stock_order.*, auth_dept.name deptName FROM stock_order
left join auth_dept on stock_order.dept = auth_dept.code
<where>
<if test="id != '' and id!=null">
and id =#{id}
and stock_order.id =#{id}
</if>
<if test="corpId != '' and corpId !=null">
and corpId =#{corpId}

Loading…
Cancel
Save