Merge remote-tracking branch 'origin/main'

This commit is contained in:
方亮 2025-11-19 09:46:36 +08:00
commit a2c583ed70
25 changed files with 284 additions and 43 deletions

View File

@ -20,6 +20,9 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import static com.bonus.bmw.utils.OwnPermissionUtil.dealWithPermission;
/**
* 总包工程
@ -42,6 +45,11 @@ public class PmMainProjectController extends BaseController {
@SysLog(title = "总包工程", businessType = OperaType.QUERY, logType = 0, module = "总包工程->总包工程列表")
public TableDataInfo list(PmMainProject pmMainProject) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
org.apache.commons.beanutils.BeanUtils.populate(pmMainProject, map);
}
startPage();
List<PmMainProjectVo> list = pmMainProjectService.selectMainProjectList(pmMainProject);
return getDataTable(list);
@ -63,7 +71,7 @@ public class PmMainProjectController extends BaseController {
if (res>0){
return toAjax(res);
}else {
return error("总包工程重复");
return error("总包工程已经在别的分包商下,请重新命名!");
}
} catch (Exception e) {
@ -101,6 +109,11 @@ public class PmMainProjectController extends BaseController {
@SysLog(title = "总包工程", businessType = OperaType.QUERY, logType = 0, module = "总包工程->总包工程下拉框")
public TableDataInfo listAll(PmMainProject pmMainProject) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
org.apache.commons.beanutils.BeanUtils.populate(pmMainProject, map);
}
List<PmMainProjectVo> list = pmMainProjectService.selectMainProjectListAll(pmMainProject);
return getDataTable(list);
} catch (Exception e) {
@ -116,6 +129,11 @@ public class PmMainProjectController extends BaseController {
@SysLog(title = "总包工程", businessType = OperaType.EXPORT, logType = 0, module = "总包工程->导出总包工程")
public void export(HttpServletResponse response, PmMainProject pmMainProject) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
org.apache.commons.beanutils.BeanUtils.populate(pmMainProject, map);
}
List<PmMainProjectVo> list = pmMainProjectService.selectMainProjectList(pmMainProject);
ExcelUtil<PmMainProjectVo> util = new ExcelUtil<PmMainProjectVo>(PmMainProjectVo.class);
util.exportExcel(response, list, "总包工程");

View File

@ -124,6 +124,11 @@ public class PmProjectController extends BaseController {
@SysLog(title = "标段工程", businessType = OperaType.EXPORT, module = "标段工程->导出标段工程")
public void export(HttpServletResponse response, PmProject pmProject) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
org.apache.commons.beanutils.BeanUtils.populate(pmProject, map);
}
List<PmProjectVo> list = pmProjectService.selectProjectList(pmProject);
ExcelUtil<PmProjectVo> util = new ExcelUtil<PmProjectVo>(PmProjectVo.class);
util.exportExcel(response, list, "标段工程");
@ -139,6 +144,11 @@ public class PmProjectController extends BaseController {
@SysLog(title = "标段工程", businessType = OperaType.QUERY, module = "标段工程->标段工程列表")
public TableDataInfo listAll(PmProject pmProject) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
org.apache.commons.beanutils.BeanUtils.populate(pmProject, map);
}
List<PmProjectVo> list = pmProjectService.selectProjectListAll(pmProject);
return getDataTable(list);
} catch (Exception e) {

View File

@ -25,6 +25,9 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import static com.bonus.bmw.utils.OwnPermissionUtil.dealWithPermission;
/**
* 分包商
@ -47,6 +50,11 @@ public class PmSubController extends BaseController {
@SysLog(title = "分包商管理", businessType = OperaType.QUERY, logType = 0, module = "分包商管理->分包商列表")
public TableDataInfo list(PmSub pmSub) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
org.apache.commons.beanutils.BeanUtils.populate(pmSub, map);
}
startPage();
List<PmSub> list = pmSubService.selectSubList(pmSub);
return getDataTable(list);
@ -108,6 +116,11 @@ public class PmSubController extends BaseController {
@SysLog(title = "分包商管理", businessType = OperaType.QUERY, logType = 0, module = "分包商管理->分包商列表")
public TableDataInfo listAll(PmSub pmSub) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
org.apache.commons.beanutils.BeanUtils.populate(pmSub, map);
}
List<PmSub> list = pmSubService.selectSubListAll(pmSub);
return getDataTable(list);
} catch (Exception e) {
@ -123,6 +136,11 @@ public class PmSubController extends BaseController {
@SysLog(title = "分包商管理", businessType = OperaType.EXPORT, logType = 0, module = "分包商管理->导出分包商")
public void export(HttpServletResponse response, PmSub pmSub) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
org.apache.commons.beanutils.BeanUtils.populate(pmSub, map);
}
List<PmSub> list = pmSubService.selectSubList(pmSub);
ExcelUtil<PmSub> util = new ExcelUtil<PmSub>(PmSub.class);
util.exportExcel(response, list, "分包商");

View File

@ -19,6 +19,9 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import static com.bonus.bmw.utils.OwnPermissionUtil.dealWithPermission;
/**
* 分包班组
@ -41,6 +44,11 @@ public class PmSubTeamController extends BaseController {
@SysLog(title = "分包班组信息管理", businessType = OperaType.QUERY, logType = 0, module = "分包班组信息管理->分包班组信息列表")
public TableDataInfo list(PmSubTeam pmSubTeam) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
org.apache.commons.beanutils.BeanUtils.populate(pmSubTeam, map);
}
startPage();
List<PmSubTeam> list = pmSubTeamService.selectSubTeamList(pmSubTeam);
return getDataTable(list);
@ -99,6 +107,11 @@ public class PmSubTeamController extends BaseController {
@SysLog(title = "分包班组信息", businessType = OperaType.EXPORT, logType = 0, module = "分包班组信息->导出分包班组信息")
public void export(HttpServletResponse response, PmSubTeam pmSubTeam) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
org.apache.commons.beanutils.BeanUtils.populate(pmSubTeam, map);
}
List<PmSubTeam> list = pmSubTeamService.selectSubTeamList(pmSubTeam);
ExcelUtil<PmSubTeam> util = new ExcelUtil<PmSubTeam>(PmSubTeam.class);
util.exportExcel(response, list, "分包班组信息");
@ -114,6 +127,11 @@ public class PmSubTeamController extends BaseController {
@SysLog(title = "分包班组信息管理", businessType = OperaType.QUERY, logType = 0, module = "分包班组信息管理->分包班组信息列表")
public TableDataInfo listAll(PmSubTeam pmSubTeam) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
org.apache.commons.beanutils.BeanUtils.populate(pmSubTeam, map);
}
List<PmSubTeam> list = pmSubTeamService.selectSubTeamListAll(pmSubTeam);
return getDataTable(list);
} catch (Exception e) {

View File

@ -29,6 +29,9 @@ import java.io.OutputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import static com.bonus.bmw.utils.OwnPermissionUtil.dealWithPermission;
/**
* 工程统计
@ -53,6 +56,11 @@ public class ProStatisticsController extends BaseController {
@SysLog(title = "工程统计", businessType = OperaType.QUERY, logType = 0, module = "工程统计->工程统计", details = "工程统计")
public TableDataInfo getProStatisticsTable(HomePagePo o) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
org.apache.commons.beanutils.BeanUtils.populate(o, map);
}
startPage();
List<HomePageSubProVo> list = service.getProStatisticsTable(o);
return getDataTable(list);
@ -71,6 +79,11 @@ public class ProStatisticsController extends BaseController {
@SysLog(title = "工程统计", businessType = OperaType.QUERY, logType = 0, module = "工程统计->工程统计", details = "工程统计")
public void exportWorkerStatisticsTable(HttpServletResponse response, HomePagePo o) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
org.apache.commons.beanutils.BeanUtils.populate(o, map);
}
ExcelUtil<HomePageSubProVo> util = new ExcelUtil<>(HomePageSubProVo.class);
List<HomePageSubProVo> list = service.getProStatisticsTable(o);
if (list.size()>0){

View File

@ -1,27 +1,20 @@
package com.bonus.bmw.controller;
import com.bonus.bmw.domain.po.MapBeanPo;
import com.bonus.bmw.domain.po.PmOrg;
import com.bonus.bmw.domain.vo.MapBeanVo;
import com.bonus.bmw.domain.vo.PmOrgVo;
import com.bonus.bmw.service.PmOrgService;
import com.bonus.bmw.service.SelectService;
import com.bonus.common.core.utils.poi.ExcelUtil;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.web.page.TableDataInfo;
import com.bonus.common.log.annotation.SysLog;
import com.bonus.common.log.enums.OperaType;
import com.bonus.common.security.annotation.InnerAuth;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.common.security.annotation.RequiresPermissionsOrInnerAuth;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
/**
@ -84,4 +77,35 @@ public class SelectController extends BaseController {
}
/**
* 查询分公司下拉框
*/
@PostMapping(" /selectSubCom")
@SysLog(title = "分公司查询", businessType = OperaType.UPDATE, logType = 0, module = "下拉选公用类->分公司")
public AjaxResult selectSubCom(@Validated @RequestBody MapBeanPo po) {
try {
List<MapBeanVo> list = service.selectSubCom(po);
return new AjaxResult(200,"查询成功",list);
} catch (Exception e) {
logger.error(e.toString(), e);
}
return error("系统异常,请联系管理员");
}
/**
* 查询分公司下拉框
*/
@PostMapping("/selectOrg")
@SysLog(title = "分公司查询", businessType = OperaType.UPDATE, logType = 0, module = "下拉选公用类->分公司")
public AjaxResult selectOrg(@Validated @RequestBody MapBeanPo po) {
try {
List<MapBeanVo> list = service.selectOrg(po);
return new AjaxResult(200,"查询成功",list);
} catch (Exception e) {
logger.error(e.toString(), e);
}
return error("系统异常,请联系管理员");
}
}

