demand: TMS系统 - 客户管理 - 月结客户界面 新增字段调整 月结客户导入验重逻辑bug修复 修改运单selectOne bug修复 新增月结客户phone重复未导入显示导入成功问题修复 有虚拟单绑定关系的不允许面单删除

committer: heyu
This commit is contained in:
aike 2025-07-22 14:43:33 +08:00
parent 4546d4c600
commit 95cb313ff2
4 changed files with 44 additions and 13 deletions

View File

@ -126,6 +126,10 @@ public class EmisCustomerUser extends BaseEntity
private String payee;
/* 销售联系人 */
private String salesmen;
/* 销售支持 */
private String salesSupport;
/* 销售主管 */
private String salesExecutive;
/* 数据来源 */
private String dataFrom;
/* 是否开通oms */
@ -174,6 +178,9 @@ public class EmisCustomerUser extends BaseEntity
/* 专属业务员 */
private String opEmpName;
/* 是否是导入操作,1:是 */
private String blImport;
// 最近下单时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date lastOrderTime;

View File

@ -3439,13 +3439,9 @@ public class EmisBaseService {
emisCustomerUserMapper.insertEmisCustomerUser(emisCustomerUser);
// 插入角色
emisCustomerUserMapper.insertSysOmsUserRole(emisCustomerUser.getId());
redissonService.unlock("EMIS_CREATE_USER_LOCK");
return emisCustomerUser;
}catch(Exception ex){
} finally {
redissonService.unlock("EMIS_CREATE_USER_LOCK");
ex.printStackTrace();
return emisCustomerUser;
}
}

View File

@ -1915,6 +1915,9 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
// 获取主单号
String mainBillCode = getMainBillCode(scanBillCode);
// 有虚拟单绑定关系的不允许面单删除
checkVirtual(problemType, mainBillCode);
// bug:1454,未开单不允许扫描
boolean isGot = checkWaybillIsGot(mainBillCode);
if (!isGot) {
@ -2023,6 +2026,21 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
return itemList;
}
private void checkVirtual(String problemType, String mainBillCode) throws EmisBizError {
if ("151".equals(problemType)) {
EmisWaybill emisWaybill = emisWaybillMapper.selectEmisWaybillByBillCode(mainBillCode);
if (Objects.isNull(emisWaybill)) {
return;
}
if ("1".equals(emisWaybill.getBlVirtual())) {
throw new EmisBizError(EmisBizErrorType.SCAN_PARAM_ERROR, "该运单已绑定主单,请先解绑");
}
if (StringUtils.isNotBlank(emisWaybill.getVirtualRemark())) {
throw new EmisBizError(EmisBizErrorType.SCAN_PARAM_ERROR, "该运单已绑定虚拟单,请先解绑");
}
}
}
/**
* 填充公共数据
* @param emisTmsScanRecord

View File

@ -59,6 +59,8 @@
<result property="settleDay" column="settle_day" />
<result property="status" column="status" />
<result property="orderNum" column="order_num" />
<result property="salesSupport" column="sales_support"/>
<result property="salesExecutive" column="sales_executive"/>
<result property="custNo" column="monthly_pay_code" />
<result property="custName" column="customer_name" />
@ -88,7 +90,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, 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, 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)-->
@ -161,6 +163,8 @@
<if test="creditPeriodType != null and creditPeriodType != ''"> and credit_period_type=#{creditPeriodType}</if>
<if test="creditPeriod != null "> and credit_period = #{creditPeriod}</if>
<if test="settleDay != null "> and settle_day = #{settleDay}</if>
<if test="salesSupport != null and salesSupport != ''"> and sales_support = #{salesSupport}</if>
<if test="salesExecutive != null and salesExecutive != ''"> and sales_executive = #{salesExecutive}</if>
<choose>
<when test="payee != null and payee != '' and salesmen != null and salesmen != ''">
@ -180,7 +184,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, 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, 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>
@ -241,6 +245,8 @@
<if test="settleDay != null">settle_day,</if>
<if test="status != null and status != ''">status,</if>
<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="remark != null and remark != ''">remark,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
@ -304,6 +310,8 @@
<if test="settleDay != null">#{settleDay},</if>
<if test="status != null and status != ''">#{status},</if>
<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="remark != null and remark != ''">#{remark},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
@ -371,6 +379,8 @@
<if test="settleDay != null">settle_day = #{settleDay},</if>
<if test="status != null and status != ''">status = #{status},</if>
<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="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>
@ -418,25 +428,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, 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, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_customer_user a
where a.phone = #{phone}
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, 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, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_customer_user a
where a.customer_code = #{customerCode}
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, 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, 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, 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, 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>