Commit 61ba3c6a authored by fulixin's avatar fulixin

修改/advisory/body/getAdvisoryBodyList 查合作企业合作时间选项的逻辑

parent 5829b3b9
...@@ -146,7 +146,7 @@ security: ...@@ -146,7 +146,7 @@ security:
- /api/** - /api/**
- /actuator/** - /actuator/**
- /monitor/push/insert/** - /monitor/push/insert/**
# - /**
# 多租户配置 # 多租户配置
......
...@@ -25,7 +25,7 @@ public class AddLaborLeaderCustomerRiskBo { ...@@ -25,7 +25,7 @@ public class AddLaborLeaderCustomerRiskBo {
* 劳务队长身份证号 * 劳务队长身份证号
*/ */
@NotBlank(message = "劳务队长身份证号不能为空") @NotBlank(message = "劳务队长身份证号不能为空")
private String laborCaptainIdcard; private String laborCaptainIdCard;
/** /**
* 劳务队长联系电话 * 劳务队长联系电话
*/ */
...@@ -35,7 +35,7 @@ public class AddLaborLeaderCustomerRiskBo { ...@@ -35,7 +35,7 @@ public class AddLaborLeaderCustomerRiskBo {
* 挂靠单位(供应商名称) * 挂靠单位(供应商名称)
*/ */
@NotBlank(message = "挂靠单位名称不能为空") @NotBlank(message = "挂靠单位名称不能为空")
private String cusomerName; private String customerName;
/** /**
* 不良事由 * 不良事由
*/ */
......
...@@ -34,4 +34,16 @@ public class AdvisoryBodySearchBo { ...@@ -34,4 +34,16 @@ public class AdvisoryBodySearchBo {
* 经营范围 * 经营范围
*/ */
private String businessScope; private String businessScope;
/**
* 条数
*/
private Integer pageSize = 50;
/**
* 页数
*/
private Integer pageNum = 1;
} }
...@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.Constants; ...@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dsk.cscec.domain.AdvisoryBody; import com.dsk.cscec.domain.AdvisoryBody;
import com.dsk.cscec.domain.bo.AdvisoryBodyBo; import com.dsk.cscec.domain.bo.AdvisoryBodyBo;
import com.dsk.cscec.domain.bo.AdvisoryBodySearchBo;
import com.dsk.cscec.domain.vo.AdvisoryBodySearchVo; import com.dsk.cscec.domain.vo.AdvisoryBodySearchVo;
import com.dsk.cscec.domain.vo.AdvisoryBodyVo; import com.dsk.cscec.domain.vo.AdvisoryBodyVo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -20,6 +21,29 @@ import java.util.List; ...@@ -20,6 +21,29 @@ import java.util.List;
* @since 2023-12-12 10:12:04 * @since 2023-12-12 10:12:04
*/ */
public interface AdvisoryBodyMapper extends BaseMapper<AdvisoryBody> { public interface AdvisoryBodyMapper extends BaseMapper<AdvisoryBody> {
/**
* 得到咨询机构及项目相关信息总条数
* @param bo
* @param bo
* @return
*/
Integer getAdvisoryBodyAndProjectMsgCount(@Param("bo") AdvisoryBodySearchBo bo);
/**
* 得到咨询机构及项目相关信息
* @param bo
* @return
*/
List<AdvisoryBodySearchVo> getAdvisoryBodyAndProjectMsg(@Param("bo") AdvisoryBodySearchBo bo);
/** /**
* 获取所有企业列表(咨询机构)数据 * 获取所有企业列表(咨询机构)数据
*/ */
......
...@@ -48,15 +48,15 @@ public class LaborLeaderCustomerRiskServiceImpl extends ServiceImpl<LaborLeaderC ...@@ -48,15 +48,15 @@ public class LaborLeaderCustomerRiskServiceImpl extends ServiceImpl<LaborLeaderC
LaborLeaderCustomerRisk risk = BeanUtil.toBean(addBo, LaborLeaderCustomerRisk.class); LaborLeaderCustomerRisk risk = BeanUtil.toBean(addBo, LaborLeaderCustomerRisk.class);
risk.setRiskId(IdUtil.getSnowflakeNextId()); risk.setRiskId(IdUtil.getSnowflakeNextId());
//查询供应商cid //查询供应商cid
Map<String, Object> map = opportunityRadarService.enterpriseByName(addBo.getCusomerName()); Map<String, Object> map = opportunityRadarService.enterpriseByName(addBo.getCustomerName());
if (!ObjectUtils.isEmpty(map.get("data"))) { if (!ObjectUtils.isEmpty(map.get("data"))) {
Map<String, Object> data = BeanUtil.beanToMap(map.get("data")); Map<String, Object> data = BeanUtil.beanToMap(map.get("data"));
Integer companyId = MapUtil.getInt(data, "jskEid"); Integer companyId = MapUtil.getInt(data, "jskEid");
Assert.notNull(companyId, "挂靠单位不存在或请填写完整单位名称"); Assert.notNull(companyId, "挂靠单位不存在或请填写完整单位名称");
risk.setCustomerCid(companyId); risk.setCustomerCid(companyId);
} }
risk.setLaborCaptainIdCard(addBo.getLaborCaptainIdcard()); risk.setLaborCaptainIdCard(addBo.getLaborCaptainIdCard());
risk.setCustomerName(addBo.getCusomerName()); risk.setCustomerName(addBo.getCustomerName());
return baseMapper.insert(risk); return baseMapper.insert(risk);
} }
......
...@@ -3,6 +3,77 @@ ...@@ -3,6 +3,77 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dsk.cscec.mapper.AdvisoryBodyMapper"> <mapper namespace="com.dsk.cscec.mapper.AdvisoryBodyMapper">
<select id="getAdvisoryBodyAndProjectMsgCount" parameterType="object" resultType="int">
SELECT
count(*)
FROM
advisory_body ab
LEFT JOIN advisory_body_project abp ON ab.advisory_body_cid = abp.advisory_body_cid
<where>
<if test='bo.advisoryBodyName != null and bo.advisoryBodyName != ""'>
and ab.advisory_body_name like concat('%',#{bo.advisoryBodyName},'%')
</if>
<if test='bo.businessScope != null and bo.businessScope != ""'>
and ab.business_scope like concat('%',#{bo.businessScope},'%')
</if>
<if test='bo.minLastCooperateDate != null'>
and abp.create_time >= #{bo.minLastCooperateDate }
</if>
<if test='bo.maxLastCooperateDate != null'>
and #{bo.maxLastCooperateDate } >= abp.create_time
</if>
</where>
</select>
<select id="getAdvisoryBodyAndProjectMsg" parameterType="object" resultType="com.dsk.cscec.domain.vo.AdvisoryBodySearchVo">
SELECT
ab.*,
abp.create_by,
abp.create_time lastCooperateTime
FROM
advisory_body ab
LEFT JOIN advisory_body_project abp ON ab.advisory_body_cid = abp.advisory_body_cid
<where>
<if test='bo.advisoryBodyName != null and bo.advisoryBodyName != ""'>
and ab.advisory_body_name like concat('%',#{bo.advisoryBodyName},'%')
</if>
<if test='bo.businessScope != null and bo.businessScope != ""'>
and ab.business_scope like concat('%',#{bo.businessScope},'%')
</if>
<if test='bo.minLastCooperateDate != null'>
and abp.create_time >= #{bo.minLastCooperateDate }
</if>
<if test='bo.maxLastCooperateDate != null'>
and #{bo.maxLastCooperateDate } >= abp.create_time
</if>
</where>
ORDER BY abp.create_time desc
limit #{bo.pageNum},#{bo.pageSize}
</select>
<select id="selectPageAdvisoryBodyList" resultType="com.dsk.cscec.domain.vo.AdvisoryBodySearchVo"> <select id="selectPageAdvisoryBodyList" resultType="com.dsk.cscec.domain.vo.AdvisoryBodySearchVo">
select select
<include refid="allColumn"></include> <include refid="allColumn"></include>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
from d_customer dc from d_customer dc
left join f_supplier_limited fsl on (fsl.flaowufbid = dc.customer_id left join f_supplier_limited fsl on (fsl.flaowufbid = dc.customer_id
or fsl.fzhuanyefbid = dc.customer_id or fsl.ffgid = dc.customer_id or fsl.fzlid = dc.customer_id) or fsl.fzhuanyefbid = dc.customer_id or fsl.ffgid = dc.customer_id or fsl.fzlid = dc.customer_id)
where dc.recommend_org_id = 'F17305B4EA4444CBAB12892C7B99E475' where (dc.recommend_org_id = 'F17305B4EA4444CBAB12892C7B99E475' OR recommend_org_id IS NULL)
<if test="bo.customerName != null and bo.customerName != '' "> and dc.customer_name like concat('%',#{bo.customerName},'%')</if> <if test="bo.customerName != null and bo.customerName != '' "> and dc.customer_name like concat('%',#{bo.customerName},'%')</if>
<if test="bo.province != null and bo.province.size > 0 and (bo.city == null or bo.city.size == 0) "> <if test="bo.province != null and bo.province.size > 0 and (bo.city == null or bo.city.size == 0) ">
and dc.register_province in and dc.register_province in
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
from d_customer dc from d_customer dc
left join f_supplier_limited fsl on (fsl.flaowufbid = dc.customer_id left join f_supplier_limited fsl on (fsl.flaowufbid = dc.customer_id
or fsl.fzhuanyefbid = dc.customer_id or fsl.ffgid = dc.customer_id or fsl.fzlid = dc.customer_id) or fsl.fzhuanyefbid = dc.customer_id or fsl.ffgid = dc.customer_id or fsl.fzlid = dc.customer_id)
where dc.recommend_org_id = 'F17305B4EA4444CBAB12892C7B99E475' where (dc.recommend_org_id = 'F17305B4EA4444CBAB12892C7B99E475' OR recommend_org_id IS NULL)
<if test="bo.customerName != null and bo.customerName != '' "> and dc.customer_name like concat('%',#{bo.customerName},'%')</if> <if test="bo.customerName != null and bo.customerName != '' "> and dc.customer_name like concat('%',#{bo.customerName},'%')</if>
<if test="bo.province != null and bo.province.size > 0 and (bo.city == null or bo.city.size == 0) "> <if test="bo.province != null and bo.province.size > 0 and (bo.city == null or bo.city.size == 0) ">
and dc.register_province in and dc.register_province in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment