任务,服务公司列表

This commit is contained in:
mx 2024-09-26 11:18:22 +08:00
parent 52e23f5bfb
commit 38cf44de52
18 changed files with 175 additions and 45 deletions

View File

@ -4,8 +4,10 @@ import java.util.List;
import cn.dev33.satoken.annotation.SaIgnore; import cn.dev33.satoken.annotation.SaIgnore;
import com.pusong.business.domain.bo.PsCompanyQueryBo; import com.pusong.business.domain.bo.PsCompanyQueryBo;
import com.pusong.business.domain.bo.PsCustomRecordQueryBo;
import com.pusong.business.domain.vo.PsCompanyQueryVo; import com.pusong.business.domain.vo.PsCompanyQueryVo;
import com.pusong.business.domain.vo.PsContractInfoVo; import com.pusong.business.domain.vo.PsContractInfoVo;
import com.pusong.business.domain.vo.PsCustomerRecordVo;
import com.pusong.common.core.validate.QueryGroup; import com.pusong.common.core.validate.QueryGroup;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
@ -61,6 +63,16 @@ public class PsCompanyInfoController extends BaseController {
return psCompanyInfoService.queryPageList(bo,pageQuery); return psCompanyInfoService.queryPageList(bo,pageQuery);
} }
/**
* 服务公司列表
*/
@SaCheckPermission("business:customInfo:list")
@Log(title = "服务公司列表" )
@GetMapping("/serviceList")
public TableDataInfo<PsCompanyQueryVo> serviceList(PsCompanyQueryBo queryBo, PageQuery pageQuery) {
return psCompanyInfoService.queryServiceCompany(queryBo, pageQuery);
}
/** /**
* 新增公司信息 * 新增公司信息

View File

@ -57,13 +57,6 @@ public class PsContractInfoController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PostMapping("/create") @PostMapping("/create")
public R<Long> add(@Validated(AddGroup.class) @RequestBody PsContractInfoBo bo) { public R<Long> add(@Validated(AddGroup.class) @RequestBody PsContractInfoBo bo) {
if (bo.getFirstPartyType() == PsContractInfoBo.FIRSTPARTYTYPE.INDIVIDUALS.getType()){
bo.setContactPersonName(bo.getCompanyInfoBo().getLegalPersonName());
bo.setContactPersonPhone(bo.getCompanyInfoBo().getLegalPersonPhone());
bo.setContactPersonIdcard(bo.getCompanyInfoBo().getLegalPersonIdcard());
bo.setCompanyInfoBo(null);
}
return R.ok(psContractInfoService.createContract(bo,2)); return R.ok(psContractInfoService.createContract(bo,2));
} }
/** /**

View File

@ -136,7 +136,7 @@ public class PsCustomController extends BaseController {
/** /**
* 已完成客户 * 已完成客户,, 废弃
* @param queryBo 查询 * @param queryBo 查询
* @return * @return
*/ */
@ -148,7 +148,6 @@ public class PsCustomController extends BaseController {
} }
/** /**
* 移出黑名单 * 移出黑名单
* @param customerId 客户id * @param customerId 客户id

View File

@ -179,7 +179,7 @@ public class PsTaskController extends BaseController {
@GetMapping("/cancel") @GetMapping("/cancel")
@RepeatSubmit() @RepeatSubmit()
public R<Void> taskReset(@NotNull("任务id不能为空") Long id,@NotNull("作废原因不能为空") String desc) { public R<Void> taskReset(@NotNull("任务id不能为空") Long id,@NotNull("作废原因不能为空") String desc) {
psTaskMainService.cancel(id,desc); psTaskMainService.cancel(id, desc);
return R.ok(); return R.ok();
} }

View File

@ -93,4 +93,9 @@ public class PsTaskMain extends TenantEntity {
* 服务公司id * 服务公司id
*/ */
private Long serviceCompanyId; private Long serviceCompanyId;
/**
* 备注作废备注
*/
private String comment;
} }