View File

@ -29,6 +29,9 @@ import java.io.OutputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import static com.bonus.bmw.utils.OwnPermissionUtil.dealWithPermission;
/**
* 分包统计
@ -52,6 +55,11 @@ public class SubStatisticsController extends BaseController {
@SysLog(title = "分包统计列表", businessType = OperaType.QUERY, logType = 0, module = "分包统计->分包统计列表", details = "分包统计列表")
public TableDataInfo getSubStatisticsTable(HomePagePo homePagePo) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
org.apache.commons.beanutils.BeanUtils.populate(homePagePo, map);
}
startPage();
List<PmSub> list = subStatisticsService.getSubStatisticsTable(homePagePo);
return getDataTable(list);
@ -70,6 +78,11 @@ public class SubStatisticsController extends BaseController {
@SysLog(title = "工程统计", businessType = OperaType.QUERY, logType = 0, module = "工程统计->工程统计", details = "工程统计")
public void exportWorkerStatisticsTable(HttpServletResponse response, HomePagePo homePagePo) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
org.apache.commons.beanutils.BeanUtils.populate(homePagePo, map);
}
List<PmSub> list = subStatisticsService.getSubStatisticsTable(homePagePo);
List<PmSubExport> PmSubExportList = new ArrayList<>();
for (PmSub dto : list) {

View File

@ -19,6 +19,8 @@ public class MapBeanPo {
private Integer workerId;
private Integer comId;
public MapBeanPo(Integer id, String name) {
this.id = id;
this.name = name;

View File

@ -1,12 +1,9 @@
package com.bonus.bmw.domain.po;
import com.bonus.bmw.domain.vo.PmProjectVo;
import com.bonus.common.core.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* @author 马三炮
@ -66,4 +63,21 @@ public class PmMainProject {
*关键字搜索
*/
private String keyWord;
/**
* 分公司id
*/
private String subComId;
/**
* 分公司名称
*/
private String subComName;
/**
* 项目部id
*/
private String orgId;
}

