demand: oms\小程序-获取月结卡信息接口查询返回企业名称、企业税号

This commit is contained in:
aike 2025-09-03 17:13:37 +08:00
parent 005ade694f
commit 46b1127d55
3 changed files with 60 additions and 29 deletions

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

@ -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

@ -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">