View File

@ -32,7 +32,7 @@ public class AppointBo {
private String appointType; private String appointType;
/** /**
* 任务委派类型1内勤,2外勤,3特勤 * 任务说明
*/ */
private String taskContentDesc; private String taskContentDesc;
} }

View File

@ -48,4 +48,14 @@ public class PsCompanyQueryBo {
* 介绍人名称 * 介绍人名称
*/ */
private String customIntroducer; private String customIntroducer;
/**
* 服务状态
*/
private String serviceStatus;
/**
* 跟进人员
*/
private String followUser;
} }

View File

@ -10,6 +10,9 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.pusong.common.excel.annotation.ExcelDictFormat; import com.pusong.common.excel.annotation.ExcelDictFormat;
import com.pusong.common.excel.convert.ExcelDictConvert; import com.pusong.common.excel.convert.ExcelDictConvert;
import com.pusong.common.translation.annotation.Translation;
import com.pusong.common.translation.constant.TransConstant;
import com.pusong.system.domain.SysUser;
import io.github.linpeilie.annotations.AutoMapper; import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data; import lombok.Data;
@ -49,7 +52,7 @@ public class PsCompanyInfoVo implements Serializable {
private String companyName; private String companyName;
/** /**
* 公司地址 * 公司地址,所属区域
*/ */
private String companyAdress; private String companyAdress;
@ -153,7 +156,6 @@ public class PsCompanyInfoVo implements Serializable {
*/ */
private List<PsContractBusinessVo> businessVoList; private List<PsContractBusinessVo> businessVoList;
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
private Date startServiceDate; private Date startServiceDate;
@ -167,4 +169,34 @@ public class PsCompanyInfoVo implements Serializable {
* 是否老账新接 * 是否老账新接
*/ */
private String isOld; private String isOld;
/**
* 跟进人员
*/
private List<SysUser> followUsers;
/**
* 客户姓名
*/
private String customName;
/**
* 客户手机号
*/
private String customMobile;
/**
* 销售经理
*/
@Translation(type = TransConstant.USER_ID_TO_NICKNAME)
private Long customManager;
/**
* 服务状态
*/
private Integer serviceStatus;
/**
* 服务状态
*/
private String terminationReason;
} }

View File

@ -60,11 +60,16 @@ public class PsTaskAppointVo implements Serializable {
/** /**
* 任务执行者 * 任务执行者
*/ */
@Translation(type = TransConstant.USER_ID_TO_NICKNAME,mapper = "executor") @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "executor")
private String executorName; private String executorName;
/** /**
* 任务备注 * 任务备注
*/ */
private String taskDesc; private String taskDesc;
/**
* 工作说明
*/
private String taskContentDesc;
} }

View File

@ -2,6 +2,7 @@ package com.pusong.business.domain.vo;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.pusong.business.domain.PsTaskAppoint;
import com.pusong.business.domain.PsTaskMain; import com.pusong.business.domain.PsTaskMain;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.pusong.common.excel.annotation.ExcelDictFormat; import com.pusong.common.excel.annotation.ExcelDictFormat;
@ -130,12 +131,17 @@ public class PsTaskMainVo implements Serializable {
*/ */
private String secAppo; private String secAppo;
/** /**
* 任务备注 * 任务备注,子任务里的备注queryChildTaskPageList查询的时候存储到这个字段了
*/ */
private String taskDesc; private String taskDesc;
/** /**
* 任务备注 * 任务备注存储了作废原因
*/
private String comment;
/**
* 任务备注,子任务里的工作内容描述queryChildTaskPageList查询的时候存储到这个字段了
*/ */
private String taskContentDesc; private String taskContentDesc;
@ -148,5 +154,18 @@ public class PsTaskMainVo implements Serializable {
* 发票信息 * 发票信息
*/ */
private PsInvoiceVo psInvoiceVo; private PsInvoiceVo psInvoiceVo;
/**
* 服务公司信息
*/
private PsCompanyInfoVo psCompanySerivceVo;
/**
* 服务公司id
*/
private Long serviceCompanyId;
private List<PsTaskAppointVo> psTaskAppointVoList;
} }