View File

@ -130,4 +130,9 @@ public class PmSub {
* 在场人数
*/
private Integer einNum;
/**
* 分公司id
*/
private String subComId;
}

View File

@ -84,4 +84,9 @@ public class PmSubTeam {
* 关键字
*/
private String keyWord;
/**
* 分公司id
*/
private Integer subComId;
}

View File

@ -67,4 +67,18 @@ public class PmMainProjectVo {
* 标段工程
*/
private List<PmProjectVo> pmProjectVoList;
/**
* 分公司id
*/
private String subComId;
/**
* 分公司名称
*/
private String subComName;
/**
* 项目部id
*/
private String orgId;
}

View File

@ -1,9 +1,7 @@
package com.bonus.bmw.mapper;
import com.bonus.bmw.domain.po.MapBeanPo;
import com.bonus.bmw.domain.po.PmOrg;
import com.bonus.bmw.domain.vo.MapBeanVo;
import com.bonus.bmw.domain.vo.PmOrgVo;
import java.util.List;
@ -30,4 +28,18 @@ public interface SelectMapper {
* @return
*/
List<MapBeanVo> selectTeam(MapBeanPo po);
/**
* 查询分公司列表
* @param po
* @return
*/
List<MapBeanVo> selectSubCom(MapBeanPo po);
/**
* 查询项目部列表
* @param po
* @return
*/
List<MapBeanVo> selectOrg(MapBeanPo po);
}

