feat: 下载高级搜索 收货发货

scpwxyy
chenhc 10 months ago
parent 314f059fe9
commit 0b380675c8

@ -1381,6 +1381,7 @@ public class CtqyyClient extends CommonHttpClient {
wrapper.le(StrUtil.isNotEmpty(endTime), VInsurNationGoodsPhysic::getSEL_RETN_TIME, endTime); wrapper.le(StrUtil.isNotEmpty(endTime), VInsurNationGoodsPhysic::getSEL_RETN_TIME, endTime);
String code = udiwmsBasicSkPrescribeRequest.getCode(); String code = udiwmsBasicSkPrescribeRequest.getCode();
String fromCorpName = udiwmsBasicSkPrescribeRequest.getFromCorpName();
String key = udiwmsBasicSkPrescribeRequest.getKey(); String key = udiwmsBasicSkPrescribeRequest.getKey();
wrapper.and(StrUtil.isNotEmpty(code), t -> t.eq(VInsurNationGoodsPhysic::getSTOOUT_NO, code).or().eq(VInsurNationGoodsPhysic::getRXNO, code)); wrapper.and(StrUtil.isNotEmpty(code), t -> t.eq(VInsurNationGoodsPhysic::getSTOOUT_NO, code).or().eq(VInsurNationGoodsPhysic::getRXNO, code));
wrapper.and(StrUtil.isNotEmpty(key), t -> t.like(VInsurNationGoodsPhysic::getSTOOUT_NO, key) wrapper.and(StrUtil.isNotEmpty(key), t -> t.like(VInsurNationGoodsPhysic::getSTOOUT_NO, key)
@ -1388,7 +1389,7 @@ public class CtqyyClient extends CommonHttpClient {
.or().like(VInsurNationGoodsPhysic::getPSN_NAME, key) .or().like(VInsurNationGoodsPhysic::getPSN_NAME, key)
.or().like(VInsurNationGoodsPhysic::getPSN_NO, key) .or().like(VInsurNationGoodsPhysic::getPSN_NO, key)
); );
wrapper.and(StrUtil.isNotEmpty(fromCorpName), t -> t.eq(VInsurNationGoodsPhysic::getPSN_NAME, fromCorpName));
IPage<VInsurNationGoodsPhysic> page =goodsPhysicMapper.selectGroupedWithPagination(new Page<VInsurNationGoodsPhysic>(udiwmsBasicSkPrescribeRequest.getPage(), udiwmsBasicSkPrescribeRequest.getLimit()), IPage<VInsurNationGoodsPhysic> page =goodsPhysicMapper.selectGroupedWithPagination(new Page<VInsurNationGoodsPhysic>(udiwmsBasicSkPrescribeRequest.getPage(), udiwmsBasicSkPrescribeRequest.getLimit()),
udiwmsBasicSkPrescribeRequest); udiwmsBasicSkPrescribeRequest);
@ -1403,12 +1404,14 @@ public class CtqyyClient extends CommonHttpClient {
String code = udiwmsBasicSkPrescribeRequest.getCode(); String code = udiwmsBasicSkPrescribeRequest.getCode();
String fromCorpName = udiwmsBasicSkPrescribeRequest.getFromCorpName();
String key = udiwmsBasicSkPrescribeRequest.getKey(); String key = udiwmsBasicSkPrescribeRequest.getKey();
wrapper.and(StrUtil.isNotEmpty(key), t -> t.like(VInsurNationGoodsReturn::getAPPLY_NO, key) wrapper.and(StrUtil.isNotEmpty(key), t -> t.like(VInsurNationGoodsReturn::getAPPLY_NO, key)
.or().like(VInsurNationGoodsReturn::getPSN_NAME, key) .or().like(VInsurNationGoodsReturn::getPSN_NAME, key)
.or().like(VInsurNationGoodsReturn::getPSN_NO, key) .or().like(VInsurNationGoodsReturn::getPSN_NO, key)
); );
wrapper.and(StrUtil.isNotEmpty(code), t -> t.eq(VInsurNationGoodsReturn::getAPPLY_NO, code)); wrapper.and(StrUtil.isNotEmpty(code), t -> t.eq(VInsurNationGoodsReturn::getAPPLY_NO, code));
wrapper.and(StrUtil.isNotEmpty(fromCorpName), t -> t.eq(VInsurNationGoodsReturn::getPSN_NAME, fromCorpName));
IPage<VInsurNationGoodsReturn> page =vInsurNationGoodsReturnMapper.selectGroupedWithPagination(new Page<VInsurNationGoodsReturn>(udiwmsBasicSkPrescribeRequest.getPage(), udiwmsBasicSkPrescribeRequest.getLimit()), IPage<VInsurNationGoodsReturn> page =vInsurNationGoodsReturnMapper.selectGroupedWithPagination(new Page<VInsurNationGoodsReturn>(udiwmsBasicSkPrescribeRequest.getPage(), udiwmsBasicSkPrescribeRequest.getLimit()),
udiwmsBasicSkPrescribeRequest); udiwmsBasicSkPrescribeRequest);
@ -1440,6 +1443,8 @@ public class CtqyyClient extends CommonHttpClient {
String keywords = udiwmsThrOrderRequest.getKeyWords(); String keywords = udiwmsThrOrderRequest.getKeyWords();
wrapper.and(StrUtil.isNotEmpty(keywords), t -> t.like(VYpzsPlanInfo::getCGDBH, keywords)//单据号 wrapper.and(StrUtil.isNotEmpty(keywords), t -> t.like(VYpzsPlanInfo::getCGDBH, keywords)//单据号
); );
wrapper.like(StrUtil.isNotEmpty(udiwmsThrOrderRequest.getFromCorpName()), VYpzsPlanInfo::getSCQYMC, udiwmsThrOrderRequest.getFromCorpName());
Page<VYpzsPlanInfo> page = vYpzsPlanInfoMapper.selectGroupedWithPagination(new Page<VYpzsPlanInfo>(udiwmsThrOrderRequest.getPage(), udiwmsThrOrderRequest.getLimit()), udiwmsThrOrderRequest); Page<VYpzsPlanInfo> page = vYpzsPlanInfoMapper.selectGroupedWithPagination(new Page<VYpzsPlanInfo>(udiwmsThrOrderRequest.getPage(), udiwmsThrOrderRequest.getLimit()), udiwmsThrOrderRequest);
List<VYpzsPlanInfo> planInfos = page.getRecords(); List<VYpzsPlanInfo> planInfos = page.getRecords();
@ -1507,6 +1512,8 @@ public class CtqyyClient extends CommonHttpClient {
wrapper.eq(StrUtil.isNotBlank(udiwmsThrOrderRequest.getBillNo()), VYpzsIoInfo::getPHYSIC_CODE, udiwmsThrOrderRequest.getBillNo()); wrapper.eq(StrUtil.isNotBlank(udiwmsThrOrderRequest.getBillNo()), VYpzsIoInfo::getPHYSIC_CODE, udiwmsThrOrderRequest.getBillNo());
wrapper.eq(StrUtil.isNotBlank(udiwmsThrOrderRequest.getBusType()), VYpzsIoInfo::getIO_SORT, udiwmsThrOrderRequest.getBusType()); wrapper.eq(StrUtil.isNotBlank(udiwmsThrOrderRequest.getBusType()), VYpzsIoInfo::getIO_SORT, udiwmsThrOrderRequest.getBusType());
wrapper.like(StrUtil.isNotEmpty(udiwmsThrOrderRequest.getFromCorpName()), VYpzsIoInfo::getCONSIGNEE_NAME, udiwmsThrOrderRequest.getFromCorpName());
wrapper.like(StrUtil.isNotEmpty(udiwmsThrOrderRequest.getShipperName()), VYpzsIoInfo::getCONSIGNOR_NAME, udiwmsThrOrderRequest.getShipperName());
//关键字模糊处理 //关键字模糊处理
String keywords = udiwmsThrOrderRequest.getKeyWords(); String keywords = udiwmsThrOrderRequest.getKeyWords();
wrapper.and(StrUtil.isNotEmpty(keywords), t -> t.like(VYpzsIoInfo::getPHYSIC_CODE, keywords)//单据号 wrapper.and(StrUtil.isNotEmpty(keywords), t -> t.like(VYpzsIoInfo::getPHYSIC_CODE, keywords)//单据号

@ -57,19 +57,19 @@
<select id="selectGroupedWithPagination" resultType="com.glxp.mipsdl.entity.ctqyy.VInsurNationGoodsPhysic"> <select id="selectGroupedWithPagination" resultType="com.glxp.mipsdl.entity.ctqyy.VInsurNationGoodsPhysic">
SELECT SELECT RXNO
RXNO FROM v_insur_nation_goods_physic
FROM
v_insur_nation_goods_physic
<where> <where>
<if test="udiwmsBasicSkPrescribeRequest.startTime != null"> <if test="udiwmsBasicSkPrescribeRequest.startTime != null">
<![CDATA[ <![CDATA[
and SEL_RETN_TIME >= DATE_FORMAT(#{udiwmsBasicSkPrescribeRequest.startTime}, '%Y-%m-%d %H:%i:%S') and SEL_RETN_TIME >= DATE_FORMAT(#{udiwmsBasicSkPrescribeRequest.startTime}
, 'YYYY-MM-DD HH24:MI:SS')
]]> ]]>
</if> </if>
<if test="udiwmsBasicSkPrescribeRequest.endTime != null"> <if test="udiwmsBasicSkPrescribeRequest.endTime != null">
<![CDATA[ <![CDATA[
and SEL_RETN_TIME <= DATE_FORMAT(#{udiwmsBasicSkPrescribeRequest.endTime}, '%Y-%m-%d %H:%i:%S') and SEL_RETN_TIME <= DATE_FORMAT(#{udiwmsBasicSkPrescribeRequest.endTime}
, 'YYYY-MM-DD HH24:MI:SS')
]]> ]]>
</if> </if>
<if test="udiwmsBasicSkPrescribeRequest.code != null and udiwmsBasicSkPrescribeRequest.code != ''"> <if test="udiwmsBasicSkPrescribeRequest.code != null and udiwmsBasicSkPrescribeRequest.code != ''">
@ -77,12 +77,14 @@
or STOOUT_NO = #{udiwmsBasicSkPrescribeRequest.code} or STOOUT_NO = #{udiwmsBasicSkPrescribeRequest.code}
) )
</if> </if>
<if test="udiwmsBasicSkPrescribeRequest.fromCorpName != null and udiwmsBasicSkPrescribeRequest.fromCorpName != ''">
and (PSN_NAME like '%' || #{udiwmsBasicSkPrescribeRequest.fromCorpName} || '%' )
</if>
<if test="udiwmsBasicSkPrescribeRequest.key != null and udiwmsBasicSkPrescribeRequest.key != ''"> <if test="udiwmsBasicSkPrescribeRequest.key != null and udiwmsBasicSkPrescribeRequest.key != ''">
and (STOOUT_NO like concat('%', #{udiwmsBasicSkPrescribeRequest.key}, '%') and (STOOUT_NO like '%' || #{udiwmsBasicSkPrescribeRequest.key} || '%'
or RXNO like concat('%', #{udiwmsBasicSkPrescribeRequest.key}, '%') or RXNO like '%' || #{udiwmsBasicSkPrescribeRequest.key} || '%'
or PSN_NAME like concat('%', #{udiwmsBasicSkPrescribeRequest.key}, '%') or PSN_NAME like '%' || #{udiwmsBasicSkPrescribeRequest.key} || '%'
or PSN_NO like concat('%', #{udiwmsBasicSkPrescribeRequest.key}, '%') or PSN_NO like '%' || #{udiwmsBasicSkPrescribeRequest.key} || '%'
) )
</if> </if>
</where> </where>
@ -91,6 +93,4 @@
ORDER BY ORDER BY
RXNO RXNO
</select> </select>
</mapper> </mapper>

@ -38,29 +38,32 @@
<select id="selectGroupedWithPagination" resultType="com.glxp.mipsdl.entity.ctqyy.VInsurNationGoodsReturn"> <select id="selectGroupedWithPagination" resultType="com.glxp.mipsdl.entity.ctqyy.VInsurNationGoodsReturn">
SELECT SELECT APPLY_NO
APPLY_NO FROM V_INSUR_NATION_GOODS_RETURN
FROM
V_INSUR_NATION_GOODS_RETURN
<where> <where>
<if test="udiwmsBasicSkPrescribeRequest.startTime != null"> <if test="udiwmsBasicSkPrescribeRequest.startTime != null">
<![CDATA[ <![CDATA[
and SEL_RETN_TIME >= DATE_FORMAT(#{udiwmsBasicSkPrescribeRequest.startTime}, '%Y-%m-%d %H:%i:%S') and SEL_RETN_TIME >= DATE_FORMAT(#{udiwmsBasicSkPrescribeRequest.startTime}
, 'YYYY-MM-DD HH24:MI:SS')
]]> ]]>
</if> </if>
<if test="udiwmsBasicSkPrescribeRequest.endTime != null"> <if test="udiwmsBasicSkPrescribeRequest.endTime != null">
<![CDATA[ <![CDATA[
and SEL_RETN_TIME <= DATE_FORMAT(#{udiwmsBasicSkPrescribeRequest.endTime}, '%Y-%m-%d %H:%i:%S') and SEL_RETN_TIME <= DATE_FORMAT(#{udiwmsBasicSkPrescribeRequest.endTime}
, 'YYYY-MM-DD HH24:MI:SS')
]]> ]]>
</if> </if>
<if test="udiwmsBasicSkPrescribeRequest.code != null and udiwmsBasicSkPrescribeRequest.code != ''"> <if test="udiwmsBasicSkPrescribeRequest.code != null and udiwmsBasicSkPrescribeRequest.code != ''">
and (APPLY_NO = #{udiwmsBasicSkPrescribeRequest.code}) and (APPLY_NO = #{udiwmsBasicSkPrescribeRequest.code})
</if> </if>
<if test="udiwmsBasicSkPrescribeRequest.fromCorpName != null and udiwmsBasicSkPrescribeRequest.fromCorpName != ''">
and (PSN_NAME like '%' || #{udiwmsBasicSkPrescribeRequest.fromCorpName} || '%' )
</if>
<if test="udiwmsBasicSkPrescribeRequest.key != null and udiwmsBasicSkPrescribeRequest.key != ''"> <if test="udiwmsBasicSkPrescribeRequest.key != null and udiwmsBasicSkPrescribeRequest.key != ''">
and (APPLY_NO like concat('%', #{udiwmsBasicSkPrescribeRequest.key}, '%') and (APPLY_NO like '%' || #{udiwmsBasicSkPrescribeRequest.key} || '%'
or PSN_NAME like concat('%', #{udiwmsBasicSkPrescribeRequest.key}, '%') or PSN_NAME like '%' ||#{udiwmsBasicSkPrescribeRequest.key} || '%'
or PSN_NO like concat('%', #{udiwmsBasicSkPrescribeRequest.key}, '%') or PSN_NO like '%' || #{udiwmsBasicSkPrescribeRequest.key} ||'%'
) )
</if> </if>
</where> </where>
@ -69,5 +72,4 @@
ORDER BY ORDER BY
APPLY_NO APPLY_NO
</select> </select>
</mapper> </mapper>

@ -55,6 +55,12 @@
<if test="udiwmsThrOrderRequest.billNo != null and udiwmsThrOrderRequest.billNo != ''"> <if test="udiwmsThrOrderRequest.billNo != null and udiwmsThrOrderRequest.billNo != ''">
and PHYSIC_CODE LIKE '%' || #{udiwmsThrOrderRequest.billNo} || '%' and PHYSIC_CODE LIKE '%' || #{udiwmsThrOrderRequest.billNo} || '%'
</if> </if>
<if test="udiwmsThrOrderRequest.fromCorpName != null and udiwmsThrOrderRequest.fromCorpName != ''">
and CONSIGNEE_NAME LIKE '%' || #{udiwmsThrOrderRequest.fromCorpName} || '%'
</if>
<if test="udiwmsThrOrderRequest.shipperName != null and udiwmsThrOrderRequest.shipperName != ''">
and CONSIGNOR_NAME LIKE '%' || #{udiwmsThrOrderRequest.shipperName} || '%'
</if>
<if test="udiwmsThrOrderRequest.busType != null and udiwmsThrOrderRequest.busType != ''"> <if test="udiwmsThrOrderRequest.busType != null and udiwmsThrOrderRequest.busType != ''">
and IO_SORT LIKE '%' || #{udiwmsThrOrderRequest.busType} || '%' and IO_SORT LIKE '%' || #{udiwmsThrOrderRequest.busType} || '%'
</if> </if>

@ -1,28 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!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.mipsdl.thirddao.ctqyy.VYpzsPlanInfoMapper"> <mapper namespace="com.glxp.mipsdl.thirddao.ctqyy.VYpzsPlanInfoMapper">
<select id="selectGroupedWithPagination" resultType="com.glxp.mipsdl.entity.ctqyy.VYpzsPlanInfo"> <select id="selectGroupedWithPagination" resultType="com.glxp.mipsdl.entity.ctqyy.VYpzsPlanInfo">
SELECT SELECT CGDBH
CGDBH FROM V_YPZS_PLAN_INFO
FROM
V_YPZS_PLAN_INFO
<where> <where>
<if test="udiwmsThrOrderRequest.billNo != null and udiwmsThrOrderRequest.billNo != ''"> <if test="udiwmsThrOrderRequest.billNo != null and udiwmsThrOrderRequest.billNo != ''">
and CGDBH like concat('%', #{udiwmsThrOrderRequest.billNo}, '%') and CGDBH like '%' || #{udiwmsThrOrderRequest.billNo} || '%'
</if> </if>
<if test="udiwmsThrOrderRequest.keyWords != null and udiwmsThrOrderRequest.keyWords != ''"> <if test="udiwmsThrOrderRequest.keyWords != null and udiwmsThrOrderRequest.keyWords != ''">
and (CGDBH like concat('%', #{udiwmsThrOrderRequest.keyWords}, '%') and (CGDBH like '%' || #{udiwmsThrOrderRequest.keyWords} || '%'
)
</if>
<if test="udiwmsThrOrderRequest.fromCorpName != null and udiwmsThrOrderRequest.fromCorpName != ''">
and (SCQYMC like '%' || #{udiwmsThrOrderRequest.fromCorpName} || '%'
) )
</if> </if>
</where> </where>
GROUP BY GROUP BY CGDBH
CGDBH ORDER BY CGDBH
ORDER BY
CGDBH
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save