View File

@ -24,4 +24,6 @@ public interface PsCompanyInfoMapper extends BaseMapperPlus<PsCompanyInfo, PsCom
Page<PsCompanyQueryVo> selectPageList(@Param("page") Page<PsApproverRecord> page, @Param(Constants.WRAPPER) Wrapper<PsCompanyInfo> queryWrapper); Page<PsCompanyQueryVo> selectPageList(@Param("page") Page<PsApproverRecord> page, @Param(Constants.WRAPPER) Wrapper<PsCompanyInfo> queryWrapper);
List<PsCompanyInfoVo> selectServiceCompanyList(@Param(Constants.WRAPPER) Wrapper<PsCompanyInfoVo> queryWrapper); List<PsCompanyInfoVo> selectServiceCompanyList(@Param(Constants.WRAPPER) Wrapper<PsCompanyInfoVo> queryWrapper);
} }

View File

@ -41,6 +41,9 @@ public interface IPsCompanyInfoService {
*/ */
TableDataInfo<PsCompanyQueryVo> queryPageList(PsCompanyQueryBo bo, PageQuery pageQuery); TableDataInfo<PsCompanyQueryVo> queryPageList(PsCompanyQueryBo bo, PageQuery pageQuery);
TableDataInfo<PsCompanyQueryVo> queryServiceCompany(PsCompanyQueryBo bo, PageQuery pageQuery);
/** /**
* 新增公司信息 * 新增公司信息
* *

View File

@ -45,6 +45,7 @@ public class TaskCancellaApproverServiceImpl extends ApproverAbstractServiceImpl
//主任务作废 //主任务作废
PsTaskMain info = taskMainMapper.selectById(psApproverRecord.getBusinessId()); PsTaskMain info = taskMainMapper.selectById(psApproverRecord.getBusinessId());
info.setTaskStatus(TaskStatusEnum.CANCEL.getCode()); info.setTaskStatus(TaskStatusEnum.CANCEL.getCode());
info.setComment(psApproverRecord.getApplyDesc());
taskMainMapper.updateById(info); taskMainMapper.updateById(info);
List<PsTaskAppoint> list = taskAppointMapper.selectList(Wrappers.<PsTaskAppoint>lambdaQuery().eq(PsTaskAppoint::getTaskId, info.getId())); List<PsTaskAppoint> list = taskAppointMapper.selectList(Wrappers.<PsTaskAppoint>lambdaQuery().eq(PsTaskAppoint::getTaskId, info.getId()));

View File

@ -81,13 +81,30 @@ public class PsCompanyInfoServiceImpl implements IPsCompanyInfoService {
lqw.like(bo.getCustomName() != null,"cus.custom_name",bo.getCustomName()); lqw.like(bo.getCustomName() != null,"cus.custom_name",bo.getCustomName());
lqw.like(bo.getCustomMobile() != null,"cus.custom_mobile",bo.getCustomMobile()); lqw.like(bo.getCustomMobile() != null,"cus.custom_mobile",bo.getCustomMobile());
lqw.like(bo.getCompanyName() != null,"com.company_name",bo.getCompanyName()); lqw.like(bo.getCompanyName() != null,"com.company_name",bo.getCompanyName());
lqw.like(bo.getCompanyName() != null,"com.company_name",bo.getCompanyName());
lqw.like(bo.getCustomIntroducer() != null,"cusi.custom_name",bo.getCustomIntroducer()); lqw.like(bo.getCustomIntroducer() != null,"cusi.custom_name",bo.getCustomIntroducer());
Page<PsCompanyQueryVo> result = baseMapper.selectPageList(pageQuery.build(), lqw); Page<PsCompanyQueryVo> result = baseMapper.selectPageList(pageQuery.build(), lqw);
return TableDataInfo.build(result); return TableDataInfo.build(result);
} }
/**
* 查询符合条件的公司信息列表
*
* @param bo 查询条件
* @return 公司信息列表
*/
public TableDataInfo<PsCompanyQueryVo> queryServiceCompany(PsCompanyQueryBo bo, PageQuery pageQuery){
QueryWrapper<PsCompanyInfo> lqw = Wrappers.query();
lqw.exists(StringUtils.isNotBlank(bo.getCustomManagerName()),"select 1 from sys_user su where su.user_id = cus.custom_manager and su.nick_name like '%"+bo.getCustomManagerName()+"%'");
lqw.eq(bo.getId() != null,"com.id",bo.getId());
lqw.like(bo.getCustomName() != null,"cus.custom_name",bo.getCustomName());
lqw.like(bo.getCustomMobile() != null,"cus.custom_mobile",bo.getCustomMobile());
lqw.like(bo.getCompanyName() != null,"com.company_name",bo.getCompanyName());
lqw.eq(bo.getServiceStatus() != null,"com.service_status",bo.getServiceStatus());
lqw.exists(StringUtils.isNotBlank(bo.getFollowUser()),"select 1 from sys_user fsu where fsu.user_id = cf.user_id and fsu.nick_name like '%"+bo.getFollowUser()+"%'");
Page<PsCompanyQueryVo> result = baseMapper.selectPageList(pageQuery.build(), lqw);
return TableDataInfo.build(result);
}
private LambdaQueryWrapper<PsCompanyInfo> buildQueryWrapper(PsCompanyInfoBo bo) { private LambdaQueryWrapper<PsCompanyInfo> buildQueryWrapper(PsCompanyInfoBo bo) {
LambdaQueryWrapper<PsCompanyInfo> lqw = Wrappers.lambdaQuery(); LambdaQueryWrapper<PsCompanyInfo> lqw = Wrappers.lambdaQuery();
lqw.eq(bo.getId() != null, PsCompanyInfo::getId, bo.getId()); lqw.eq(bo.getId() != null, PsCompanyInfo::getId, bo.getId());
@ -201,4 +218,6 @@ public class PsCompanyInfoServiceImpl implements IPsCompanyInfoService {
} }
return list; return list;
} }
} }

