Merge pull request 'develop' (#2) from develop into master

Reviewed-on: http://git.xdadan.loc/tanex/emis-oms2c-service/pulls/2
This commit is contained in:
heyu 2025-09-04 17:42:06 +08:00
commit 7057a173b2
9 changed files with 224 additions and 92 deletions

View File

@ -1,11 +1,11 @@
/**
/**
* @Project: emis
* @Title: EmisCustomerAddressController.java
* @author linfso
* @date 2024-03-01 04:47:51
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @version v1.0
* @Description: <p> 客户收寄件地址 控制器 </p>
*/
@ -26,10 +26,11 @@ import com.xdadan.erp.oms.common.enums.BusinessType;
import com.xdadan.erp.oms.domain.EmisCustomerAddress;
import com.xdadan.erp.oms.service.IEmisCustomerAddressService;
import com.xdadan.erp.oms.domain.exception.EmisBizError;
/**
* 客户收寄件地址Controller
*
*
* @author linfso
* @date 2024-03-01 04:47:51
*/
@ -54,11 +55,13 @@ public class Oms2cCustomerAddressController extends BaseController
return getDataTable(list);
}
// @PreAuthorize("@ss.hasPermi('emis:emisCustomerAddress:list')")
@JacksonFilter(include= {"id","name","phone","country","province","city","county","countryName","provinceName","cityName","countyName","town","townName","address","postCode","email","company","blDefaultFlag","orderNum","createTime","remark"},value= EmisCustomerAddress.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
// @PreAuthorize("@ss.hasPermi('emis:emisCustomerAddress:list')")
@JacksonFilter(include = { "id", "name", "phone", "country", "province", "city", "county", "countryName",
"provinceName", "cityName", "countyName", "town", "townName", "address", "postCode", "email", "company",
"blDefaultFlag", "orderNum", "createTime", "remark", "enterpriseName",
"enterpriseTaxId" }, value = EmisCustomerAddress.class, type = JacksonFilter.JscksonFilterType.RESPONSE)
@RequestMapping("/listSimple")
public TableDataInfo listSimple(EmisCustomerAddress emisCustomerAddress)
{
public TableDataInfo listSimple(EmisCustomerAddress emisCustomerAddress) {
// 需要限制,除总部外,只能查看站点自有数据
startPage();
// emisCustomerAddress.setUserId(getLoginUser().getUser().getId());
@ -67,7 +70,10 @@ public class Oms2cCustomerAddressController extends BaseController
return getDataTable(list);
}
@JacksonFilter(include= {"id","name","phone","country","province","city","county","address","postCode","email","company","countryName","provinceName","cityName","countyName","town","townName","blDefaultFlag","orderNum","createTime","remark"},value= EmisCustomerAddress.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
@JacksonFilter(include = { "id", "name", "phone", "country", "province", "city", "county", "address", "postCode",
"email", "company", "countryName", "provinceName", "cityName", "countyName", "town", "townName",
"blDefaultFlag", "orderNum", "createTime", "remark", "enterpriseName",
"enterpriseTaxId" }, value = EmisCustomerAddress.class, type = JacksonFilter.JscksonFilterType.RESPONSE)
@RequestMapping("/getAddressById")
public AjaxResult getAddressById(@RequestParam("id") Long id)
{
@ -122,48 +128,62 @@ public class Oms2cCustomerAddressController extends BaseController
// @PreAuthorize("@ss.hasPermi('emis:emisCustomerAddress:add')")
@Log(title = "客户收寄件地址", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EmisCustomerAddress emisCustomerAddress)
{
emisCustomerAddress.setUserId(getLoginUser().getUser().getId());
emisCustomerAddress.setCustomerCode(getLoginUser().getUser().getCustomerCode());
return toAjax(emisCustomerAddressService.insertEmisCustomerAddress(emisCustomerAddress));
public AjaxResult add(@RequestBody EmisCustomerAddress emisCustomerAddress) {
try {
emisCustomerAddress.setUserId(getLoginUser().getUser().getId());
emisCustomerAddress.setCustomerCode(getLoginUser().getUser().getCustomerCode());
return toAjax(emisCustomerAddressService.insertEmisCustomerAddress(emisCustomerAddress));
} catch (EmisBizError e) {
return AjaxResult.error(e.getMessage());
}
}
@Log(title = "客户收寄件地址", businessType = BusinessType.INSERT)
@PostMapping("/addAddress")
public AjaxResult addAddress(@RequestBody EmisCustomerAddress emisCustomerAddress)
{
emisCustomerAddress.setUserId(getLoginUser().getUser().getId());
emisCustomerAddress.setCustomerCode(getLoginUser().getUser().getCustomerCode());
return toAjax(emisCustomerAddressService.insertEmisCustomerAddress(emisCustomerAddress));
public AjaxResult addAddress(@RequestBody EmisCustomerAddress emisCustomerAddress) {
try {
emisCustomerAddress.setUserId(getLoginUser().getUser().getId());
emisCustomerAddress.setCustomerCode(getLoginUser().getUser().getCustomerCode());
return toAjax(emisCustomerAddressService.insertEmisCustomerAddress(emisCustomerAddress));
} catch (EmisBizError e) {
return AjaxResult.error(e.getMessage());
}
}
@Log(title = "客户收寄件地址", businessType = BusinessType.UPDATE)
@PostMapping("/editAddress")
public AjaxResult editAddress(@RequestBody EmisCustomerAddress emisCustomerAddress)
{
EmisCustomerAddress old=emisCustomerAddressService.selectEmisCustomerAddressById(emisCustomerAddress.getId());
if(!getLoginUser().getUser().getCustomerCode().equals(old.getCustomerCode())){
return AjaxResult.error("非法操作");
}
public AjaxResult editAddress(@RequestBody EmisCustomerAddress emisCustomerAddress) {
try {
EmisCustomerAddress old = emisCustomerAddressService
.selectEmisCustomerAddressById(emisCustomerAddress.getId());
if (!getLoginUser().getUser().getCustomerCode().equals(old.getCustomerCode())) {
return AjaxResult.error("非法操作");
}
return toAjax(emisCustomerAddressService.updateEmisCustomerAddress(emisCustomerAddress));
return toAjax(emisCustomerAddressService.updateEmisCustomerAddress(emisCustomerAddress));
} catch (EmisBizError e) {
return AjaxResult.error(e.getMessage());
}
}
/**
* 修改客户收寄件地址
*/
// @PreAuthorize("@ss.hasPermi('emis:emisCustomerAddress:edit')")
// @PreAuthorize("@ss.hasPermi('emis:emisCustomerAddress:edit')")
@Log(title = "客户收寄件地址", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EmisCustomerAddress emisCustomerAddress)
{
EmisCustomerAddress old=emisCustomerAddressService.selectEmisCustomerAddressById(emisCustomerAddress.getId());
if(!getLoginUser().getUser().getCustomerCode().equals(old.getCustomerCode())){
return AjaxResult.error("非法操作");
}
public AjaxResult edit(@RequestBody EmisCustomerAddress emisCustomerAddress) {
try {
EmisCustomerAddress old = emisCustomerAddressService
.selectEmisCustomerAddressById(emisCustomerAddress.getId());
if (!getLoginUser().getUser().getCustomerCode().equals(old.getCustomerCode())) {
return AjaxResult.error("非法操作");
}
return toAjax(emisCustomerAddressService.updateEmisCustomerAddress(emisCustomerAddress));
return toAjax(emisCustomerAddressService.updateEmisCustomerAddress(emisCustomerAddress));
} catch (EmisBizError e) {
return AjaxResult.error(e.getMessage());
}
}
/**

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>
*/
@ -27,11 +27,12 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
* 月结账户表Controller
*
*
* @author linfso
* @date 2024-04-24 05:05:22
*/
@ -52,7 +53,7 @@ public class Oms2cMonthpayAccountController extends BaseController
* @param sysOmsUser
* @return
*/
@JacksonFilter(include= {"custNo","custName","payee","salesmen"},value= SysOmsUser.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
@JacksonFilter(include= {"custNo","custName","payee","salesmen","params"},value= SysOmsUser.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
@GetMapping("/listSimple")
public TableDataInfo listSimple(SysOmsUser sysOmsUser)
{
@ -80,6 +81,14 @@ public class Oms2cMonthpayAccountController extends BaseController
newUser.setPayeeName(sysOmsUser0.getPayeeName());
newUser.setSalesmen(sysOmsUser0.getSalesmen());
newUser.setSalesmenName(sysOmsUser0.getSalesmenName());
// 设置企业名称和企业税号到params中
if (newUser.getParams() == null) {
newUser.setParams(new HashMap<>());
}
newUser.getParams().put("enterpriseName", useApply.getEnterpriseName());
newUser.getParams().put("enterpriseTaxId", useApply.getEnterpriseTaxId());
list.add(newUser);
}
}
@ -93,6 +102,22 @@ public class Oms2cMonthpayAccountController extends BaseController
newUser.setPayeeName(user.getPayeeName());
newUser.setSalesmen(user.getSalesmen());
newUser.setSalesmenName(user.getSalesmenName());
// 设置企业名称和企业税号到params中
if (newUser.getParams() == null) {
newUser.setParams(new HashMap<>());
}
// 查询当前用户月结编号对应的企业信息
EmisMonthpayUseApply currentUserApply = new EmisMonthpayUseApply();
currentUserApply.setCustNo(user.getMonthlyPayCode());
List<EmisMonthpayUseApply> currentUserList = emisMonthpayUseApplyService
.selectEmisMonthpayUseApplyList(currentUserApply);
if (!CollectionUtil.isEmpty(currentUserList)) {
EmisMonthpayUseApply currentApply = currentUserList.get(0);
newUser.getParams().put("enterpriseName", currentApply.getEnterpriseName());
newUser.getParams().put("enterpriseTaxId", currentApply.getEnterpriseTaxId());
}
list.add(newUser);
}

View File

@ -84,4 +84,9 @@ public class EmisCustomerAddress extends BaseEntity
/* 使用站点名称 */
private String useSiteName;
/* 企业名称 */
private String enterpriseName;
/* 企业税号 */
private String enterpriseTaxId;
}

View File

@ -1,10 +1,10 @@
/**
/**
* @Project: emis
* @Title: EmisMonthpayUseApply.java
* @author linfso
* @date 2024-04-24 05:05:23
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @version v1.0
* @Description: <p> 月结账号使用申请关联 实体类 </p>
*/
@ -53,5 +53,9 @@ public class EmisMonthpayUseApply extends BaseEntity
/* 审核验证码 */
private String msgCode;
/* 企业名称 */
private String enterpriseName;
/* 企业税号 */
private String enterpriseTaxId;
}

View File

@ -42,6 +42,10 @@ public class Sender implements Serializable {
/* 公司 */
private String company;
/* 企业名称 */
private String enterpriseName;
/* 企业税号 */
private String enterpriseTaxId;
/* 寄件人客户地址ID */
private Integer id;
}

View File

@ -1,35 +1,36 @@
/**
/**
* @Project: emis
* @Title: EmisCustomerAddressService.java
* @author linfso
* @date 2024-03-01 04:47:51
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @version v1.0
* @Description: <p> 客户收寄件地址 服务类接口 </p>
*/
package com.xdadan.erp.oms.service;
import java.util.List;
import com.xdadan.erp.oms.domain.EmisCustomerAddress;
import com.xdadan.erp.oms.domain.exception.EmisBizError;
/**
/**
* @ClassName EmisCustomerAddressService
* @Description 客户收寄件地址
* @author linfso
* @date 2024-03-01 04:47:51
*/
public interface IEmisCustomerAddressService
public interface IEmisCustomerAddressService
{
/**
* 主键查询
* @param id
* @return
* @return
*/
public EmisCustomerAddress selectEmisCustomerAddressById(Long id);
/**
* 查询客户收寄件地址列表
*
*
* @param emisCustomerAddress 客户收寄件地址
* @return 客户收寄件地址集合
*/
@ -37,23 +38,23 @@ public interface IEmisCustomerAddressService
/**
* 新增客户收寄件地址
*
*
* @param emisCustomerAddress 客户收寄件地址
* @return 结果
*/
public int insertEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress);
public int insertEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress) throws EmisBizError;
/**
* 修改客户收寄件地址
*
*
* @param emisCustomerAddress 客户收寄件地址
* @return 结果
*/
public int updateEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress);
public int updateEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress) throws EmisBizError;
/**
* 批量删除客户收寄件地址
*
*
* @param ids 需要删除的客户收寄件地址主键集合
* @return 结果
*/
@ -61,7 +62,7 @@ public interface IEmisCustomerAddressService
/**
* 删除客户收寄件地址信息
*
*
* @param id 客户收寄件地址主键
* @return 结果
*/

View File

@ -1,10 +1,10 @@
/**
/**
* @Project: emis
* @Title: EmisCustomerAddressServiceImpl.java
* @author linfso
* @date 2024-03-01 04:47:51
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @version v1.0
* @Description: <p> 客户收寄件地址 实体类 </p>
*/
@ -17,10 +17,12 @@ import org.springframework.stereotype.Service;
import com.xdadan.erp.oms.domain.EmisCustomerAddress;
import com.xdadan.erp.oms.mapper.EmisCustomerAddressMapper;
import com.xdadan.erp.oms.service.IEmisCustomerAddressService;
import com.xdadan.erp.oms.domain.exception.EmisBizError;
import com.xdadan.erp.oms.domain.enumtype.EmisBizErrorType;
/**
* 客户收寄件地址Service业务层处理
*
*
* @author linfso
* @date 2024-03-01 04:47:51
*/
@ -32,7 +34,7 @@ public class EmisCustomerAddressServiceImpl implements IEmisCustomerAddressServ
/**
* 查询客户收寄件地址
*
*
* @param id 客户收寄件地址主键
* @return 客户收寄件地址
*/
@ -44,7 +46,7 @@ public class EmisCustomerAddressServiceImpl implements IEmisCustomerAddressServ
/**
* 查询客户收寄件地址列表
*
*
* @param emisCustomerAddress 客户收寄件地址
* @return 客户收寄件地址
*/
@ -56,13 +58,22 @@ public class EmisCustomerAddressServiceImpl implements IEmisCustomerAddressServ
/**
* 新增客户收寄件地址
*
*
* @param emisCustomerAddress 客户收寄件地址
* @return 结果
*/
@Override
public int insertEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress)
{
public int insertEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress) throws EmisBizError {
// 验证企业名称格式
if (!validateEnterpriseName(emisCustomerAddress.getEnterpriseName())) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
}
// 验证企业税号格式
if (!validateEnterpriseTaxId(emisCustomerAddress.getEnterpriseTaxId())) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
}
// 新增地址
// emisCustomerAddress.preInsert();
// emisCustomerAddress.setUseSiteCode(getCurrentUser().getOwnerSiteCode());
@ -72,22 +83,31 @@ public class EmisCustomerAddressServiceImpl implements IEmisCustomerAddressServ
/**
* 修改客户收寄件地址
*
*
* @param emisCustomerAddress 客户收寄件地址
* @return 结果
*/
@Override
public int updateEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress)
{
// emisCustomerAddress.setUseSiteCode(getCurrentUser().getOwnerSiteCode());
// emisCustomerAddress.setUseSite(getCurrentUser().getOwnerSiteName());
public int updateEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress) throws EmisBizError {
// 验证企业名称格式
if (!validateEnterpriseName(emisCustomerAddress.getEnterpriseName())) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
}
// 验证企业税号格式
if (!validateEnterpriseTaxId(emisCustomerAddress.getEnterpriseTaxId())) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
}
// emisCustomerAddress.setUseSiteCode(getCurrentUser().getOwnerSiteCode());
// emisCustomerAddress.setUseSite(getCurrentUser().getOwnerSiteName());
return emisCustomerAddressMapper.updateEmisCustomerAddress(emisCustomerAddress);
}
/**
* 批量删除客户收寄件地址
*
*
* @param ids 需要删除的客户收寄件地址主键
* @return 结果
*/
@ -99,7 +119,7 @@ public class EmisCustomerAddressServiceImpl implements IEmisCustomerAddressServ
/**
* 删除客户收寄件地址信息
*
*
* @param id 客户收寄件地址主键
* @return 结果
*/
@ -149,5 +169,47 @@ public class EmisCustomerAddressServiceImpl implements IEmisCustomerAddressServ
return emisCustomerAddressMapper.checkUnique(emisCustomerAddress);
}
/**
* 验证企业名称格式
* 不允许包含空格、回车、@、#、$、%、&、数字等特殊符号
*/
public boolean validateEnterpriseName(String enterpriseName) {
if (com.xdadan.erp.oms.common.utils.StringUtils.isEmpty(enterpriseName)) {
return true;
}
// 检查是否包含不允许的字符
String invalidChars = " @#$%&0123456789";
for (char c : invalidChars.toCharArray()) {
if (enterpriseName.contains(String.valueOf(c))) {
return false;
}
}
// 检查是否包含回车符
if (enterpriseName.contains("\n") || enterpriseName.contains("\r")) {
return false;
}
return true;
}
/**
* 验证企业税号格式
* 8-18位数组成,由数字和大写字母组成,不允许有汉字、空格等特殊符号
*/
public boolean validateEnterpriseTaxId(String enterpriseTaxId) {
if (com.xdadan.erp.oms.common.utils.StringUtils.isEmpty(enterpriseTaxId)) {
return true;
}
// 检查长度
if (enterpriseTaxId.length() < 8 || enterpriseTaxId.length() > 18) {
return false;
}
// 检查是否只包含数字和大写字母
return enterpriseTaxId.matches("^[0-9A-Z]+$");
}
}

