This commit is contained in:
linfso 2024-04-23 18:09:19 +08:00
parent 89b41bcf5b
commit 8103e00ba3
3 changed files with 68 additions and 36 deletions

View File

@ -13,6 +13,9 @@ package com.xdadan.erp.web.emis;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.xdadan.erp.common.core.domain.entity.SysUser;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
@ -29,7 +32,6 @@ import com.xdadan.erp.common.core.controller.BaseController;
import com.xdadan.erp.common.core.domain.AjaxResult;
import com.xdadan.erp.common.core.page.TableDataInfo;
import com.xdadan.erp.common.enums.BusinessType;
import com.xdadan.erp.common.utils.StringUtils;
import com.xdadan.erp.common.utils.poi.ExcelUtil;
import com.xdadan.erp.emis.domain.EmisCustomerAddress;
@ -55,6 +57,8 @@ public class EmisCustomerAddressController extends BaseController
@GetMapping("/list")
public TableDataInfo list(EmisCustomerAddress emisCustomerAddress)
{
startPage();
List<EmisCustomerAddress> list = emisCustomerAddressService.selectEmisCustomerAddressList(emisCustomerAddress);
return getDataTable(list);
@ -64,6 +68,13 @@ public class EmisCustomerAddressController extends BaseController
@RequestMapping("/listSimple")
public TableDataInfo listSimple(EmisCustomerAddress emisCustomerAddress)
{
// SysUser qParamUser = new SysUser();
// String ownerSiteCode = getLoginUser().getUser().getOwnerSiteCode();
// if(!StringUtils.isEmpty(siteCode) && !"88888".equals(ownerSiteCode)) {
// qParamUser.setOwnerSiteCode(siteCode);
// emisCustomerAddress.set
// }
startPage();
List<EmisCustomerAddress> list = emisCustomerAddressService.selectEmisCustomerAddressList(emisCustomerAddress);
return getDataTable(list);

View File

@ -2,7 +2,7 @@
* @Project: emis
* @Title: EmisCustomerAddress.java
* @author linfso
* @date 2024-03-07 11:24:07
* @date 2024-04-23 10:06:55
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @Description: <p> 客户收寄件地址 实体类 </p>
@ -10,15 +10,8 @@
package com.xdadan.erp.emis.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xdadan.erp.common.annotation.Excel;
import com.xdadan.erp.common.core.domain.BaseEntity;
import com.xdadan.erp.common.core.domain.TreeEntity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
@ -26,7 +19,7 @@ import lombok.Data;
* @ClassName EmisCustomerAddress
* @Description 客户收寄件地址
* @author linfso
* @date 2024-03-07 11:24:07
* @date 2024-04-23 10:06:55
*/
@Data
public class EmisCustomerAddress extends BaseEntity
@ -41,10 +34,16 @@ public class EmisCustomerAddress extends BaseEntity
private String customerCode;
/* 客户名称 */
private String shortName;
/* 别名 */
/* 地址别名 */
private String alias;
/* 地址类型 1-收 2-寄 */
private String addressType;
/* 国家 */
private String country;
/* 姓名 */
private String name;
/* 电话 */
private String phone;
/* 省 */
private String province;
/* 市 */
@ -57,12 +56,6 @@ public class EmisCustomerAddress extends BaseEntity
private String address;
/* 邮编 */
private String postCode;
/* 姓名 */
private String name;
/* 电话 */
private String phone;
/* 国家 */
private String country;
/* email */
private String email;
/* 公司 */
@ -71,5 +64,13 @@ public class EmisCustomerAddress extends BaseEntity
private String blDefaultFlag;
/* 排序 */
private String orderNum;
/* 使用站点名称 */
private String useSite;
/* 使用站点代码 */
private String useSiteCode;
/* 创建网点 */
private String createSite;
/* 更新网点 */
private String updateSite;
}

View File

@ -11,29 +11,33 @@
<result property="shortName" column="short_name" />
<result property="alias" column="alias" />
<result property="addressType" column="address_type" />
<result property="country" column="country" />
<result property="name" column="name" />
<result property="phone" column="phone" />
<result property="province" column="province" />
<result property="city" column="city" />
<result property="district" column="district" />
<result property="town" column="town" />
<result property="address" column="address" />
<result property="postCode" column="post_code" />
<result property="name" column="name" />
<result property="phone" column="phone" />
<result property="country" column="country" />
<result property="email" column="email" />
<result property="company" column="company" />
<result property="blDefaultFlag" column="bl_default_flag" />
<result property="orderNum" column="order_num" />
<result property="useSite" column="use_site" />
<result property="useSiteCode" column="use_site_code" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="createSite" column="create_site" />
<result property="updateSite" column="update_site" />
</resultMap>
<sql id="selectEmisCustomerAddressVo">
select id, user_id, customer_code, short_name, alias, address_type, province, city, district, town, address, post_code, name, phone, country, email, company, bl_default_flag, order_num, del_flag, create_by, create_time, update_by, update_time, remark from emis_customer_address
select id, user_id, customer_code, short_name, alias, address_type, country, name, phone, province, city, district, town, address, post_code, email, company, bl_default_flag, order_num, use_site, use_site_code, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_customer_address
</sql>
<select id="selectEmisCustomerAddressList" parameterType="EmisCustomerAddress" resultMap="EmisCustomerAddressResult">
@ -41,35 +45,39 @@
<where>
<if test="id != null "> and id = #{id}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="customerCode != null and customerCode != ''"> and customer_code like concat('%', #{customerCode}, '%')</if>
<if test="customerCode != null and customerCode != ''"> and customer_code =#{customerCode}</if>
<if test="shortName != null and shortName != ''"> and short_name like concat('%', #{shortName}, '%')</if>
<if test="alias != null and alias != ''"> and alias like concat('%', #{alias}, '%')</if>
<if test="addressType != null and addressType != ''"> and address_type like concat('%', #{addressType}, '%')</if>
<if test="country != null and country != ''"> and country like concat('%', #{country}, '%')</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="phone != null and phone != ''"> and phone like concat('%', #{phone}, '%')</if>
<if test="province != null and province != ''"> and province like concat('%', #{province}, '%')</if>
<if test="city != null and city != ''"> and city like concat('%', #{city}, '%')</if>
<if test="district != null and district != ''"> and district like concat('%', #{district}, '%')</if>
<if test="town != null and town != ''"> and town like concat('%', #{town}, '%')</if>
<if test="address != null and address != ''"> and address like concat('%', #{address}, '%')</if>
<if test="postCode != null and postCode != ''"> and post_code like concat('%', #{postCode}, '%')</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="phone != null and phone != ''"> and phone like concat('%', #{phone}, '%')</if>
<if test="country != null and country != ''"> and country like concat('%', #{country}, '%')</if>
<if test="email != null and email != ''"> and email like concat('%', #{email}, '%')</if>
<if test="company != null and company != ''"> and company like concat('%', #{company}, '%')</if>
<if test="blDefaultFlag != null and blDefaultFlag != ''"> and bl_default_flag like concat('%', #{blDefaultFlag}, '%')</if>
<if test="orderNum != null and orderNum != ''"> and order_num like concat('%', #{orderNum}, '%')</if>
<if test="useSite != null and useSite != ''"> and use_site like concat('%', #{useSite}, '%')</if>
<if test="useSiteCode != null and useSiteCode != ''"> and use_site_code=#{useSiteCode}</if>
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
</where>
order by create_time desc
</select>
<select id="selectEmisCustomerAddressById" parameterType="Long" resultMap="EmisCustomerAddressResult">
select id, user_id, customer_code, short_name, alias, address_type, province, city, district, town, address, post_code, name, phone, country, email, company, bl_default_flag, order_num, del_flag, create_by, create_time, update_by, update_time, remark
select id, user_id, customer_code, short_name, alias, address_type, country, name, phone, province, city, district, town, address, post_code, email, company, bl_default_flag, order_num, use_site, use_site_code, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
from emis_customer_address a
where a.id = #{id}
</select>
@ -83,25 +91,29 @@
<if test="shortName != null and shortName != ''">short_name,</if>
<if test="alias != null and alias != ''">alias,</if>
<if test="addressType != null and addressType != ''">address_type,</if>
<if test="country != null and country != ''">country,</if>
<if test="name != null and name != ''">name,</if>
<if test="phone != null and phone != ''">phone,</if>
<if test="province != null and province != ''">province,</if>
<if test="city != null and city != ''">city,</if>
<if test="district != null and district != ''">district,</if>
<if test="town != null and town != ''">town,</if>
<if test="address != null and address != ''">address,</if>
<if test="postCode != null and postCode != ''">post_code,</if>
<if test="name != null and name != ''">name,</if>
<if test="phone != null and phone != ''">phone,</if>
<if test="country != null and country != ''">country,</if>
<if test="email != null and email != ''">email,</if>
<if test="company != null and company != ''">company,</if>
<if test="blDefaultFlag != null and blDefaultFlag != ''">bl_default_flag,</if>
<if test="orderNum != null and orderNum != ''">order_num,</if>
<if test="useSite != null and useSite != ''">use_site,</if>
<if test="useSiteCode != null and useSiteCode != ''">use_site_code,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createSite != null and createSite != ''">create_site,</if>
<if test="updateSite != null and updateSite != ''">update_site,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -110,25 +122,29 @@
<if test="shortName != null and shortName != ''">#{shortName},</if>
<if test="alias != null and alias != ''">#{alias},</if>
<if test="addressType != null and addressType != ''">#{addressType},</if>
<if test="country != null and country != ''">#{country},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="phone != null and phone != ''">#{phone},</if>
<if test="province != null and province != ''">#{province},</if>
<if test="city != null and city != ''">#{city},</if>
<if test="district != null and district != ''">#{district},</if>
<if test="town != null and town != ''">#{town},</if>
<if test="address != null and address != ''">#{address},</if>
<if test="postCode != null and postCode != ''">#{postCode},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="phone != null and phone != ''">#{phone},</if>
<if test="country != null and country != ''">#{country},</if>
<if test="email != null and email != ''">#{email},</if>
<if test="company != null and company != ''">#{company},</if>
<if test="blDefaultFlag != null and blDefaultFlag != ''">#{blDefaultFlag},</if>
<if test="orderNum != null and orderNum != ''">#{orderNum},</if>
<if test="useSite != null and useSite != ''">#{useSite},</if>
<if test="useSiteCode != null and useSiteCode != ''">#{useSiteCode},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createSite != null and createSite != ''">#{createSite},</if>
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
</trim>
</insert>
@ -140,25 +156,29 @@
<if test="shortName != null and shortName != ''">short_name = #{shortName},</if>
<if test="alias != null and alias != ''">alias = #{alias},</if>
<if test="addressType != null and addressType != ''">address_type = #{addressType},</if>
<if test="country != null and country != ''">country = #{country},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="phone != null and phone != ''">phone = #{phone},</if>
<if test="province != null and province != ''">province = #{province},</if>
<if test="city != null and city != ''">city = #{city},</if>
<if test="district != null and district != ''">district = #{district},</if>
<if test="town != null and town != ''">town = #{town},</if>
<if test="address != null and address != ''">address = #{address},</if>
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="phone != null and phone != ''">phone = #{phone},</if>
<if test="country != null and country != ''">country = #{country},</if>
<if test="email != null and email != ''">email = #{email},</if>
<if test="company != null and company != ''">company = #{company},</if>
<if test="blDefaultFlag != null and blDefaultFlag != ''">bl_default_flag = #{blDefaultFlag},</if>
<if test="orderNum != null and orderNum != ''">order_num = #{orderNum},</if>
<if test="useSite != null and useSite != ''">use_site = #{useSite},</if>
<if test="useSiteCode != null and useSiteCode != ''">use_site_code = #{useSiteCode},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
</trim>
where id = #{id}
</update>