View File

@ -95,6 +95,13 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
@Override @Override
@Transactional//开启事务 @Transactional//开启事务
public Long createContract(PsContractInfoBo bo, Integer type) { public Long createContract(PsContractInfoBo bo, Integer type) {
if (bo.getFirstPartyType() == PsContractInfoBo.FIRSTPARTYTYPE.INDIVIDUALS.getType()){
bo.setContactPersonName(bo.getCompanyInfoBo().getLegalPersonName());
bo.setContactPersonPhone(bo.getCompanyInfoBo().getLegalPersonPhone());
bo.setContactPersonIdcard(bo.getCompanyInfoBo().getLegalPersonIdcard());
// bo.setCompanyInfoBo(null);
}
//1校验 //1校验
PsContractInfo add = validEntity(bo, UserConstants.YES); PsContractInfo add = validEntity(bo, UserConstants.YES);

View File

@ -118,7 +118,11 @@ public class PsTaskServiceImpl implements IPsTaskService {
vo.setNumOfDat(DateUtils.calWorkDate(vo.getStartDate(),new Date())); vo.setNumOfDat(DateUtils.calWorkDate(vo.getStartDate(),new Date()));
} }
//任务作废审批 //任务作废审批
vo.setTaskStatusDesc(approverRecordService.getLastFail(vo.getId()+"",null,List.of(ApproverTypeEnum.TASKCANCE.getCode()))); vo.setTaskStatusDesc(approverRecordService.getLastFail(vo.getId() + "",null,List.of(ApproverTypeEnum.TASKCANCE.getCode())));
//装填服务公司信息
PsCompanyInfoVo serviceCompany = companyInfoService.queryById(vo.getServiceCompanyId());
vo.setPsCompanySerivceVo(serviceCompany);
} }
return TableDataInfo.build(page); return TableDataInfo.build(page);
} }
@ -367,9 +371,11 @@ public class PsTaskServiceImpl implements IPsTaskService {
if(!AppointStatusEnum.canFinish(appoint.getAppointStatus())){ if(!AppointStatusEnum.canFinish(appoint.getAppointStatus())){
throw new ServiceException("此任务无法执行此操作,请刷新页面后重新操作"); throw new ServiceException("此任务无法执行此操作,请刷新页面后重新操作");
} }
ApproverService service = approverContainer.getService(ApproverTypeEnum.TASKFINISH.getCode()); // ApproverService service = approverContainer.getService(ApproverTypeEnum.TASKFINISH.getCode());
service.apply(id+"",appoint.getContractCode(),desc,appoint.getAppointType()); // service.apply(id+"",appoint.getContractCode(),desc,appoint.getAppointType());
appoint.setAppointStatus(AppointStatusEnum.OA.getCode()); // appoint.setAppointStatus(AppointStatusEnum.OA.getCode());
appoint.setAppointStatus(TaskStatusEnum.AppointStatusEnum.FINISH.getCode());
appoint.setFinishDate(new Date());
appoint.setTaskDesc(desc); appoint.setTaskDesc(desc);
appointMapper.updateById(appoint); appointMapper.updateById(appoint);
} }
@ -411,14 +417,14 @@ public class PsTaskServiceImpl implements IPsTaskService {
* @param id 任务主表id * @param id 任务主表id
* @param desc 作废原因 * @param desc 作废原因
*/ */
public void cancel(Long id,String desc){ public void cancel(Long id, String desc){
PsTaskMain info = baseMapper.selectById(id); PsTaskMain info = baseMapper.selectById(id);
if(!StringUtils.equals(TaskTypeEnum.FREE.getCode(),info.getTaskType())){ if(!StringUtils.equals(TaskTypeEnum.FREE.getCode(),info.getTaskType())){
throw new ServiceException("只有免费工单的任务可以作废"); throw new ServiceException("只有免费工单的任务可以作废");
} }
//发起审批 //发起审批
ApproverService service = approverContainer.getService(ApproverTypeEnum.TASKCANCE.getCode()); ApproverService service = approverContainer.getService(ApproverTypeEnum.TASKCANCE.getCode());
service.apply(id+"",info.getContractCode(),null,info.getTaskStatus()); service.apply(id+"", info.getContractCode(),desc, info.getTaskStatus());
//修改状态为审批中 //修改状态为审批中
info.setTaskStatus(TaskStatusEnum.CANCELAPPO.getCode()); info.setTaskStatus(TaskStatusEnum.CANCELAPPO.getCode());
baseMapper.updateById(info); baseMapper.updateById(info);

View File

@ -11,26 +11,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</collection> </collection>
</collection> </collection>
<collection columnPrefix="fu_" property="followUsers" ofType="com.pusong.system.domain.vo.SysUserVo" >
</collection>
</resultMap> </resultMap>
<select id="selectPageList" resultType="com.pusong.business.domain.vo.PsCompanyQueryVo"> <select id="selectPageList" resultMap="serviceCompanyServiceResult">
select cus.custom_manager, select
com.company_name, com.*,
com.customer_num, cus.custom_manager,
com.legal_person_name,
com.legal_person_idcard,
cus.custom_name, cus.custom_name,
cus.custom_mobile, cus.custom_mobile,
cusi.custom_name custom_introducer, cusi.custom_name custom_introducer,
com.create_time usr.user_id fu_user_id,
usr.nick_name fu_nick_name
from ps_company_info com from ps_company_info com
left join ps_custom_info cus on com.custom_id = cus.id left join ps_custom_info cus on com.custom_id = cus.id
left join ps_custom_info cusi on cus.custom_introducer = cusi.id left join ps_custom_info cusi on cus.custom_introducer = cusi.id
left join ps_company_follow cf on com.id = cf.company_id
left join sys_user usr on cf.user_id = usr.user_id
${ew.getCustomSqlSegment} ${ew.getCustomSqlSegment}
</select> </select>
<select id="selectServiceCompanyList" resultMap="serviceCompanyServiceResult"> <select id="selectServiceCompanyList" resultMap="serviceCompanyServiceResult">
select com.*, select com.*,
bus.business_amount bus_business_amount, bus.business_amount bus_business_amount,
@ -58,4 +65,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
${ew.getCustomSqlSegment} ${ew.getCustomSqlSegment}
</select> </select>
</mapper> </mapper>

View File

@ -11,6 +11,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</collection> </collection>
<collection columnPrefix="cus_" property="customInfoVo" ofType="com.pusong.business.domain.vo.PsCustomInfoVo" > <collection columnPrefix="cus_" property="customInfoVo" ofType="com.pusong.business.domain.vo.PsCustomInfoVo" >
</collection> </collection>
<collection columnPrefix="appoint_" property="psTaskAppointVoList" ofType="com.pusong.business.domain.vo.PsTaskAppointVo" >
</collection>
</resultMap> </resultMap>
@ -22,6 +24,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
main.contract_code, main.contract_code,
main.invoice, main.invoice,
main.extend, main.extend,
main.comment,
main.service_company_id,
con.is_proxy con_is_proxy, con.is_proxy con_is_proxy,
con.apply_date con_apply_date, con.apply_date con_apply_date,
con.is_due con_is_due, con.is_due con_is_due,
@ -44,6 +48,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
cus.id cus_id, cus.id cus_id,
cus.custom_name cus_custom_name , cus.custom_name cus_custom_name ,
cus.custom_mobile cus_custom_mobile, cus.custom_mobile cus_custom_mobile,
appoint.executor appoint_executor,
appoint.task_desc appoint_task_desc,
appoint.task_content_desc appoint_task_content_desc,
appoint.appoint_type appoint_appoint_type,
appoint.appoint_status appoint_appoint_status,
(select pta.id from ps_task_appoint pta where pta.task_id=main.id and pta.appoint_type=1 and pta.appoint_status != '50' and pta.del_flag = '0' order by id desc limit 0,1) as inAppo, (select pta.id from ps_task_appoint pta where pta.task_id=main.id and pta.appoint_type=1 and pta.appoint_status != '50' and pta.del_flag = '0' order by id desc limit 0,1) as inAppo,
(select pta.id from ps_task_appoint pta where pta.task_id=main.id and pta.appoint_type=2 and pta.appoint_status != '50' and pta.del_flag = '0' order by id desc limit 0,1) as outAppo, (select pta.id from ps_task_appoint pta where pta.task_id=main.id and pta.appoint_type=2 and pta.appoint_status != '50' and pta.del_flag = '0' order by id desc limit 0,1) as outAppo,
(select pta.id from ps_task_appoint pta where pta.task_id=main.id and pta.appoint_type=3 and pta.appoint_status != '50' and pta.del_flag = '0' order by id desc limit 0,1) as secAppo, (select pta.id from ps_task_appoint pta where pta.task_id=main.id and pta.appoint_type=3 and pta.appoint_status != '50' and pta.del_flag = '0' order by id desc limit 0,1) as secAppo,
@ -51,15 +60,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(select IFNULL(sum(money),0) from ps_contract_pay pay where pay.business_type =1 and pay.contract_code = main.contract_code and pay.pay_status = '1' ) + (select IFNULL(sum(money),0) from ps_contract_pay pay where pay.business_type =1 and pay.contract_code = main.contract_code and pay.pay_status = '1' ) +
(select IFNULL(sum(money),0) from ps_contract_pay cpay where cpay.business_type =2 and cpay.contract_code = main.contract_code ) (select IFNULL(sum(money),0) from ps_contract_pay cpay where cpay.business_type =2 and cpay.contract_code = main.contract_code )
) > 0 THEN '半款' ELSE '全款' END) as pay_stauts_desc, ) > 0 THEN '半款' ELSE '全款' END) as pay_stauts_desc,
(select GROUP_CONCAT(appoint.executor SEPARATOR ',') -- (select GROUP_CONCAT(appoint.executor SEPARATOR ',') from ps_task_appoint appoint where appoint.task_id = main.id and appoint.appoint_status != '50' and appoint.del_flag = '0') as executors,
from ps_task_appoint appoint where appoint.task_id = main.id and appoint.appoint_status != '50' and appoint.del_flag = '0') as executors, -- (select GROUP_CONCAT(appoint.task_desc SEPARATOR ',') from ps_task_appoint appoint where appoint.task_id = main.id and appoint.appoint_status != '50' and appoint.del_flag = '0') as taskDesc,
(select GROUP_CONCAT(business.business_type SEPARATOR ',') (select GROUP_CONCAT(business.business_type SEPARATOR ',') from ps_contract_business business where business.contract_code = con.contract_code and business.company_id = main.service_company_id and business.del_flag = '0') as business_type_name
from ps_contract_business business where business.contract_code = con.contract_code and business.company_id = main.service_company_id and business.del_flag = '0') as business_type_name
from ps_task_main main from ps_task_main main
left join ps_contract_info con on main.contract_code = con.contract_code left join ps_contract_info con on main.contract_code = con.contract_code
left join ps_company_info com on con.company_id = com.id left join ps_company_info com on con.company_id = com.id
left join ps_custom_info cus on con.custom_id = cus.id left join ps_custom_info cus on con.custom_id = cus.id
left join sys_user usr on con.custom_manager = usr.user_id left join sys_user usr on con.custom_manager = usr.user_id
left join ps_task_appoint appoint on appoint.task_id = main.id and appoint.appoint_status != '50' and appoint.del_flag = '0'
</sql> </sql>
<select id="queryTaskPageList" resultMap="taskMainResult"> <select id="queryTaskPageList" resultMap="taskMainResult">
<include refid="queryTask"/> <include refid="queryTask"/>
@ -103,14 +112,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
appo.id, appo.id,
appo.task_desc, appo.task_desc,
appo.task_content_desc, appo.task_content_desc,
(select GROUP_CONCAT(business.business_type SEPARATOR ',') (select GROUP_CONCAT(business.business_type SEPARATOR ',') from ps_contract_business business where business.contract_code = con.contract_code and business.del_flag = '0') as business_type_name
from ps_contract_business business where business.contract_code = con.contract_code and business.del_flag = '0') as business_type_name
from ps_task_appoint appo from ps_task_appoint appo
left join ps_task_main main on appo.task_id = main.id and appo.appoint_status != '50' left join ps_task_main main on appo.task_id = main.id and appo.appoint_status != '50'
left join ps_contract_info con on main.contract_code = con.contract_code left join ps_contract_info con on main.contract_code = con.contract_code
left join ps_company_info com on con.company_id = com.id left join ps_company_info com on con.company_id = com.id
left join ps_custom_info cus on con.custom_id = cus.id left join ps_custom_info cus on con.custom_id = cus.id
left join sys_user usr on con.custom_manager = usr.user_id left join sys_user usr on con.custom_manager = usr.user_id
${ew.getCustomSqlSegment} ${ew.getCustomSqlSegment}
</select> </select>