demand: 月结客户新增、修改、批量修改、批量导入支持新增企业名称/企业税号。月结客户支持根据企业名称/企业税号查询。 月结客户查询返回增加企业名称/企业税号。 运单录入选择月结客户自动关联生成月结客户对应的企业名称/企业税号

committer: heyu
This commit is contained in:
aike 2025-08-27 11:47:29 +08:00
parent 04db785ccf
commit 7258e7631c
4 changed files with 58 additions and 14 deletions

View File

@ -1,11 +1,11 @@
/**
/**
* @Project: emis
* @Title: EmisCustomerUserController.java
* @author linfso
* @date 2024-03-01 03:51:54
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @version v1.0
* @Description: <p> 快递客户用户 控制器 </p>
*/
@ -16,6 +16,7 @@ import javax.servlet.http.HttpServletResponse;
import com.xdadan.erp.common.annotation.filter.jackson.JacksonFilter;
import com.xdadan.erp.emis.domain.*;
import com.xdadan.erp.emis.domain.enumtype.EmisBizErrorType;
import com.xdadan.erp.emis.domain.exception.EmisBizError;
import com.xdadan.erp.emis.service.EmisBaseService;
import org.springframework.beans.factory.annotation.Autowired;
@ -42,7 +43,7 @@ import com.xdadan.erp.emis.service.IEmisCustomerUserService;
/**
* 快递客户用户Controller
*
*
* @author linfso
* @date 2024-03-01 03:51:54
*/
@ -242,6 +243,20 @@ public class EmisCustomerUserController extends EmisBaseController
public AjaxResult addMonthUser(@RequestBody EmisCustomerUser emisCustomerUser)
{
try {
// 验证企业名称和企业税号
try {
// 验证企业名称格式
if (!emisBaseService.validateEnterpriseName(emisCustomerUser.getEnterpriseName())) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
}
// 验证企业税号格式
if (!emisBaseService.validateEnterpriseTaxId(emisCustomerUser.getEnterpriseTaxId())) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
}
} catch (Exception e) {
return AjaxResult.error(e.getMessage());
}
EmisCustomerUser oldUser=emisBaseService.getCustomerUserByPhone(emisCustomerUser.getPhone());
if(oldUser!=null){
return AjaxResult.error("该客户电话号码已被占用,请使用新号码");
@ -345,6 +360,20 @@ public class EmisCustomerUserController extends EmisBaseController
public AjaxResult editMonthUser(@RequestBody EmisCustomerUser emisCustomerUser)
{
try {
// 验证企业名称和企业税号
try {
// 验证企业名称格式
if (!emisBaseService.validateEnterpriseName(emisCustomerUser.getEnterpriseName())) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
}
// 验证企业税号格式
if (!emisBaseService.validateEnterpriseTaxId(emisCustomerUser.getEnterpriseTaxId())) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
}
} catch (Exception e) {
return AjaxResult.error(e.getMessage());
}
EmisCustomerUser oldUser=emisBaseService.getCustomerUserByPhone(emisCustomerUser.getPhone());
if(oldUser!=null && !oldUser.getCustomerCode().equals(emisCustomerUser.getCustomerCode())){
return AjaxResult.error("该客户电话号码已被占用,请使用新号码");

View File

@ -1,11 +1,11 @@
/**
/**
* @Project: emis
* @Title: EmisMonthpayAccountController.java
* @author linfso
* @date 2024-04-24 05:05:22
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @version v1.0
* @Description: <p> 月结账户表 控制器 </p>
*/
@ -42,7 +42,7 @@ import com.xdadan.erp.emis.service.IEmisMonthpayAccountService;
/**
* 月结账户表Controller
*
*
* @author linfso
* @date 2024-04-24 05:05:22
*/
@ -93,7 +93,7 @@ public class EmisMonthpayAccountController extends EmisBaseController
* @param emisCustomerUser
* @return
*/
@JacksonFilter(include= {"customerCode","custNo","custName","payee","salesmen","payeeName","salesmenName"},value= EmisCustomerUser.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
@JacksonFilter(include= {"customerCode","custNo","custName","payee","salesmen","payeeName","salesmenName","enterpriseName","enterpriseTaxId"},value= EmisCustomerUser.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
@GetMapping("/listSimple")
public TableDataInfo listSimple(EmisCustomerUser emisCustomerUser)
{

View File

@ -185,5 +185,10 @@ public class EmisCustomerUser extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date lastOrderTime;
/* 企业名称 */
private String enterpriseName;
/* 企业税号 */
private String enterpriseTaxId;
}

View File

@ -61,6 +61,8 @@
<result property="orderNum" column="order_num" />
<result property="salesSupport" column="sales_support"/>
<result property="salesExecutive" column="sales_executive"/>
<result property="enterpriseName" column="enterprise_name"/>
<result property="enterpriseTaxId" column="enterprise_tax_id"/>
<result property="custNo" column="monthly_pay_code" />
<result property="custName" column="customer_name" />
@ -90,7 +92,7 @@
<sql id="selectEmisCustomerUserVo">
select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, id_type, id_pic1, id_pic2, id_verify_status, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, credit_period_type, credit_period, settle_day, status, order_num, sales_support, sales_executive, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_customer_user
select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, id_type, id_pic1, id_pic2, id_verify_status, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, credit_period_type, credit_period, settle_day, status, order_num, sales_support, sales_executive, enterprise_name, enterprise_tax_id, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_customer_user
</sql>
<!-- or FIND_IN_SET(#{ownerSite},biz_site)-->
@ -144,6 +146,8 @@
<if test="realName != null and realName != ''"> and real_name like concat('%', #{realName}, '%')</if>
<if test="idNo != null and idNo != ''"> and id_no like concat('%', #{idNo}, '%')</if>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="enterpriseTaxId != null and enterpriseTaxId != ''"> and enterprise_tax_id like concat('%', #{enterpriseTaxId}, '%')</if>
<if test="dataFrom != null and dataFrom != ''"> and data_from like concat('%', #{dataFrom}, '%')</if>
<if test="blOpenOms != null and blOpenOms != ''"> and bl_open_oms=#{blOpenOms}</if>
<if test="blSms != null and blSms != ''"> and bl_sms=#{blSms}</if>
@ -184,7 +188,7 @@
</select>
<select id="selectEmisCustomerUserById" parameterType="Long" resultMap="EmisCustomerUserResult">
select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, id_type, id_pic1, id_pic2, id_verify_status, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, credit_period_type, credit_period, settle_day, status, order_num, sales_support, sales_executive, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, id_type, id_pic1, id_pic2, id_verify_status, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, credit_period_type, credit_period, settle_day, status, order_num, sales_support, sales_executive, enterprise_name, enterprise_tax_id, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_customer_user a
where a.id = #{id}
</select>
@ -247,6 +251,8 @@
<if test="orderNum != null and orderNum != ''">order_num,</if>
<if test="salesSupport != null and salesSupport != ''">sales_support,</if>
<if test="salesExecutive != null and salesExecutive != ''">sales_executive,</if>
<if test="enterpriseName != null and enterpriseName != ''">enterprise_name,</if>
<if test="enterpriseTaxId != null and enterpriseTaxId != ''">enterprise_tax_id,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
@ -312,6 +318,8 @@
<if test="orderNum != null and orderNum != ''">#{orderNum},</if>
<if test="salesSupport != null and salesSupport != ''">#{salesSupport},</if>
<if test="salesExecutive != null and salesExecutive != ''">#{salesExecutive},</if>
<if test="enterpriseName != null and enterpriseName != ''">#{enterpriseName},</if>
<if test="enterpriseTaxId != null and enterpriseTaxId != ''">#{enterpriseTaxId},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
@ -381,6 +389,8 @@
<if test="orderNum != null and orderNum != ''">order_num = #{orderNum},</if>
<if test="salesSupport != null and salesSupport != ''">sales_support = #{salesSupport},</if>
<if test="salesExecutive != null and salesExecutive != ''">sales_executive = #{salesExecutive},</if>
<if test="enterpriseName != null and enterpriseName != ''">enterprise_name = #{enterpriseName},</if>
<if test="enterpriseTaxId != null and enterpriseTaxId != ''">enterprise_tax_id = #{enterpriseTaxId},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
@ -428,25 +438,25 @@
<!-- </select>-->
<select id="selectEmisCustomerUserByPhone" parameterType="string" resultMap="EmisCustomerUserResult">
select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, id_type, id_pic1, id_pic2, id_verify_status, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, credit_period_type, credit_period, settle_day, status, order_num, sales_support, sales_executive, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, id_type, id_pic1, id_pic2, id_verify_status, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, credit_period_type, credit_period, settle_day, status, order_num, sales_support, sales_executive, enterprise_name, enterprise_tax_id, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_customer_user a
where a.del_flag='0' and a.phone = #{phone}
</select>
<select id="selectCustomerByCustomerCode" parameterType="string" resultMap="EmisCustomerUserResult">
select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, id_type, id_pic1, id_pic2, id_verify_status, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, credit_period_type, credit_period, settle_day, status, order_num, sales_support, sales_executive, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, id_type, id_pic1, id_pic2, id_verify_status, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, credit_period_type, credit_period, settle_day, status, order_num, sales_support, sales_executive, enterprise_name, enterprise_tax_id, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_customer_user a
where a.del_flag='0' and a.customer_code = #{customerCode}
</select>
<select id="selectMonthCustomerByName" parameterType="string" resultMap="EmisCustomerUserResult">
select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, id_type, id_pic1, id_pic2, id_verify_status, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, credit_period_type, credit_period, settle_day, status, order_num, sales_support, sales_executive, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, id_type, id_pic1, id_pic2, id_verify_status, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, credit_period_type, credit_period, settle_day, status, order_num, sales_support, sales_executive, enterprise_name, enterprise_tax_id, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_customer_user a
where a.del_flag='0' and a.customer_type='2' and a.customer_name = #{customerName}
</select>
<select id="selectMonthCustomerByMonthlyPayCode" parameterType="string" resultMap="EmisCustomerUserResult">
select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, id_type, id_pic1, id_pic2, id_verify_status, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, credit_period_type, credit_period, settle_day, status, order_num, sales_support, sales_executive, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, id_type, id_pic1, id_pic2, id_verify_status, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, credit_period_type, credit_period, settle_day, status, order_num, sales_support, sales_executive, enterprise_name, enterprise_tax_id, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_customer_user a
where a.del_flag='0' and a.customer_type='2' and a.monthly_pay_code= #{monthlyPayCode}
</select>
@ -460,4 +470,4 @@
</mapper>
</mapper>