单据条码清单展示排序问题

busUser
anthonywj 2 years ago
parent 8117eef182
commit 3b1a3b05f9

@ -60,6 +60,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -518,6 +519,7 @@ public class SpsSyncDownloadService {
if (CollUtil.isNotEmpty(orderEntities)) { if (CollUtil.isNotEmpty(orderEntities)) {
for (OrderEntity orderEntity : orderEntities) { for (OrderEntity orderEntity : orderEntities) {
List<WarehouseEntity> codes = codesService.findByReceiptId(orderEntity.getId()); List<WarehouseEntity> codes = codesService.findByReceiptId(orderEntity.getId());
Collections.reverse(codes);
if (CollUtil.isNotEmpty(codes)) { if (CollUtil.isNotEmpty(codes)) {
warehouseEntityList.addAll(codes); warehouseEntityList.addAll(codes);
} }

@ -1,7 +1,7 @@
# \u751F\u4EA7\u73AF\u5883 # \u751F\u4EA7\u73AF\u5883
server.port=9996 server.port=9996
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.jdbc-url=jdbc:mysql://127.0.0.1:3306/spms_za?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true spring.datasource.jdbc-url=jdbc:mysql://127.0.0.1:3306/spms_ph?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=123456 spring.datasource.password=123456
spring.datasource.hikari.connection-timeout=60000 spring.datasource.hikari.connection-timeout=60000

@ -2,7 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.sale.admin.dao.inout.StockOrderDao"> <mapper namespace="com.glxp.sale.admin.dao.inout.StockOrderDao">
<select id="listStockOrder" parameterType="com.glxp.sale.admin.req.inout.StockOrderQueryRequest" <select id="listStockOrder" parameterType="com.glxp.sale.admin.req.inout.StockOrderQueryRequest"
resultType="com.glxp.sale.admin.entity.inout.StockOrderEntity"> resultType="com.glxp.sale.admin.entity.inout.StockOrderEntity">
SELECT * SELECT *
@ -14,14 +13,12 @@
<select id="listStockOrderNoDealWith" parameterType="com.glxp.sale.admin.req.inout.StockOrderQueryRequest" <select id="listStockOrderNoDealWith" parameterType="com.glxp.sale.admin.req.inout.StockOrderQueryRequest"
resultType="com.glxp.sale.admin.entity.inout.StockOrderEntity"> resultType="com.glxp.sale.admin.entity.inout.StockOrderEntity">
select * select *
from stock_order from stock_order
INNER JOIN inv_warehouse_user on stock_order.locStorageCode = inv_warehouse_user.`code` INNER JOIN inv_warehouse_user on stock_order.locStorageCode = inv_warehouse_user.`code`
where `status` = '101' where `status` = '101'
group by stock_order.id group by stock_order.id
ORDER BY id DESC ORDER BY id DESC
</select> </select>
<insert id="insertStockOrder" useGeneratedKeys="true" keyProperty="id" <insert id="insertStockOrder" useGeneratedKeys="true" keyProperty="id"
@ -30,7 +27,7 @@
thirdSysFk, status, statusInfo, `type`, sourceType, thirdSysFk, status, statusInfo, `type`, sourceType,
printStatus, unitIdFk, customerId, thirdOrderFk, orderIdFk, printStatus, unitIdFk, customerId, thirdOrderFk, orderIdFk,
totalPrice, locStorageCode, supplementNo, createUser, reviewUser, entrustEnd, auditTime, totalPrice, locStorageCode, supplementNo, createUser, reviewUser, entrustEnd, auditTime,
updateTime, invWarehouseCode, fromSubInvCode, dept ,noInvOut) updateTime, invWarehouseCode, fromSubInvCode, dept, noInvOut)
values (#{id}, values (#{id},
#{billNo}, #{billNo},
#{billdate}, #{billdate},
@ -45,39 +42,92 @@
#{sourceType}, #{sourceType},
#{printStatus}, #{unitIdFk}, #{customerId}, #{thirdOrderFk}, #{orderIdFk}, #{totalPrice}, #{printStatus}, #{unitIdFk}, #{customerId}, #{thirdOrderFk}, #{orderIdFk}, #{totalPrice},
#{locStorageCode}, #{supplementNo}, #{createUser}, #{reviewUser}, #{entrustEnd}, #{auditTime}, #{locStorageCode}, #{supplementNo}, #{createUser}, #{reviewUser}, #{entrustEnd}, #{auditTime},
#{updateTime}, #{invWarehouseCode}, #{fromSubInvCode}, #{dept},#{noInvOut}) #{updateTime}, #{invWarehouseCode}, #{fromSubInvCode}, #{dept}, #{noInvOut})
</insert> </insert>
<update id="updateById" parameterType="com.glxp.sale.admin.entity.inout.StockOrderEntity"> <update id="updateById" parameterType="com.glxp.sale.admin.entity.inout.StockOrderEntity">
UPDATE stock_order UPDATE stock_order
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<if test="billNo != null">billNo=#{billNo},</if> <if test="billNo != null">
<if test="billdate != null">billdate=#{billdate},</if> billNo=#{billNo},
<if test="corpId != null">corpId=#{corpId},</if> </if>
<if test="corpName != null">corpName=#{corpName},</if> <if test="billdate != null">
<if test="billType != null">billType=#{billType},</if> billdate=#{billdate},
<if test="billFlag != null">billFlag=#{billFlag},</if> </if>
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if> <if test="corpId != null">
<if test="status != null">status=#{status},</if> corpId=#{corpId},
<if test="statusInfo != null">statusInfo=#{statusInfo},</if> </if>
<if test="type != null">type=#{type},</if> <if test="corpName != null">
<if test="sourceType != null">sourceType=#{sourceType},</if> corpName=#{corpName},
<if test="printStatus != null">printStatus=#{printStatus},</if> </if>
<if test="unitIdFk != null">unitIdFk=#{unitIdFk},</if> <if test="billType != null">
<if test="customerId != null">customerId=#{customerId},</if> billType=#{billType},
<if test="thirdOrderFk != null">thirdOrderFk=#{thirdOrderFk},</if> </if>
<if test="orderIdFk != null">orderIdFk=#{orderIdFk},</if> <if test="billFlag != null">
<if test="totalPrice != null">totalPrice=#{totalPrice},</if> billFlag=#{billFlag},
<if test="locStorageCode != null">locStorageCode=#{locStorageCode},</if> </if>
<if test="supplementNo != null">supplementNo=#{supplementNo},</if> <if test="thirdSysFk != null">
<if test="createUser != null">createUser=#{createUser},</if> thirdSysFk=#{thirdSysFk},
<if test="reviewUser != null">reviewUser=#{reviewUser},</if> </if>
<if test="entrustEnd != null">entrustEnd=#{entrustEnd},</if> <if test="status != null">
<if test="auditTime != null">auditTime=#{auditTime},</if> status=#{status},
<if test="updateTime != null">updateTime=#{updateTime},</if> </if>
<if test="invWarehouseCode != null">invWarehouseCode=#{invWarehouseCode},</if> <if test="statusInfo != null">
<if test="fromSubInvCode != null">fromSubInvCode=#{fromSubInvCode},</if> statusInfo=#{statusInfo},
<if test="dept != null">dept=#{dept},</if> </if>
<if test="type != null">
type=#{type},
</if>
<if test="sourceType != null">
sourceType=#{sourceType},
</if>
<if test="printStatus != null">
printStatus=#{printStatus},
</if>
<if test="unitIdFk != null">
unitIdFk=#{unitIdFk},
</if>
<if test="customerId != null">
customerId=#{customerId},
</if>
<if test="thirdOrderFk != null">
thirdOrderFk=#{thirdOrderFk},
</if>
<if test="orderIdFk != null">
orderIdFk=#{orderIdFk},
</if>
<if test="totalPrice != null">
totalPrice=#{totalPrice},
</if>
<if test="locStorageCode != null">
locStorageCode=#{locStorageCode},
</if>
<if test="supplementNo != null">
supplementNo=#{supplementNo},
</if>
<if test="createUser != null">
createUser=#{createUser},
</if>
<if test="reviewUser != null">
reviewUser=#{reviewUser},
</if>
<if test="entrustEnd != null">
entrustEnd=#{entrustEnd},
</if>
<if test="auditTime != null">
auditTime=#{auditTime},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
<if test="invWarehouseCode != null">
invWarehouseCode=#{invWarehouseCode},
</if>
<if test="fromSubInvCode != null">
fromSubInvCode=#{fromSubInvCode},
</if>
<if test="dept != null">
dept=#{dept},
</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
@ -106,138 +156,154 @@
</update> </update>
<select id="filterListOr" parameterType="com.glxp.sale.admin.req.inout.StockOrderFilterRequest" <select id="filterListOr" parameterType="com.glxp.sale.admin.req.inout.StockOrderFilterRequest"
resultType="com.glxp.sale.admin.entity.inout.StockOrderEntity"> resultType="com.glxp.sale.admin.entity.inout.StockOrderEntity">
SELECT stock_order.* ,inv_warehouse.name invName, iws.name subInvName ,basic_bustype_local.name SELECT stock_order.*,
billTypeName,iws2.name fromSubInvName,auth_dept.name deptName,auth_user.employeeName reviewUserName FROM inv_warehouse.name invName,
stock_order iws.name subInvName,
basic_bustype_local.name
billTypeName,
iws2.name fromSubInvName,
auth_dept.name deptName,
auth_user.employeeName reviewUserName
FROM stock_order
left join basic_bustype_local on stock_order.billType = basic_bustype_local.action left join basic_bustype_local on stock_order.billType = basic_bustype_local.action
LEFT JOIN inv_warehouse ON stock_order.locStorageCode = inv_warehouse.`code` LEFT JOIN inv_warehouse ON stock_order.locStorageCode = inv_warehouse.`code`
LEFT JOIN inv_warehouse_sub ON stock_order.locStorageCode = inv_warehouse.`code` LEFT JOIN inv_warehouse_sub ON stock_order.locStorageCode = inv_warehouse.`code`
LEFT JOIN inv_warehouse_sub iws ON stock_order.invWarehouseCode = iws.`code` LEFT JOIN inv_warehouse_sub iws ON stock_order.invWarehouseCode = iws.`code`
LEFT JOIN inv_warehouse_sub iws2 ON stock_order.fromSubInvCode = iws2.`code` LEFT JOIN inv_warehouse_sub iws2 ON stock_order.fromSubInvCode = iws2.`code`
LEFT JOIN inv_warehouse_user on inv_warehouse_sub.code = inv_warehouse_user.`code` LEFT JOIN inv_warehouse_user on inv_warehouse_sub.code = inv_warehouse_user.`code`
left join auth_dept on stock_order.dept =auth_dept.code left join auth_dept on stock_order.dept = auth_dept.code
left join auth_user on stock_order.reviewUser = auth_user.id left join auth_user on stock_order.reviewUser = auth_user.id
<where> <where>
<if test="id != '' and id!=null"> <if test="id != '' and id != null">
and stock_order.id =#{id} and stock_order.id = #{id}
</if> </if>
<if test="billNo != '' and billNo!=null"> <if test="billNo != '' and billNo != null">
and billNo LIKE concat('%',#{billNo},'%') and billNo LIKE concat('%', #{billNo}, '%')
</if> </if>
<if test="billdate != '' and billdate!=null"> <if test="billdate != '' and billdate != null">
and billdate = #{billdate} and billdate = #{billdate}
</if> </if>
<if test="corpId != '' and corpId!=null"> <if test="corpId != '' and corpId != null">
and corpId = #{corpId} and corpId = #{corpId}
</if> </if>
<if test="corpName != '' and corpName!=null"> <if test="corpName != '' and corpName != null">
and corpName LIKE concat('%',#{corpName},'%') and corpName LIKE concat('%', #{corpName}, '%')
</if> </if>
<if test="billType != '' and billType!=null"> <if test="billType != '' and billType != null">
and billType = #{billType} and billType = #{billType}
</if> </if>
<if test="billFlag != '' and billFlag!=null"> <if test="billFlag != '' and billFlag != null">
and billFlag = #{billFlag} and billFlag = #{billFlag}
</if> </if>
<if test="thirdSysFk != '' and thirdSysFk!=null"> <if test="thirdSysFk != '' and thirdSysFk != null">
and thirdSysFk = #{thirdSysFk} and thirdSysFk = #{thirdSysFk}
</if> </if>
<if test="status != '' and status!=null"> <if test="status != '' and status != null">
and stock_order.status = #{status} and stock_order.status = #{status}
</if> </if>
<if test="statusInfo != '' and statusInfo!=null"> <if test="statusInfo != '' and statusInfo != null">
and statusInfo = #{statusInfo} and statusInfo = #{statusInfo}
</if> </if>
<if test="type != '' and type!=null"> <if test="type != '' and type != null">
and stock_order.type = #{type} and stock_order.type = #{type}
</if> </if>
<if test="sourceType != '' and sourceType!=null"> <if test="sourceType != '' and sourceType != null">
and sourceType = #{sourceType} and sourceType = #{sourceType}
</if> </if>
<if test="printStatus != '' and printStatus!=null"> <if test="printStatus != '' and printStatus != null">
and printStatus = #{printStatus} and printStatus = #{printStatus}
</if> </if>
<if test="unitIdFk != '' and unitIdFk!=null"> <if test="unitIdFk != '' and unitIdFk != null">
and unitIdFk = #{unitIdFk} and unitIdFk = #{unitIdFk}
</if> </if>
<if test="localAction != '' and localAction!=null"> <if test="localAction != '' and localAction != null">
and billType = #{localAction} and billType = #{localAction}
</if> </if>
<if test="userId != '' and userId!=null"> <if test="userId != '' and userId != null">
and (invWarehouseCode in (select code from inv_warehouse_user WHERE userId =#{userId}) or and (invWarehouseCode in (select code from inv_warehouse_user WHERE userId = #{userId}) or
invWarehouseCode is null or invWarehouseCode='') invWarehouseCode is null or invWarehouseCode = '')
</if> </if>
<if test="customerId != '' and customerId!=null"> <if test="customerId != '' and customerId != null">
and customerId = #{customerId} and customerId = #{customerId}
</if> </if>
<if test="thirdOrderFk != '' and thirdOrderFk!=null"> <if test="thirdOrderFk != '' and thirdOrderFk != null">
and thirdOrderFk = #{thirdOrderFk} and thirdOrderFk = #{thirdOrderFk}
</if> </if>
<if test="orderIdFk != '' and orderIdFk!=null"> <if test="orderIdFk != '' and orderIdFk != null">
and orderIdFk = #{orderIdFk} and orderIdFk = #{orderIdFk}
</if> </if>
<if test="totalPrice != '' and totalPrice!=null"> <if test="totalPrice != '' and totalPrice != null">
and totalPrice = #{totalPrice} and totalPrice = #{totalPrice}
</if> </if>
<if test="locStorageCode != '' and locStorageCode!=null"> <if test="locStorageCode != '' and locStorageCode != null">
and locStorageCode = #{locStorageCode} and locStorageCode = #{locStorageCode}
</if> </if>
<if test="invWarehouseCode != '' and invWarehouseCode!=null"> <if test="invWarehouseCode != '' and invWarehouseCode != null">
and invWarehouseCode = #{invWarehouseCode} and invWarehouseCode = #{invWarehouseCode}
<if test="userId != '' and userId!=null"> <if test="userId != '' and userId != null">
and and stock_order.billType in
stock_order.billType in (select basic_bussiness_type.localAction
(select basic_bussiness_type.localAction from inv_bustype_user INNER JOIN basic_bussiness_type on from inv_bustype_user
INNER JOIN basic_bussiness_type on
inv_bustype_user.scAction = basic_bussiness_type.action inv_bustype_user.scAction = basic_bussiness_type.action
WHERE userId =#{userId} and invWarehouseCode =#{invWarehouseCode} WHERE userId = #{userId}
and invWarehouseCode = #{invWarehouseCode}
GROUP BY inv_bustype_user.id) GROUP BY inv_bustype_user.id)
</if> </if>
</if> </if>
<if test="createUser!=null"> <if test="createUser != null">
and createUser = #{createUser} and createUser = #{createUser}
</if> </if>
<if test="reviewUser!=null"> <if test="reviewUser != null">
and reviewUser = #{reviewUser} and reviewUser = #{reviewUser}
</if> </if>
<if test="startTime!=null and startTime!=''"> <if test="startTime != null and startTime != ''">
<![CDATA[ and DATE_FORMAT(billdate, '%Y-%m-%d')>= DATE_FORMAT(#{startTime}, '%Y-%m-%d') ]]> <![CDATA[
and DATE_FORMAT(billdate, '%Y-%m-%d') >= DATE_FORMAT(#{startTime}, '%Y-%m-%d')
]]>
</if> </if>
<if test="endTime!=null and endTime!=''"> <if test="endTime != null and endTime != ''">
<![CDATA[ and DATE_FORMAT(billdate, '%Y-%m-%d') <= DATE_FORMAT(#{endTime}, '%Y-%m-%d') ]]> <![CDATA[
and DATE_FORMAT(billdate, '%Y-%m-%d') <= DATE_FORMAT(#{endTime}, '%Y-%m-%d')
]]>
</if> </if>
<if test="startDate!=null and startDate!=''"> <if test="startDate != null and startDate != ''">
<![CDATA[ and DATE_FORMAT(billdate, '%Y-%m-%d')>= DATE_FORMAT(#{startDate}, '%Y-%m-%d') ]]> <![CDATA[
and DATE_FORMAT(billdate, '%Y-%m-%d') >= DATE_FORMAT(#{startDate}, '%Y-%m-%d')
]]>
</if> </if>
<if test="endDate!=null and endDate!=''"> <if test="endDate != null and endDate != ''">
<![CDATA[ and DATE_FORMAT(billdate, '%Y-%m-%d') <= DATE_FORMAT(#{endDate}, '%Y-%m-%d') ]]> <![CDATA[
and DATE_FORMAT(billdate, '%Y-%m-%d') <= DATE_FORMAT(#{endDate}, '%Y-%m-%d')
]]>
</if> </if>
<if test="userId!=null"> <if test="userId != null">
and inv_warehouse_user.userId =#{userId} and inv_warehouse_user.userId = #{userId}
</if> </if>
</where> </where>
group by stock_order.id group by stock_order.id
ORDER BY stock_order.updateTime DESC,id DESC ORDER BY stock_order.updateTime DESC, id DESC
</select> </select>
<select id="filterEntrust" parameterType="com.glxp.sale.admin.req.inout.StockOrderFilterRequest" <select id="filterEntrust" parameterType="com.glxp.sale.admin.req.inout.StockOrderFilterRequest"
resultType="com.glxp.sale.admin.entity.inout.StockOrderEntity"> resultType="com.glxp.sale.admin.entity.inout.StockOrderEntity">
SELECT stock_order.* FROM stock_order SELECT stock_order.*
FROM stock_order
INNER JOIN basic_entrust_accept on locStorageCode = basic_entrust_accept.curInv INNER JOIN basic_entrust_accept on locStorageCode = basic_entrust_accept.curInv
<where> <where>
<if test="status != '' and status!=null"> <if test="status != '' and status != null">
and status = #{status} and status = #{status}
</if> </if>
<if test="locStorageCode != '' and locStorageCode!=null"> <if test="locStorageCode != '' and locStorageCode != null">
and locStorageCode = #{locStorageCode} and locStorageCode = #{locStorageCode}
</if> </if>
<if test="entrustUser != '' and entrustUser!=null"> <if test="entrustUser != '' and entrustUser != null">
and basic_entrust_accept.entrustUser = #{entrustUser} and basic_entrust_accept.entrustUser = #{entrustUser}
</if> </if>
</where> </where>
@ -248,37 +314,38 @@
<select id="findOne" parameterType="com.glxp.sale.admin.req.inout.StockOrderFilterRequest" <select id="findOne" parameterType="com.glxp.sale.admin.req.inout.StockOrderFilterRequest"
resultType="com.glxp.sale.admin.entity.inout.StockOrderEntity"> resultType="com.glxp.sale.admin.entity.inout.StockOrderEntity">
select stock_order.*, auth_dept.name deptName FROM stock_order select stock_order.*, auth_dept.name deptName
FROM stock_order
left join auth_dept on stock_order.dept = auth_dept.code left join auth_dept on stock_order.dept = auth_dept.code
<where> <where>
<if test="id != '' and id!=null"> <if test="id != '' and id != null">
and stock_order.id =#{id} and stock_order.id = #{id}
</if> </if>
<if test="corpId != '' and corpId !=null"> <if test="corpId != '' and corpId != null">
and corpId =#{corpId} and corpId = #{corpId}
</if> </if>
<if test="billNo != '' and billNo !=null"> <if test="billNo != '' and billNo != null">
and billNo =#{billNo} and billNo = #{billNo}
</if> </if>
<if test="billType != '' and billType !=null"> <if test="billType != '' and billType != null">
and billType =#{billType} and billType = #{billType}
</if> </if>
<if test="customerId != '' and customerId !=null"> <if test="customerId != '' and customerId != null">
and customerId =#{customerId} and customerId = #{customerId}
</if> </if>
<if test="thirdOrderFk != '' and thirdOrderFk !=null"> <if test="thirdOrderFk != '' and thirdOrderFk != null">
and thirdOrderFk =#{thirdOrderFk} and thirdOrderFk = #{thirdOrderFk}
</if> </if>
<if test="orderIdFk != '' and orderIdFk !=null"> <if test="orderIdFk != '' and orderIdFk != null">
and orderIdFk =#{orderIdFk} and orderIdFk = #{orderIdFk}
</if> </if>
<if test="createUser!=null"> <if test="createUser != null">
and createUser = #{createUser} and createUser = #{createUser}
</if> </if>
<if test="reviewUser!=null"> <if test="reviewUser != null">
and reviewUser = #{reviewUser} and reviewUser = #{reviewUser}
</if> </if>
<if test="invWarehouseCode != '' and invWarehouseCode!=null"> <if test="invWarehouseCode != '' and invWarehouseCode != null">
and invWarehouseCode = #{invWarehouseCode} and invWarehouseCode = #{invWarehouseCode}
</if> </if>
</where> </where>
@ -287,18 +354,44 @@
<select id="listOrderPrint" parameterType="com.glxp.sale.admin.req.inout.StockOrderFilterRequest" <select id="listOrderPrint" parameterType="com.glxp.sale.admin.req.inout.StockOrderFilterRequest"
resultType="com.glxp.sale.admin.entity.inout.StockOrderPrintEntity"> resultType="com.glxp.sale.admin.entity.inout.StockOrderPrintEntity">
SELECT stock_order.*, stock_order.remark orderRemark,stock_order_detail.productId, SELECT stock_order.*,
stock_order_detail.productName,auth_user.employeeName reviewUserName, stock_order.remark orderRemark,
stock_order_detail.spec, stock_order_detail.batchNo, stock_order_detail.productDate, stock_order_detail.productId,
stock_order_detail.expireDate, stock_order_detail.count, stock_order_detail.sweepCount, stock_order_detail.productName,
stock_order_detail.ylqxzcrbarmc,stock_order_detail.manufactory, stock_order_detail.zczbhhzbapzbh, auth_user.employeeName reviewUserName,
stock_order_detail.price,inv_warehouse.name locInv,inv_warehouse_sub.name subInv,basic_products.spmc, stock_order_detail.spec,
basic_products.cpms,basic_udirel.measname,auth_dept.`name` stock_order_detail.batchNo,
deptName,basic_products.basicPrductRemak1 stock_order_detail.productDate,
,basic_products.basicPrductRemak2,basic_products.basicPrductRemak3,basic_products.basicPrductRemak4,basic_products.basicPrductRemak5,basic_products.basicPrductRemak6 stock_order_detail.expireDate,
,basic_products.basicPrductRemak7,basic_products.basicPrductRemak8, stock_order_detail.count,
thr_products.code thrCode,thr_products.name thrName,thr_products.measname thrMeasname,thr_products.spec thrSpec, stock_order_detail.sweepCount,
thr_products.registerNo thrRegisterNo,thr_products.manufactory thrManufactory stock_order_detail.ylqxzcrbarmc,
stock_order_detail.manufactory,
stock_order_detail.zczbhhzbapzbh,
stock_order_detail.price,
inv_warehouse.name locInv,
inv_warehouse_sub.name subInv,
basic_products.spmc,
basic_products.cpms,
basic_udirel.measname,
auth_dept.`name`
deptName,
basic_products.basicPrductRemak1
,
basic_products.basicPrductRemak2,
basic_products.basicPrductRemak3,
basic_products.basicPrductRemak4,
basic_products.basicPrductRemak5,
basic_products.basicPrductRemak6
,
basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8,
thr_products.code thrCode,
thr_products.name thrName,
thr_products.measname thrMeasname,
thr_products.spec thrSpec,
thr_products.registerNo thrRegisterNo,
thr_products.manufactory thrManufactory
FROM stock_order FROM stock_order
INNER JOIN stock_order_detail on stock_order.id = stock_order_detail.orderIdFk INNER JOIN stock_order_detail on stock_order.id = stock_order_detail.orderIdFk
LEFT JOIN inv_warehouse ON stock_order.locStorageCode = inv_warehouse.`code` LEFT JOIN inv_warehouse ON stock_order.locStorageCode = inv_warehouse.`code`
@ -310,38 +403,64 @@
left join thr_products on basic_udirel.mainId = thr_products.`code` left join thr_products on basic_udirel.mainId = thr_products.`code`
left join auth_user on stock_order.reviewUser = auth_user.id left join auth_user on stock_order.reviewUser = auth_user.id
<where> <where>
<if test="id != '' and id!=null"> <if test="id != '' and id != null">
and stock_order.id =#{id} and stock_order.id = #{id}
</if> </if>
<if test="corpId != '' and corpId !=null"> <if test="corpId != '' and corpId != null">
and stock_order.corpId =#{corpId} and stock_order.corpId = #{corpId}
</if> </if>
<if test="billNo != '' and billNo !=null"> <if test="billNo != '' and billNo != null">
and stock_order.billNo =#{billNo} and stock_order.billNo = #{billNo}
</if> </if>
<if test="customerId != '' and customerId !=null"> <if test="customerId != '' and customerId != null">
and stock_order.customerId =#{customerId} and stock_order.customerId = #{customerId}
</if> </if>
<if test="invWarehouseCode != '' and invWarehouseCode!=null"> <if test="invWarehouseCode != '' and invWarehouseCode != null">
and invWarehouseCode = #{invWarehouseCode} and invWarehouseCode = #{invWarehouseCode}
</if> </if>
</where> </where>
group by stock_order_detail.id group by stock_order_detail.id
ORDER BY id DESC
</select> </select>
<select id="listCodePrint" parameterType="com.glxp.sale.admin.req.inout.StockOrderFilterRequest" <select id="listCodePrint" parameterType="com.glxp.sale.admin.req.inout.StockOrderFilterRequest"
resultType="com.glxp.sale.admin.entity.inout.StockOrderPrintEntity"> resultType="com.glxp.sale.admin.entity.inout.StockOrderPrintEntity">
select io_codes.code udiCode,basic_udirel.id productId,basic_products.cpmctymc productName,basic_products.ggxh select io_codes.code udiCode,
spec,io_codes.batchNo,io_codes.produceDate productDate,io_codes.expireDate ,io_codes.serialNo,io_codes.count, basic_udirel.id productId,
basic_products.ylqxzcrbarmc,basic_udirel.manufactory,basic_udirel.measname, basic_products.cpmctymc productName,
inv_warehouse.name locInv, inv_warehouse_sub.name subInv, basic_products.spmc, basic_products.ggxh
basic_products.cpms,io_codes.nameCode,io_codes.relId,basic_products.basicPrductRemak1 spec,
,basic_products.basicPrductRemak2,basic_products.basicPrductRemak3,basic_products.basicPrductRemak4,basic_products.basicPrductRemak5,basic_products.basicPrductRemak6 io_codes.batchNo,
,basic_products.basicPrductRemak7,basic_products.basicPrductRemak8, io_codes.produceDate productDate,
thr_products.code thrCode,thr_products.name thrName,thr_products.measname thrMeasname,thr_products.spec thrSpec, io_codes.expireDate,
thr_products.registerNo thrRegisterNo,thr_products.manufactory thrManufactory io_codes.serialNo,
io_codes.count,
basic_products.ylqxzcrbarmc,
basic_udirel.manufactory,
basic_udirel.measname,
inv_warehouse.name locInv,
inv_warehouse_sub.name subInv,
basic_products.spmc,
basic_products.cpms,
io_codes.nameCode,
io_codes.relId,
basic_products.basicPrductRemak1
,
basic_products.basicPrductRemak2,
basic_products.basicPrductRemak3,
basic_products.basicPrductRemak4,
basic_products.basicPrductRemak5,
basic_products.basicPrductRemak6
,
basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8,
thr_products.code thrCode,
thr_products.name thrName,
thr_products.measname thrMeasname,
thr_products.spec thrSpec,
thr_products.registerNo thrRegisterNo,
thr_products.manufactory thrManufactory
from io_codes from io_codes
INNER JOIN basic_udirel on io_codes.relId = basic_udirel.id INNER JOIN basic_udirel on io_codes.relId = basic_udirel.id
INNER JOIN basic_products on basic_products.uuid = basic_udirel.uuid INNER JOIN basic_products on basic_products.uuid = basic_udirel.uuid
@ -349,13 +468,11 @@
left join inv_warehouse_sub on io_codes.invWarehouseCode = inv_warehouse_sub.code left join inv_warehouse_sub on io_codes.invWarehouseCode = inv_warehouse_sub.code
left join thr_products on basic_udirel.mainId = thr_products.`code` left join thr_products on basic_udirel.mainId = thr_products.`code`
<where> <where>
<if test="orderId != '' and orderId !=null"> <if test="orderId != '' and orderId != null">
and io_codes.orderId =#{orderId} and io_codes.orderId = #{orderId}
</if> </if>
</where> </where>
group by io_codes.id group by io_codes.id
order by io_codes.id
</select> </select>
<select id="selectSupplementOrderList" resultType="com.glxp.sale.admin.entity.inout.StockOrderEntity"> <select id="selectSupplementOrderList" resultType="com.glxp.sale.admin.entity.inout.StockOrderEntity">
@ -395,5 +512,4 @@
from stock_order from stock_order
where billNo = #{billNo} where billNo = #{billNo}
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save