View File

@ -1,9 +1,7 @@
package com.bonus.bmw.service;
import com.bonus.bmw.domain.po.MapBeanPo;
import com.bonus.bmw.domain.po.PmOrg;
import com.bonus.bmw.domain.vo.MapBeanVo;
import com.bonus.bmw.domain.vo.PmOrgVo;
import java.util.List;
@ -29,4 +27,18 @@ public interface SelectService {
* @return
*/
List<MapBeanVo> selectTeam(MapBeanPo po);
/**
* 分公司下拉框
* @param po
* @return
*/
List<MapBeanVo> selectSubCom(MapBeanPo po);
/**
* 项目部下拉框
* @param po
* @return
*/
List<MapBeanVo> selectOrg(MapBeanPo po);
}

View File

@ -74,7 +74,9 @@ public class HomePageSubServiceImpl implements HomePageSubService {
HomePagePmWorkerVo worker = mapper.getWorkerMsgById(o);
if (worker.getId() != null) {
List<UploadFileVo> faceFile = fileUploadUtils.getFileList("", worker.getId().toString(), Constants.FILE_UPLOAD_WORKER, "");
worker.setFacePhoto(faceFile.get(0).getLsUrl());
if(faceFile.size()>0){
worker.setFacePhoto(faceFile.get(0).getLsUrl());
}
}
if (worker.getContractId() != null) {
List<UploadFileVo> contractFile = fileUploadUtils.getFileList("", worker.getContractId().toString(), Constants.FILE_UPLOAD_CONTRACT, "");

View File

@ -1,24 +1,13 @@
package com.bonus.bmw.service.impl;
import com.bonus.bmw.domain.po.MapBeanPo;
import com.bonus.bmw.domain.po.PmOrg;
import com.bonus.bmw.domain.po.PmProject;
import com.bonus.bmw.domain.vo.MapBeanVo;
import com.bonus.bmw.domain.vo.PmOrgVo;
import com.bonus.bmw.domain.vo.PmProjectVo;
import com.bonus.bmw.mapper.PmOrgMapper;
import com.bonus.bmw.mapper.PmProjectMapper;
import com.bonus.bmw.mapper.SelectMapper;
import com.bonus.bmw.service.PmOrgService;
import com.bonus.bmw.service.SelectService;
import com.bonus.common.core.utils.StringUtils;
import com.bonus.common.security.utils.SecurityUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.Date;
import java.util.List;
/**
@ -47,4 +36,14 @@ public class SelectServiceImpl implements SelectService {
public List<MapBeanVo> selectTeam(MapBeanPo po) {
return mapper.selectTeam(po);
}
@Override
public List<MapBeanVo> selectSubCom(MapBeanPo po) {
return mapper.selectSubCom(po);
}
@Override
public List<MapBeanVo> selectOrg(MapBeanPo po) {
return mapper.selectOrg(po);
}
}

View File

@ -33,6 +33,7 @@
<if test="companyName!=null and companyName!= ''">
and company_name LIKE CONCAT('%', #{companyName}, '%')
</if>
order by create_time desc
</select>
<select id="getPmCompanyByCompanyName" resultType="com.bonus.bmw.domain.po.PmCompany">
select id,company_name,is_enable,create_user,update_user,create_time,update_time

View File

@ -2,8 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.bmw.mapper.PmMainProjectMapper">
<insert id="addMainProject" useGeneratedKeys="true" keyProperty="id">
insert into pm_main_project (main_pro_name, vol_level, create_user, update_user, create_time, update_time)
values (#{mainProName}, #{volLevel}, #{createUser}, #{updateUser}, #{createTime}, #{updateTime})
insert into pm_main_project (main_pro_name, vol_level, create_user, update_user, create_time, update_time,sub_com_id)
values (#{mainProName}, #{volLevel}, #{createUser}, #{updateUser}, #{createTime}, #{updateTime},#{subComId})
</insert>
<update id="updateMainProject">
update pm_main_project
@ -20,6 +20,9 @@
<if test="updateTime!= null " >
update_time=#{updateTime},
</if>
<if test="subComId!= null " >
sub_com_id=#{subComId},
</if>
</trim>
where id = #{id}
</update>
@ -29,24 +32,34 @@
<select id="selectMainProjectList" resultType="com.bonus.bmw.domain.vo.PmMainProjectVo">
select id,main_pro_name,vol_level,create_user,update_user,create_time,update_time,pro_status
from pm_main_project where is_active='1'
select pmp.id,pmp.main_pro_name,pmp.vol_level,pmp.create_user,pmp.update_user,pmp.create_time,
pmp.update_time,pmp.pro_status,pmp.sub_com_id,psc.sub_company_name as subComName
from pm_main_project pmp
left join pm_sub_company psc on pmp.sub_com_id = psc.id
where pmp.is_active='1'
<if test="mainProName!=null and mainProName!= ''">
and main_pro_name LIKE CONCAT('%', #{mainProName}, '%')
and pmp.main_pro_name LIKE CONCAT('%', #{mainProName}, '%')
</if>
<if test="subComId!= null " >
and pmp.sub_com_id=#{subComId}
</if>
<if test="keyWord !=null and keyWord!= ''">
and (
main_pro_name like concat('%', #{keyWord}, '%')
or vol_level like concat('%', #{keyWord}, '%')
pmp.main_pro_name like concat('%', #{keyWord}, '%')
or pmp.vol_level like concat('%', #{keyWord}, '%')
)
</if>
order by pmp.create_time desc
</select>
<select id="selectMainProjectByMainProName" resultType="com.bonus.bmw.domain.po.PmMainProject">
select id,main_pro_name,vol_level,create_user,update_user,create_time,update_time,pro_status
select id,main_pro_name,vol_level,create_user,update_user,create_time,update_time,pro_status,sub_com_id
from pm_main_project where is_active='1' and main_pro_name = #{mainProName}
</select>
<select id="selectMainProjectListAll" resultType="com.bonus.bmw.domain.vo.PmMainProjectVo">
select id,main_pro_name
select id,main_pro_name,sub_com_id
from pm_main_project where is_active='1'
<if test="subComId!= null " >
and sub_com_id=#{subComId}
</if>
</select>
</mapper>

View File

@ -199,6 +199,9 @@
pp.pro_name as proName
from pm_project pp
where pp.is_active = '1'
<if test="subComId != null">
and pp.sub_com_id = #{subComId}
</if>
</select>
<select id="getPeoNum" resultType="java.lang.Integer">
select count(1) from bm_worker_ein_pro_record where is_active='1' and pro_id = #{proId} and ein_status!=2

View File

@ -49,6 +49,7 @@
<if test="subComId!=null">
and psc.id = #{subComId}
</if>
order by psc.create_time desc
</select>
<select id="getSubCompanyByCompanyName" resultType="com.bonus.bmw.domain.po.PmSubCompany">
select psc.id as id,
@ -80,6 +81,7 @@
<if test="subComId!=null">
and psc.id = #{subComId}
</if>
order by psc.create_time desc
</select>
</mapper>

View File

@ -3,9 +3,9 @@
<mapper namespace="com.bonus.bmw.mapper.PmSubMapper">
<insert id="addSub" useGeneratedKeys="true" keyProperty="id">
insert into pm_sub (sub_name, legal_person, legal_person_phone,sub_address,business_license,electronic_seal,id_card_front,
id_card_reverse,corporate_seal,sub_ein_status,create_user, update_user, create_time, update_time)
id_card_reverse,corporate_seal,sub_ein_status,create_user, update_user, create_time, update_time,sub_com_id)
values (#{subName}, #{legalPerson},#{legalPersonPhone},#{subAddress},#{businessLicense},#{electronicSeal},#{idCardFront},
#{idCardReverse},#{corporateSeal},#{subEinStatus},#{createUser}, #{updateUser}, #{createTime}, #{updateTime})
#{idCardReverse},#{corporateSeal},#{subEinStatus},#{createUser}, #{updateUser}, #{createTime}, #{updateTime},#{subComId})
</insert>
<update id="updateSub">
update pm_sub
@ -46,6 +46,9 @@
<if test="updateTime!= null " >
update_time=#{updateTime},
</if>
<if test="subComId!= null " >
sub_com_id=#{subComId},
</if>
</trim>
where id = #{id}
@ -65,8 +68,12 @@
id_card_front as idCardFront,
id_card_reverse as idCardReverse,
corporate_seal as corporateSeal,
sub_ein_status as subEinStatus
sub_ein_status as subEinStatus,
sub_com_id as subComId
from pm_sub where is_active='1'
<if test="subComId!= null " >
and sub_com_id=#{subComId}
</if>
<if test="keyWord !=null and keyWord!= ''" >
and (
sub_name like concat('%', #{keyWord}, '%')
@ -84,6 +91,9 @@
<select id="selectSubListAll" resultType="com.bonus.bmw.domain.po.PmSub">
select id,sub_name
from pm_sub where is_active='1'
<if test="subComId!= null " >
and sub_com_id=#{subComId}
</if>
</select>
<select id="getSublistByProId" resultType="com.bonus.bmw.domain.po.PmSub">
select ps.id as id,ps.sub_name as subName

View File

@ -44,6 +44,9 @@
from pm_sub_team pst
left join pm_sub ps on ps.id = pst.sub_id
where pst.is_active = '1'
<if test="subComId!= null " >
and ps.sub_com_id=#{subComId}
</if>
<if test="keyWord !=null and keyWord!= ''" >
and (
ps.sub_name like concat('%', #{keyWord}, '%')

View File

@ -53,6 +53,9 @@
<if test="proId != null">
AND pp.id = #{proId}
</if>
<if test="subComId != null">
AND pp.sub_com_id = #{subComId}
</if>
GROUP BY
pp.id
</select>

View File

@ -66,4 +66,28 @@
</if>
</where>
</select>
<select id="selectSubCom" resultType="com.bonus.bmw.domain.vo.MapBeanVo">
select
distinct
psc.id,
psc.sub_company_name as `name`
from pm_sub_company psc where psc.is_active = 1
<if test="subComId != null">
and psc.id = #{subComId}
</if>
<if test="comId != null">
and psc.com_id = #{comId}
</if>
</select>
<select id="selectOrg" resultType="com.bonus.bmw.domain.vo.MapBeanVo">
select
distinct
psc.id,
psc.org_name as `name`
from pm_org po where po.is_active = 1
<if test="subComId != null">
and po.sub_com_id = #{subComId}
</if>
</select>
</mapper>

View File

@ -21,6 +21,9 @@
<if test="subId !=null " >
and ps.id =#{subId}
</if>
<if test="subComId != null">
AND ps.sub_com_id = #{subComId}
</if>
GROUP BY
ps.id
</select>