新增记账完成时间和任务时间搜索
This commit is contained in:
parent
66bd0f7991
commit
91315492f3
@ -47,9 +47,6 @@ spring:
|
|||||||
username: root
|
username: root
|
||||||
password: rwWhYfCe3Tzhatep
|
password: rwWhYfCe3Tzhatep
|
||||||
|
|
||||||
# url: jdbc:mysql://192.168.18.119:3308/pusongplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
|
||||||
# username: root
|
|
||||||
# password: Ps123456
|
|
||||||
# url: jdbc:mysql://47.95.38.123:3306/pusongplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
# url: jdbc:mysql://47.95.38.123:3306/pusongplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
# username: root
|
# username: root
|
||||||
# password: Ps123456@
|
# password: Ps123456@
|
||||||
|
@ -318,6 +318,22 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
|||||||
calendar.set(Calendar.SECOND, 59);
|
calendar.set(Calendar.SECOND, 59);
|
||||||
calendar.set(Calendar.MILLISECOND, 999);
|
calendar.set(Calendar.MILLISECOND, 999);
|
||||||
|
|
||||||
|
return calendar.getTime();
|
||||||
|
}
|
||||||
|
public static Date endTime(Date date) {
|
||||||
|
if (date == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// 获取当前日期的Calendar对象
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.setTime(date);
|
||||||
|
|
||||||
|
// 将时间设置为0点0分0秒
|
||||||
|
calendar.set(Calendar.HOUR_OF_DAY, 23);
|
||||||
|
calendar.set(Calendar.MINUTE, 59);
|
||||||
|
calendar.set(Calendar.SECOND, 59);
|
||||||
|
calendar.set(Calendar.MILLISECOND, 999);
|
||||||
|
|
||||||
return calendar.getTime();
|
return calendar.getTime();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,15 +110,16 @@ public class PsTaskController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 主任务完成
|
* 主任务完成
|
||||||
* @param id 主任务id
|
* @param id 主任务id
|
||||||
|
* @param type 0全部完成 1仅记账任务完成
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@Log(title = "主任务完成")
|
@Log(title = "主任务完成")
|
||||||
@SaCheckPermission("business:task:list")
|
@SaCheckPermission("business:task:list")
|
||||||
@GetMapping("/mainFinish")
|
@GetMapping("/mainFinish")
|
||||||
public R<Void> mainFinish(@NotNull Long id, String firstFilingTime) {
|
public R<Void> mainFinish(@NotNull Long id, String firstFilingTime, int type) {
|
||||||
Date date = DateUtils.parseDate(firstFilingTime);
|
Date date = DateUtils.parseDate(firstFilingTime);
|
||||||
contractInfoService.finish(psTaskMainService.finishMain(id, date));
|
contractInfoService.finish(psTaskMainService.finishMain(id, date, type));
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,9 @@ import com.pusong.common.mybatis.core.domain.BaseEntity;
|
|||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -128,4 +130,17 @@ public class PsTaskQueryBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String appKeyWord;
|
private String appKeyWord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date startDate;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date endDate;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -280,6 +280,7 @@ public class PsCompanyInfoVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 首次申报时间
|
* 首次申报时间
|
||||||
*/
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM")
|
||||||
private Date firstFilingTime;
|
private Date firstFilingTime;
|
||||||
|
|
||||||
private String taskRemark;
|
private String taskRemark;
|
||||||
|
@ -16,6 +16,7 @@ public enum TaskStatusEnum {
|
|||||||
ING("20","进行中"),
|
ING("20","进行中"),
|
||||||
// OA("25","完成审批中"),
|
// OA("25","完成审批中"),
|
||||||
FINISH("30","完成"),
|
FINISH("30","完成"),
|
||||||
|
BILL_FINISH("35","记账任务完成"),//进入服务企业档案 30包含35
|
||||||
PAUSE("40","暂停"),
|
PAUSE("40","暂停"),
|
||||||
CANCEL("50","作废"),
|
CANCEL("50","作废"),
|
||||||
CANCELAPPO("55","作废审批中")
|
CANCELAPPO("55","作废审批中")
|
||||||
|
@ -105,7 +105,7 @@ public interface IPsTaskService {
|
|||||||
* @param id 任务主键id
|
* @param id 任务主键id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String finishMain(Long id, Date firstFilingTime);
|
String finishMain(Long id, Date firstFilingTime, int type);
|
||||||
/**
|
/**
|
||||||
* 子任务完成
|
* 子任务完成
|
||||||
*
|
*
|
||||||
|
@ -177,9 +177,9 @@ public class PsCompanyInfoServiceImpl implements IPsCompanyInfoService {
|
|||||||
|
|
||||||
//合同未作废,有回款的续费合同 或 合同未作废有完成主任务的
|
//合同未作废,有回款的续费合同 或 合同未作废有完成主任务的
|
||||||
lqw.and( wrapper -> wrapper
|
lqw.and( wrapper -> wrapper
|
||||||
.exists("select 1 FROM ps_contract_company cc inner join ps_contract_pay pay on pay.contract_code = cc.contract_code inner join ps_contract_info con on con.contract_code = cc.contract_code where \t\tcc.company_id = com.id and con.is_due = '1' and con.is_cancel != '03'")
|
.exists("select 1 FROM ps_contract_company cc inner join ps_contract_pay pay on pay.contract_code = cc.contract_code inner join ps_contract_info con on con.contract_code = cc.contract_code where cc.company_id = com.id and con.is_due = '1' and con.is_cancel != '03'")
|
||||||
.or()
|
.or()
|
||||||
.exists("select 1 FROM ps_task_main task inner join ps_contract_info con on con.contract_code = task.contract_code where task.service_company_id = com.id and task.del_flag = 0 and task.\t\t\t \t task_status = '30' and con.is_cancel != '03'")
|
.exists("select 1 FROM ps_task_main task inner join ps_contract_info con on con.contract_code = task.contract_code where task.service_company_id = com.id and task.del_flag = 0 and (task.task_status = '30' or task.task_status = '35') and con.is_cancel != '03'")
|
||||||
);
|
);
|
||||||
|
|
||||||
StringBuilder sql = new StringBuilder("select 1 from ps_contract_business cb where cb.company_id = com.id ");
|
StringBuilder sql = new StringBuilder("select 1 from ps_contract_business cb where cb.company_id = com.id ");
|
||||||
|
@ -454,11 +454,12 @@ public class PsTaskServiceImpl implements IPsTaskService {
|
|||||||
* @param id 任务主键id
|
* @param id 任务主键id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String finishMain(Long id, Date firstFilingTime){
|
public String finishMain(Long id, Date firstFilingTime, int type){
|
||||||
PsTaskMain main = baseMapper.selectById(id);
|
PsTaskMain main = baseMapper.selectById(id);
|
||||||
if(!TaskStatusEnum.canFinish(main.getTaskStatus())){
|
if(!TaskStatusEnum.canFinish(main.getTaskStatus())){
|
||||||
throw new ServiceException("此任务无法执行此操作,请刷新页面后重新操作");
|
throw new ServiceException("此任务无法执行此操作,请刷新页面后重新操作");
|
||||||
}
|
}
|
||||||
|
if (type == 0){
|
||||||
List<PsTaskAppoint> list = appointMapper.selectList(Wrappers.<PsTaskAppoint>lambdaQuery()
|
List<PsTaskAppoint> list = appointMapper.selectList(Wrappers.<PsTaskAppoint>lambdaQuery()
|
||||||
.eq(PsTaskAppoint::getDelFlag,"0").eq(PsTaskAppoint::getTaskId, id)
|
.eq(PsTaskAppoint::getDelFlag,"0").eq(PsTaskAppoint::getTaskId, id)
|
||||||
.notIn(PsTaskAppoint::getAppointStatus, AppointStatusEnum.getEndStauts()));
|
.notIn(PsTaskAppoint::getAppointStatus, AppointStatusEnum.getEndStauts()));
|
||||||
@ -467,11 +468,17 @@ public class PsTaskServiceImpl implements IPsTaskService {
|
|||||||
}
|
}
|
||||||
main.setTaskStatus(TaskStatusEnum.FINISH.getCode());
|
main.setTaskStatus(TaskStatusEnum.FINISH.getCode());
|
||||||
main.setFinishDate(new Date());
|
main.setFinishDate(new Date());
|
||||||
baseMapper.updateById(main);
|
|
||||||
|
|
||||||
PsContractInfoVo contract = contractInfoService.queryContractByCode(main.getContractCode());
|
PsContractInfoVo contract = contractInfoService.queryContractByCode(main.getContractCode());
|
||||||
noticeService.sendNotice(SysNoticeBo.getTaskFinishInstance(contract.getCustomManager(), contract.getPsCustomInfoVo().getCustomName()));
|
noticeService.sendNotice(SysNoticeBo.getTaskFinishInstance(contract.getCustomManager(), contract.getPsCustomInfoVo().getCustomName()));
|
||||||
|
|
||||||
|
}else{
|
||||||
|
main.setTaskStatus(TaskStatusEnum.BILL_FINISH.getCode());
|
||||||
|
PsContractInfoVo contract = contractInfoService.queryContractByCode(main.getContractCode());
|
||||||
|
noticeService.sendNotice(SysNoticeBo.getTaskBillFinishInstance(contract.getCustomManager(), contract.getPsCustomInfoVo().getCustomName()));
|
||||||
|
}
|
||||||
|
|
||||||
|
baseMapper.updateById(main);
|
||||||
|
|
||||||
// QueryWrapper<PsContractCompany> queryWrapper = new QueryWrapper();
|
// QueryWrapper<PsContractCompany> queryWrapper = new QueryWrapper();
|
||||||
// queryWrapper.eq("id", main.getServiceCompanyId());
|
// queryWrapper.eq("id", main.getServiceCompanyId());
|
||||||
@ -701,8 +708,8 @@ public class PsTaskServiceImpl implements IPsTaskService {
|
|||||||
.or()
|
.or()
|
||||||
.like("scom.company_name", bo.getAppKeyWord())
|
.like("scom.company_name", bo.getAppKeyWord())
|
||||||
);
|
);
|
||||||
lqw.between(bo.getParams().get("beginTime") != null && bo.getParams().get("endTime") != null,
|
lqw.between(bo.getStartDate() != null && bo.getEndDate() != null,
|
||||||
"main.create_time", bo.getParams().get("beginTime"), bo.getParams().get("endTime"));
|
"main.create_time", bo.getStartDate(), DateUtils.endTime(bo.getEndDate()));
|
||||||
|
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
@ -330,6 +330,16 @@ public class SysNoticeBo extends BaseEntity {
|
|||||||
noticeBo.setJumpType(0);
|
noticeBo.setJumpType(0);
|
||||||
return noticeBo;
|
return noticeBo;
|
||||||
}
|
}
|
||||||
|
public static SysNoticeBo getTaskBillFinishInstance(long uid, String coustomName){
|
||||||
|
SysNoticeBo noticeBo = new SysNoticeBo();
|
||||||
|
noticeBo.setNoticeType("1");
|
||||||
|
noticeBo.setNoticeTitle("通知");
|
||||||
|
noticeBo.setStatus("0");
|
||||||
|
noticeBo.setNoticeContent("【"+ coustomName +"】的合同记账任务已完成,请确认回款是否全部完成,回传合同是否上传,冲刺收官,共创佳绩!");
|
||||||
|
noticeBo.setRecUid(uid);
|
||||||
|
noticeBo.setJumpType(0);
|
||||||
|
return noticeBo;
|
||||||
|
}
|
||||||
public static SysNoticeBo getFreeTaskInstance(long uid, String serviceCompanyName){
|
public static SysNoticeBo getFreeTaskInstance(long uid, String serviceCompanyName){
|
||||||
SysNoticeBo noticeBo = new SysNoticeBo();
|
SysNoticeBo noticeBo = new SysNoticeBo();
|
||||||
noticeBo.setNoticeType("1");
|
noticeBo.setNoticeType("1");
|
||||||
|
Loading…
Reference in New Issue
Block a user