Merge branch 'release' of http://192.168.12.182/invoice/sims-order into release

release
zhenghaiyang@ele-cloud.com 2 years ago
commit 7bccc97b7f
  1. 8
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/buyer/dao/BuyerMapper.java
  2. 3
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/buyer/service/impl/BuyerServiceImpl.java
  3. 135
      order-management-base-service/src/main/resources/mybatis/mapper/BuyerMapper.xml

@ -23,6 +23,14 @@ public interface BuyerMapper {
*/
List<BuyerEntity> selectBuyerList(@Param("map") Map<String, Object> map, @Param("shList") List<String> shList);
/**
* 客户信息统计数
* @param map
* @param shList
* @return
*/
Integer selectBuyerCount(@Param("map") Map<String, Object> map, @Param("shList") List<String> shList);
/**
* 修改
*

@ -70,6 +70,7 @@ public class BuyerServiceImpl implements BuyerService {
int pageSize = Integer.parseInt(String.valueOf(paramMap.get(ConfigureConstant.STRING_PAGE_SIZE)));
int currPage = Integer.parseInt(String.valueOf(paramMap.get(ConfigureConstant.STRING_CURR_PAGE)));
log.debug("{}订单查询,当前页:{},页面条数:{}", LOGGER_MSG, currPage, pageSize);
Integer integer = buyerMapper.selectBuyerCount(paramMap, shList);
PageHelper.startPage(currPage, pageSize);
List<BuyerEntity> list = buyerMapper.selectBuyerList(paramMap, shList);
list.forEach(t->{
@ -80,7 +81,7 @@ public class BuyerServiceImpl implements BuyerService {
}
});
PageInfo<BuyerEntity> pageInfo = new PageInfo<>(list);
PageUtils page = new PageUtils(pageInfo.getList(), list.size(), pageInfo.getPageSize(),
PageUtils page = new PageUtils(pageInfo.getList(), integer, pageInfo.getPageSize(),
pageInfo.getPageNum());
log.info("{}返回值{} ", LOGGER_MSG, page);

@ -43,6 +43,77 @@
<sql id="Buyer_Base_Column_List">
id,taxpayer_code,purchase_name,address,phone,bank_of_deposit,bank_number,email,sjh,remarks,create_time,create_user_id,modify_time,modify_user_id,ghf_qylx,xhf_nsrsbh,xhf_mc,buyer_code,invoice_name,invoice_taxno,mdm_multicode_json,status
</sql>
<sql id="Buyer_Where">
<where>
<if test="shList != null and shList.size() == 0">
and xhf_nsrsbh = ''
</if>
<if test="shList != null and shList.size() == 1">
and xhf_nsrsbh =
<foreach collection="shList" index="index" item="item">
#{item}
</foreach>
</if>
<if test="shList != null and shList.size() > 1">
and xhf_nsrsbh in
<foreach collection="shList" index="index" item="item"
open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="map.entList != null and map.entList.size() == 0">
and ent_id = ''
</if>
<if test="map.entList != null and map.entList.size() == 1">
and ent_id =
<foreach collection="map.entList" index="index" item="item">
#{item}
</foreach>
</if>
<if test="map.entList != null and map.entList.size() > 1">
and ent_id in
<foreach collection="map.entList" index="index" item="item"
open="(" separator="," close=")">
#{item}
</foreach>
</if>
<!--购买方编码-->
<if test="map.buyerCode != null and map.buyerCode !='' ">
and buyer_code LIKE CONCAT(CONCAT('%',#{map.buyerCode,jdbcType=VARCHAR},'%'))
</if>
<!-- 销货方纳税人名称-->
<if test="map.xhfMc != null and map.xhfMc !='' ">
and xhf_mc = #{map.xhfMc,jdbcType=VARCHAR}
</if>
<!-- 客户状态-->
<if test="map.status != null and map.status !='' ">
and status = #{map.status,jdbcType=VARCHAR}
</if>
<!--购买方纳税人识别号-->
<if test="map.taxpayerCode !=null and map.taxpayerCode !=''">
and taxpayer_code = #{map.taxpayerCode,jdbcType=VARCHAR}
</if>
<if test="map.purchaseName != null and map.purchaseName !='' ">
<choose>
<!--模糊查询的标识(0表示不进行模糊查询,1表示模糊查询)-->
<when test="map.fuzzyQuery != null and map.fuzzyQuery !='' and map.fuzzyQuery =='0'.toString() ">
AND purchase_name = #{map.purchaseName,jdbcType=VARCHAR}
</when>
<otherwise>
AND purchase_name LIKE CONCAT(CONCAT('%',#{map.purchaseName}),'%')
</otherwise>
</choose>
</if>
</where>
</sql>
<select id="selectBuyerCount" resultType="java.lang.Integer">
SELECT
count(1)
FROM
buyer_manage_info
<include refid="Buyer_Where"/>
</select>
<!-- 查询 -->
<select parameterType="map" id="selectBuyerList" resultMap="BaseResultMap">
<bind name="dataType" value="${dataType}"/>
@ -82,69 +153,7 @@
FROM
buyer_manage_info bmi left join buyer_manage_info_detail bmid on bmi.id = bmid.buyer_manage_id
<where>
<if test="shList != null and shList.size() == 0">
and xhf_nsrsbh = ''
</if>
<if test="shList != null and shList.size() == 1">
and xhf_nsrsbh =
<foreach collection="shList" index="index" item="item">
#{item}
</foreach>
</if>
<if test="shList != null and shList.size() > 1">
and xhf_nsrsbh in
<foreach collection="shList" index="index" item="item"
open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="map.entList != null and map.entList.size() == 0">
and ent_id = ''
</if>
<if test="map.entList != null and map.entList.size() == 1">
and ent_id =
<foreach collection="map.entList" index="index" item="item">
#{item}
</foreach>
</if>
<if test="map.entList != null and map.entList.size() > 1">
and ent_id in
<foreach collection="map.entList" index="index" item="item"
open="(" separator="," close=")">
#{item}
</foreach>
</if>
<!--购买方编码-->
<if test="map.buyerCode != null and map.buyerCode !='' ">
and buyer_code LIKE CONCAT(CONCAT('%',#{map.buyerCode,jdbcType=VARCHAR},'%'))
</if>
<!-- 销货方纳税人名称-->
<if test="map.xhfMc != null and map.xhfMc !='' ">
and xhf_mc = #{map.xhfMc,jdbcType=VARCHAR}
</if>
<!-- 客户状态-->
<if test="map.status != null and map.status !='' ">
and status = #{map.status,jdbcType=VARCHAR}
</if>
<!--购买方纳税人识别号-->
<if test="map.taxpayerCode !=null and map.taxpayerCode !=''">
and taxpayer_code = #{map.taxpayerCode,jdbcType=VARCHAR}
</if>
<if test="map.purchaseName != null and map.purchaseName !='' ">
<choose>
<!--模糊查询的标识(0表示不进行模糊查询,1表示模糊查询)-->
<when test="map.fuzzyQuery != null and map.fuzzyQuery !='' and map.fuzzyQuery =='0'.toString() ">
AND purchase_name = #{map.purchaseName,jdbcType=VARCHAR}
</when>
<otherwise>
AND purchase_name LIKE CONCAT(CONCAT('%',#{map.purchaseName}),'%')
</otherwise>
</choose>
</if>
</where>
<include refid="Buyer_Where"/>
order by create_time desc
</if>
<if test="dataType ==1 ">

Loading…
Cancel
Save