生成合同
This commit is contained in:
parent
a7459e85c1
commit
cd87abc8b5
@ -5,6 +5,7 @@ import com.pusong.business.domain.bo.AppointBo;
|
||||
import com.pusong.business.domain.bo.MediaCompanySaveBo;
|
||||
import com.pusong.business.domain.bo.PsTaskQueryBo;
|
||||
import com.pusong.business.domain.vo.PsTaskAppointVo;
|
||||
import com.pusong.business.domain.vo.TaskPlanVo;
|
||||
import com.pusong.common.core.domain.R;
|
||||
import com.pusong.common.core.validate.QueryGroup;
|
||||
import com.pusong.common.log.annotation.Log;
|
||||
@ -58,6 +59,15 @@ public class PsTaskController extends BaseController {
|
||||
public TableDataInfo<PsTaskMainVo> childList(@Validated(QueryGroup.class) PsTaskQueryBo bo, PageQuery pageQuery) {
|
||||
return psTaskMainService.queryChildPageList(bo, pageQuery);
|
||||
}
|
||||
/**
|
||||
* 根据主任务id查询进度
|
||||
*/
|
||||
@Log(title = "根据主任务id查询进度")
|
||||
@SaCheckPermission("business:task:list")
|
||||
@GetMapping("/plan")
|
||||
public R<TaskPlanVo> plan(@NotNull Long id) {
|
||||
return R.ok(psTaskMainService.plan(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据任务id查询任务的公司信息和资料信息
|
||||
|
@ -45,6 +45,16 @@ public class PsTaskWorkRecordController extends BaseController {
|
||||
return R.ok(psTaskWorkRecordService.queryListByAppointId(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据任务委派id查询工作进度列表
|
||||
*/
|
||||
@Log(title = "根据主任务id查询工作进度列表")
|
||||
@SaCheckPermission("business:taskWorkRecord:listByTaskId")
|
||||
@GetMapping("/listByTaskId")
|
||||
public R<List<PsTaskWorkRecordVo>> listByTaskId(@NotNull Long id) {
|
||||
return R.ok(psTaskWorkRecordService.queryListByTaskId(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增外勤任务记录
|
||||
*/
|
||||
|
@ -2,10 +2,12 @@ package com.pusong.business.domain.bo;
|
||||
|
||||
import com.pusong.system.domain.bo.SysDictDataBo;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.swagger.v3.oas.annotations.media.PatternProperty;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode
|
||||
@ -25,5 +27,5 @@ public class AppointBo {
|
||||
* 任务委派类型(1内勤,2外勤,3特勤)
|
||||
*/
|
||||
@NotBlank
|
||||
private String AppointType;
|
||||
private String appointType;
|
||||
}
|
||||
|
@ -108,4 +108,17 @@ public class PsTaskMainVo implements Serializable {
|
||||
* 发票
|
||||
*/
|
||||
private String invoice;
|
||||
|
||||
/**
|
||||
* 外勤是否派单1是0否
|
||||
*/
|
||||
private String outAppo;
|
||||
/**
|
||||
* 内勤是否派单1是0否
|
||||
*/
|
||||
private String inAppo;
|
||||
/**
|
||||
* 特勤是否派单1是0否
|
||||
*/
|
||||
private String secAppo;
|
||||
}
|
||||
|
@ -9,6 +9,8 @@ import com.pusong.business.domain.PsTaskWorkRecord;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.pusong.common.excel.annotation.ExcelDictFormat;
|
||||
import com.pusong.common.excel.convert.ExcelDictConvert;
|
||||
import com.pusong.common.translation.annotation.Translation;
|
||||
import com.pusong.common.translation.constant.TransConstant;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
@ -83,5 +85,13 @@ public class PsTaskWorkRecordVo implements Serializable {
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 任务执行者
|
||||
*/
|
||||
private Long executor;
|
||||
/**
|
||||
* 任务执行者
|
||||
*/
|
||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME,mapper = "executor")
|
||||
private String executorName;
|
||||
}
|
||||
|
@ -111,6 +111,7 @@ public class TaskContractVo implements Serializable {
|
||||
/**
|
||||
* 所属客户经理姓名
|
||||
*/
|
||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME,mapper = "customManager")
|
||||
private String customManagerName;
|
||||
/**
|
||||
* 签约备注
|
||||
|
@ -63,8 +63,6 @@ public enum TaskStatusEnum {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 委派表状态枚举
|
||||
*/
|
||||
|
@ -7,6 +7,7 @@ import com.pusong.business.domain.bo.MediaCompanySaveBo;
|
||||
import com.pusong.business.domain.bo.PsTaskQueryBo;
|
||||
import com.pusong.business.domain.vo.PsTaskAppointVo;
|
||||
import com.pusong.business.domain.vo.PsTaskMainVo;
|
||||
import com.pusong.business.domain.vo.TaskPlanVo;
|
||||
import com.pusong.common.mybatis.core.page.TableDataInfo;
|
||||
import com.pusong.common.mybatis.core.page.PageQuery;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -56,6 +57,12 @@ public interface IPsTaskService {
|
||||
* @return 公司及资料信息
|
||||
*/
|
||||
PsTaskMainVo queryInfo(Long id);
|
||||
/**
|
||||
* 根据主任务id查询进度
|
||||
*
|
||||
* @param id 任务主表主键
|
||||
*/
|
||||
TaskPlanVo plan(Long id);
|
||||
|
||||
/**
|
||||
* 上传资料和公司信息
|
||||
|
@ -24,6 +24,13 @@ public interface IPsTaskWorkRecordService {
|
||||
*/
|
||||
List<PsTaskWorkRecordVo> queryListByAppointId( Long id);
|
||||
|
||||
/**
|
||||
* 根据主任务id查询工作进度列表
|
||||
*
|
||||
* @param id 任务委派id
|
||||
* @return 外勤任务记录列表
|
||||
*/
|
||||
List<PsTaskWorkRecordVo> queryListByTaskId(Long id);
|
||||
/**
|
||||
* 新增外勤任务记录
|
||||
*
|
||||
|
@ -257,6 +257,7 @@ public class PsCustomInfoServiceImpl implements IPsCustomInfoService {
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
|
||||
public Boolean updateByBo(PsCustomInfoBo bo) {
|
||||
PsCustomInfo update = MapstructUtils.convert(bo, PsCustomInfo.class);
|
||||
validEntityBeforeSave(update);
|
||||
|
@ -121,7 +121,29 @@ public class PsTaskServiceImpl implements IPsTaskService {
|
||||
}
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询主任务进度
|
||||
*
|
||||
* @param id 任务主表主键
|
||||
*/
|
||||
public TaskPlanVo plan(Long id){
|
||||
List<PsTaskAppoint> list = appointMapper.selectList(Wrappers.<PsTaskAppoint>lambdaQuery().eq(PsTaskAppoint::getTaskId, id).eq(PsTaskAppoint::getDelFlag,"0"));
|
||||
TaskPlanVo planVo = new TaskPlanVo();
|
||||
if(CollectionUtils.isEmpty(list)){return planVo;}
|
||||
list.forEach(item->{
|
||||
if(StringUtils.equals("1",item.getAppointType())){
|
||||
planVo.setInExector(item.getExecutor());
|
||||
planVo.setInState(item.getAppointStatus());
|
||||
}else if (StringUtils.equals("2",item.getAppointType())){
|
||||
planVo.setOutExector(item.getExecutor());
|
||||
planVo.setOutState(item.getAppointStatus());
|
||||
}else if (StringUtils.equals("3",item.getAppointType())){
|
||||
planVo.setSecExector(item.getExecutor());
|
||||
planVo.setSecState(item.getAppointStatus());
|
||||
}
|
||||
});
|
||||
return planVo;
|
||||
}
|
||||
/**
|
||||
* 根据任务id查询任务的公司信息和资料信息
|
||||
*
|
||||
@ -227,6 +249,7 @@ public class PsTaskServiceImpl implements IPsTaskService {
|
||||
PsTaskMain update = new PsTaskMain();
|
||||
update.setId(mainTask.getId());
|
||||
update.setTaskStatus(TaskStatusEnum.ING.getCode());
|
||||
update.setStartDate(new Date());
|
||||
baseMapper.updateById(update);
|
||||
}
|
||||
PsTaskAppoint psTaskAppoint = new PsTaskAppoint();
|
||||
@ -332,6 +355,7 @@ public class PsTaskServiceImpl implements IPsTaskService {
|
||||
lqw.eq("main.del_flag","0");
|
||||
lqw.ne("main.task_status",TaskStatusEnum.CANCEL.getCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getType()),"main.task_type",bo.getType());
|
||||
lqw.eq(bo.getId() != null,"main.id",bo.getId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getCompanyName()), "com.company_name", bo.getCompanyName());//公司地址
|
||||
lqw.like(StringUtils.isNotBlank(bo.getCustomerNum()), "com.customer_num", bo.getCustomerNum());//纳税人识别号
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCustomerCert()), "com.customer_cert", bo.getCustomerCert());//纳税人资格
|
||||
|
@ -1,7 +1,10 @@
|
||||
package com.pusong.business.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.pusong.business.domain.PsTaskAppoint;
|
||||
import com.pusong.business.domain.PsTaskMain;
|
||||
import com.pusong.business.mapper.PsTaskAppointMapper;
|
||||
import com.pusong.business.mapper.PsTaskMainMapper;
|
||||
import com.pusong.common.core.utils.MapstructUtils;
|
||||
import com.pusong.common.core.utils.StringUtils;
|
||||
import com.pusong.common.mybatis.core.page.TableDataInfo;
|
||||
@ -17,9 +20,9 @@ import com.pusong.business.domain.PsTaskWorkRecord;
|
||||
import com.pusong.business.mapper.PsTaskWorkRecordMapper;
|
||||
import com.pusong.business.service.IPsTaskWorkRecordService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 外勤任务记录Service业务层处理
|
||||
@ -33,6 +36,7 @@ public class PsTaskWorkRecordServiceImpl implements IPsTaskWorkRecordService {
|
||||
|
||||
private final PsTaskWorkRecordMapper baseMapper;
|
||||
private final PsTaskAppointMapper appointMapper;
|
||||
private final PsTaskMainMapper taskMainMapper;
|
||||
|
||||
|
||||
/**
|
||||
@ -48,6 +52,27 @@ public class PsTaskWorkRecordServiceImpl implements IPsTaskWorkRecordService {
|
||||
lqw.eq(PsTaskWorkRecord::getTaskAppointId,id);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
/**
|
||||
* 根据主任务id查询工作进度列表
|
||||
*
|
||||
* @param id 任务委派id
|
||||
* @return 外勤任务记录列表
|
||||
*/
|
||||
@Override
|
||||
public List<PsTaskWorkRecordVo> queryListByTaskId(Long id) {
|
||||
List<PsTaskAppoint> list = appointMapper.selectList(Wrappers.<PsTaskAppoint>lambdaQuery().eq(PsTaskAppoint::getTaskId, id).eq(PsTaskAppoint::getAppointType, 2));
|
||||
if(CollectionUtils.isEmpty(list)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
//转map
|
||||
Map<Long, PsTaskAppoint> map = list.stream().collect(Collectors.toMap(PsTaskAppoint::getId, Function.identity()));
|
||||
List<PsTaskWorkRecordVo> lis = baseMapper.selectVoList(Wrappers.<PsTaskWorkRecord>lambdaQuery()
|
||||
.eq(PsTaskWorkRecord::getDelFlag, "0").in(PsTaskWorkRecord::getTaskAppointId, map.keySet()));
|
||||
lis.forEach(item->{
|
||||
item.setExecutor(map.get(item.getTaskAppointId()).getExecutor());
|
||||
});
|
||||
return lis;
|
||||
}
|
||||
/**
|
||||
* 新增外勤任务记录
|
||||
*
|
||||
|
@ -24,8 +24,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
con.is_proxy con_is_proxy,
|
||||
con.custom_scene con_custom_scene,
|
||||
con.custom_manager con_custom_manager,
|
||||
us.nick_name con_custom_manager_name,
|
||||
usr.nick_name con_custom_manager_name,
|
||||
con.sign_desc con_sign_desc,
|
||||
com.id com_id,
|
||||
com.company_adress com_company_adress,
|
||||
com.company_name com_company_name,
|
||||
com.legal_person_name com_legal_person_name,
|
||||
@ -33,14 +34,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
com.legal_person_phone com_legal_person_phone,
|
||||
com.customer_num com_customer_num,
|
||||
com.customer_cert com_customer_cert,
|
||||
cus.id cus_id,
|
||||
cus.custom_name cus_custom_name ,
|
||||
cus.custom_mobile cus_custom_mobile,
|
||||
(CASE WHEN (info.contract_amount -
|
||||
(select pta.id from ps_task_appoint pta where pta.task_id=main.id and pta.appoint_type=1 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 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 order by id desc limit 0,1) as secAppo,
|
||||
(CASE WHEN (con.contract_amount -
|
||||
(select IFNULL(sum(money),0) from ps_contract_pay pay where pay.business_type =1 ) +
|
||||
(select IFNULL(sum(money),0) from ps_contract_pay cpay where cpay.business_type =2 )
|
||||
) > 0 THEN '半款' ELSE '全款' END) as pay_stauts_desc,
|
||||
(select GROUP_CONCAT(appoint.executor SEPARATOR ',')
|
||||
from ps_task_appoint appoint where appoint.task_id = main.id) as executors
|
||||
from ps_task_appoint appoint where appoint.task_id = main.id) as executors,
|
||||
(select GROUP_CONCAT(business.business_type SEPARATOR ',')
|
||||
from ps_contract_business business where business.contract_code = con.contract_code) as business_type_name
|
||||
from ps_task_main main
|
||||
@ -60,8 +65,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
con.is_proxy con_is_proxy,
|
||||
con.custom_scene con_custom_scene,
|
||||
con.custom_manager con_custom_manager,
|
||||
us.nick_name con_custom_manager_name,
|
||||
usr.nick_name con_custom_manager_name,
|
||||
con.sign_desc con_sign_desc,
|
||||
com.id com_id,
|
||||
com.company_adress com_company_adress,
|
||||
com.company_name com_company_name,
|
||||
com.legal_person_name com_legal_person_name,
|
||||
@ -69,10 +75,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
com.legal_person_phone com_legal_person_phone,
|
||||
com.customer_num com_customer_num,
|
||||
com.customer_cert com_customer_cert,
|
||||
com.finance_account_no com_finance_account_no
|
||||
com.finance_account_no com_finance_account_no,
|
||||
cus.id cus_id,
|
||||
cus.custom_name cus_custom_name ,
|
||||
cus.custom_mobile cus_custom_mobile,
|
||||
(CASE WHEN (info.contract_amount -
|
||||
(CASE WHEN (con.contract_amount -
|
||||
(select IFNULL(sum(money),0) from ps_contract_pay pay where pay.business_type =1 ) +
|
||||
(select IFNULL(sum(money),0) from ps_contract_pay cpay where cpay.business_type =2 )
|
||||
) > 0 THEN '半款' ELSE '全款' END) as pay_stauts_desc,
|
||||
|
@ -69,8 +69,8 @@ public class SysUserController extends BaseController {
|
||||
* 获取登陆人下的用户列表
|
||||
*/
|
||||
@GetMapping("/userlist")
|
||||
public R<List<SysUserVo>> userlist() {
|
||||
return R.ok(userService.selectUserList());
|
||||
public R<List<SysUserVo>> userlist(Long postId) {
|
||||
return R.ok(userService.selectUserList(postId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -33,6 +33,10 @@ public class SysUserBo extends BaseEntity {
|
||||
* 部门ID
|
||||
*/
|
||||
private Long deptId;
|
||||
/**
|
||||
* 岗位ID
|
||||
*/
|
||||
private Long postIdQuery;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
|
@ -17,7 +17,7 @@ public interface ISysUserService {
|
||||
|
||||
|
||||
TableDataInfo<SysUserVo> selectPageUserList(SysUserBo user, PageQuery pageQuery);
|
||||
List<SysUserVo> selectUserList();
|
||||
List<SysUserVo> selectUserList(Long postId);
|
||||
/**
|
||||
* 根据条件分页查询用户列表
|
||||
*
|
||||
|
@ -75,8 +75,10 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SysUserVo> selectUserList() {
|
||||
return baseMapper.selectUserList( this.buildQueryWrapper(new SysUserBo()));
|
||||
public List<SysUserVo> selectUserList(Long postId) {
|
||||
SysUserBo bo = new SysUserBo();
|
||||
bo.setPostIdQuery(postId);
|
||||
return baseMapper.selectUserList( this.buildQueryWrapper(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -100,6 +102,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
.like(StringUtils.isNotBlank(user.getPhonenumber()), "u.phonenumber", user.getPhonenumber())
|
||||
.between(params.get("beginTime") != null && params.get("endTime") != null,
|
||||
"u.create_time", params.get("beginTime"), params.get("endTime"))
|
||||
.exists(user.getPostIdQuery() != null,"select 1 from sys_user_post p where u.user_id = p.user_id and p.post_id = "+user.getPostIdQuery())
|
||||
.and(ObjectUtil.isNotNull(user.getDeptId()), w -> {
|
||||
List<SysDept> deptList = deptMapper.selectList(new LambdaQueryWrapper<SysDept>()
|
||||
.select(SysDept::getDeptId)
|
||||
|
Loading…
Reference in New Issue
Block a user