View File

@ -27,7 +27,8 @@
<result property="blSiteDefaultFlag" column="bl_site_default_flag" />
<result property="useSite" column="use_site" />
<result property="useSiteCode" column="use_site_code" />
<result property="enterpriseName" column="enterprise_name" />
<result property="enterpriseTaxId" column="enterprise_tax_id" />
<association property="countryName" column="country" select="com.xdadan.erp.oms.mapper.EmisBaseMapper.selectCountryNameByCode"/>
<association property="provinceName" column="province" select="com.xdadan.erp.oms.mapper.EmisBaseMapper.selectRegionNameByCode"/>
@ -38,7 +39,7 @@
</resultMap>
<sql id="selectEmisCustomerAddressVo">
select id, user_id, customer_code, short_name, alias, address_type, country, name, phone, province, city, county, town, address, post_code, email, company, bl_default_flag, order_num, bl_site_default_flag, use_site, use_site_code, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_customer_address
select id, user_id, customer_code, short_name, alias, address_type, country, name, phone, province, city, county, town, address, post_code, email, company, bl_default_flag, order_num, bl_site_default_flag, use_site, use_site_code, enterprise_name, enterprise_tax_id, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_customer_address
</sql>
@ -63,6 +64,8 @@
<if test="postCode != null and postCode != ''"> and post_code like concat('%', #{postCode}, '%')</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="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="blDefaultFlag != null and blDefaultFlag != ''"> and bl_default_flag = #{blDefaultFlag}</if>
<if test="orderNum != null "> and order_num like concat('%', #{orderNum}, '%')</if>
<if test="blSiteDefaultFlag != null and blSiteDefaultFlag != ''"> and bl_site_default_flag like concat('%', #{blSiteDefaultFlag}, '%')</if>
@ -87,7 +90,7 @@
</select>
<select id="selectEmisCustomerAddressById" parameterType="Long" resultMap="EmisCustomerAddressResult">
select id, user_id, customer_code, short_name, alias, address_type, country, name, phone, province, city, county, town, address, post_code, email, company, bl_default_flag, order_num, bl_site_default_flag, use_site, use_site_code, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
select id, user_id, customer_code, short_name, alias, address_type, country, name, phone, province, city, county, town, address, post_code, email, company, bl_default_flag, order_num, bl_site_default_flag, use_site, use_site_code, enterprise_name, enterprise_tax_id, 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>
@ -116,6 +119,8 @@
<if test="blSiteDefaultFlag != null and blSiteDefaultFlag != ''">bl_site_default_flag,</if>
<if test="useSite != null and useSite != ''">use_site,</if>
<if test="useSiteCode != null and useSiteCode != ''">use_site_code,</if>
<if test="enterpriseName != null and enterpriseName != ''">enterprise_name,</if>
<if test="enterpriseTaxId != null and enterpriseTaxId != ''">enterprise_tax_id,</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>
@ -147,6 +152,8 @@
<if test="blSiteDefaultFlag != null and blSiteDefaultFlag != ''">#{blSiteDefaultFlag},</if>
<if test="useSite != null and useSite != ''">#{useSite},</if>
<if test="useSiteCode != null and useSiteCode != ''">#{useSiteCode},</if>
<if test="enterpriseName != null and enterpriseName != ''">#{enterpriseName},</if>
<if test="enterpriseTaxId != null and enterpriseTaxId != ''">#{enterpriseTaxId},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
@ -175,6 +182,8 @@
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
<if test="email != null and email != ''">email = #{email},</if>
<if test="company != null and company != ''">company = #{company},</if>
<if test="enterpriseName != null and enterpriseName != ''">enterprise_name = #{enterpriseName},</if>
<if test="enterpriseTaxId != null and enterpriseTaxId != ''">enterprise_tax_id = #{enterpriseTaxId},</if>
</trim>
where id = #{id}

View File

@ -16,39 +16,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="auditReson" column="audit_reson" />
<result property="auditBy" column="audit_by" />
<result property="msgCode" column="msg_code" />
<result property="enterpriseName" column="enterprise_name" />
<result property="enterpriseTaxId" column="enterprise_tax_id" />
</resultMap>
<sql id="selectEmisMonthpayUseApplyVo">
select id, cust_no, customer_code, apply_seq, apply_date, apply_name, audit_date, audit_status, audit_reson, audit_by, msg_code, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_monthpay_use_apply
select a.id, a.cust_no, a.customer_code, a.apply_seq, a.apply_date, a.apply_name, a.audit_date, a.audit_status, a.audit_reson, a.audit_by, a.msg_code, a.remark, a.tenant_id, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.create_site, a.update_site, c.enterprise_name, c.enterprise_tax_id from emis_monthpay_use_apply a left join emis_customer_user c on a.cust_no = c.monthly_pay_code
</sql>
<select id="selectEmisMonthpayUseApplyList" parameterType="EmisMonthpayUseApply" resultMap="EmisMonthpayUseApplyResult">
<include refid="selectEmisMonthpayUseApplyVo"/>
<where>
del_flag = '0'
<if test="id != null "> and id = #{id}</if>
<if test="custNo != null and custNo != ''"> and cust_no= #{custNo}</if>
<if test="customerCode != null and customerCode != ''"> and customer_code=#{customerCode}</if>
<if test="applySeq != null and applySeq != ''"> and apply_seq=#{applySeq}</if>
<if test="applyDate != null "> and apply_date = #{applyDate}</if>
<if test="applyName != null and applyName != ''"> and apply_name like concat('%', #{applyName}, '%')</if>
<if test="auditDate != null "> and audit_date = #{auditDate}</if>
<if test="auditStatus != null "> and audit_status = #{auditStatus}</if>
<if test="auditReson != null and auditReson != ''"> and audit_reson like concat('%', #{auditReson}, '%')</if>
<if test="auditBy != null and auditBy != ''"> and audit_by=#{auditBy}</if>
<if test="msgCode != null and msgCode != ''"> and msg_code=#{msgCode}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</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="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
a.del_flag = '0'
<if test="id != null "> and a.id = #{id}</if>
<if test="custNo != null and custNo != ''"> and a.cust_no= #{custNo}</if>
<if test="customerCode != null and customerCode != ''"> and a.customer_code=#{customerCode}</if>
<if test="applySeq != null and applySeq != ''"> and a.apply_seq=#{applySeq}</if>
<if test="applyDate != null "> and a.apply_date = #{applyDate}</if>
<if test="applyName != null and applyName != ''"> and a.apply_name like concat('%', #{applyName}, '%')</if>
<if test="auditDate != null "> and a.audit_date = #{auditDate}</if>
<if test="auditStatus != null "> and a.audit_status = #{auditStatus}</if>
<if test="auditReson != null and auditReson != ''"> and a.audit_reson like concat('%', #{auditReson}, '%')</if>
<if test="auditBy != null and auditBy != ''"> and a.audit_by=#{auditBy}</if>
<if test="msgCode != null and msgCode != ''"> and a.msg_code=#{msgCode}</if>
<if test="remark != null and remark != ''"> and a.remark like concat('%', #{remark}, '%')</if>
<if test="tenantId != null and tenantId != ''"> and a.tenant_id like concat('%', #{tenantId}, '%')</if>
<if test="delFlag != null and delFlag != ''"> and a.del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and a.create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and a.create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and a.update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and a.update_time = #{updateTime}</if>
<if test="createSite != null and createSite != ''"> and a.create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and a.update_site like concat('%', #{updateSite}, '%')</if>
</where>
order by create_time desc
order by a.create_time desc
</select>
<select id="selectEmisMonthpayUseApplyById" parameterType="Long" resultMap="EmisMonthpayUseApplyResult">