Commit c48cfc0c by tangzhaoqian
parents fe0f4daa 6acd9e03
...@@ -53,17 +53,17 @@ public class CrmSeaRule extends Model<CrmSeaRule> { ...@@ -53,17 +53,17 @@ public class CrmSeaRule extends Model<CrmSeaRule> {
private Integer gid; private Integer gid;
@ApiModelProperty(value = "添加客户之后(one)天没有跟进 (以跟进记录为准)") @ApiModelProperty(value = "添加客户之后(one)天没有跟进 (以跟进记录为准)")
private Integer one; private int one;
@ApiModelProperty(value = "距上次跟进(two)天没有再次跟进 (以跟进记录为准)") @ApiModelProperty(value = "距上次跟进(two)天没有再次跟进 (以跟进记录为准)")
private Integer two; private int two;
@ApiModelProperty(value = "添加客户之后(three)天没有成交 (天数必须大于规则1)") @ApiModelProperty(value = "添加客户之后(three)天没有成交 (天数必须大于规则1)")
private Integer three; private int three;
@ApiModelProperty(value = "系统提前(four)天自动提醒业务员客户将被回收") @ApiModelProperty(value = "系统提前(four)天自动提醒业务员客户将被回收")
private Integer four; private int four;
// @ApiModelProperty(value = "我的客户数量最多(five)人(合作中的不算)") // @ApiModelProperty(value = "我的客户数量最多(five)人(合作中的不算)")
// private Integer five; // private int five;
} }
...@@ -65,22 +65,24 @@ public class CrmRuleController { ...@@ -65,22 +65,24 @@ public class CrmRuleController {
Date now = new Date(); Date now = new Date();
// 客户创建时间+ x天 = 过期释放时间 // 客户创建时间+ x天 = 过期释放时间
DateTime overDate1 = DateUtil.offsetDay(createTime, one); DateTime overDate1 = DateUtil.offsetDay(createTime, one);
Long compare2 = null; long compare2 = 0;
if (lastFollowTime != null) { if (lastFollowTime != null) {
DateTime overDate2 = DateUtil.offsetDay(lastFollowTime, two); DateTime overDate2 = DateUtil.offsetDay(lastFollowTime, two);
compare2 = DateUtil.between(overDate2, now, DateUnit.DAY, false); compare2 = DateUtil.between(overDate2, now, DateUnit.DAY, false);
if (compare2 == -four)
remind(belongUserName, clientName, four);
} }
DateTime overDate3 = DateUtil.offsetDay(createTime, three); DateTime overDate3 = DateUtil.offsetDay(createTime, three);
// 时间比较 // 时间比较
long compare1 = DateUtil.between(overDate1, now, DateUnit.DAY, false); long compare1 = DateUtil.between(overDate1, now, DateUnit.DAY, false);
long compare3 = DateUtil.between(overDate3, now, DateUnit.DAY, false); long compare3 = DateUtil.between(overDate3, now, DateUnit.DAY, false);
// 判断1和2和3 // 判断1和2和3
if ((lastFollowTime == null && compare1 >= 0) || (lastFollowTime != null && compare2 >= 0) if ((lastFollowTime == null && compare1 >= 0) || (lastFollowTime != null && compare2 >= 0)
|| (compare3 >= 0 && status != 3 && status != 4)) || (compare3 >= 0 && status != 3 && status != 4))
release(crmClientData); release(crmClientData);
// 判断4 // 判断4
if (compare1 == -four || compare2 == -four || compare3 == -four) // TODO if (compare1 == -four || compare3 == -four)
remind(belongUserName, clientName, four); remind(belongUserName, clientName, four);
} }
} }
......
...@@ -201,9 +201,14 @@ public class DzhtController2 { ...@@ -201,9 +201,14 @@ public class DzhtController2 {
@PostMapping("/orgTemplate") @PostMapping("/orgTemplate")
@ApiOperation(value = "创建机构模板印章", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "创建机构模板印章", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> orgTemplate(@CurrentUser UserBean userBean, @RequestBody DzhtAssoQyyz qyyz) { public Result<Object> orgTemplate(@CurrentUser UserBean userBean, @RequestBody DzhtAssoQyyz qyyz) {
String orgId = DzhtAssoQyzc.builder().build().selectOne(
// new QueryWrapper<DzhtAssoQyzc>().eq("third_party_user_id", qyyz.getThirdPartyUserId()).select("org_id")) DzhtAssoQyzc yz = DzhtAssoQyzc.builder().build()
new QueryWrapper<DzhtAssoQyzc>().eq("org_code", userBean.getOrgCode()).select("org_id")).getOrgId();// 查询orgId .selectOne(new QueryWrapper<DzhtAssoQyzc>().eq("org_code", userBean.getOrgCode()).select("org_id"));
if (yz == null) {
return ResultUtil.error("请先在签约主体中进行企业认证");
}
String orgId = yz.getOrgId();// 查询orgId
// String orgId = "dfd84b9a58d345ea90f6711bad853435";// 测试公司账户 // String orgId = "dfd84b9a58d345ea90f6711bad853435";// 测试公司账户
// 印章参数 // 印章参数
String alias = qyyz.getAlias(); String alias = qyyz.getAlias();
......
...@@ -257,20 +257,40 @@ public class TimeCardController { ...@@ -257,20 +257,40 @@ public class TimeCardController {
List<KqglAssoOvertimeRulesDto> rulesdto = new ArrayList<KqglAssoOvertimeRulesDto>(); List<KqglAssoOvertimeRulesDto> rulesdto = new ArrayList<KqglAssoOvertimeRulesDto>();
for (int i = 0, n = listAs.size(); i < n; i++) { for (int i = 0, n = listAs.size(); i < n; i++) {
String[] nary = null; String[] nary = null;
String[] naryid = null;
if(listAs.get(i).getAppliedScope() == 0) {//全公司 if(listAs.get(i).getAppliedScope() == 0) {//全公司
nary = new String[1];//用户名 nary = new String[1];//用户名
naryid = new String[1];//用户名
nary[0] = "全公司"; nary[0] = "全公司";
naryid[0] = "0";
}else { }else {
List<KqglAssoOvertimeRange> overtim = kqglassoovertimerangemapper.selectList(new QueryWrapper<KqglAssoOvertimeRange>().lambda().eq(KqglAssoOvertimeRange::getOvertimeRulesId, listAs.get(i).getId())); List<KqglAssoOvertimeRange> overtim = kqglassoovertimerangemapper.selectList(new QueryWrapper<KqglAssoOvertimeRange>().lambda().eq(KqglAssoOvertimeRange::getOvertimeRulesId, listAs.get(i).getId()));
nary = new String[overtim.size()];//用户名 nary = new String[overtim.size()];//用户名
naryid = new String[overtim.size()];//用户名
for(int y = 0,l = overtim.size(); y < l ; y++) { for(int y = 0,l = overtim.size(); y < l ; y++) {
KqglMainKqz kqzmc = kqglmainkqzmapper.selectOne(new QueryWrapper<KqglMainKqz>().lambda().eq(KqglMainKqz::getId, overtim.get(y).getAttgroupId())); KqglMainKqz kqzmc = kqglmainkqzmapper.selectOne(new QueryWrapper<KqglMainKqz>().lambda().eq(KqglMainKqz::getId, overtim.get(y).getAttgroupId()));
nary[y] = kqzmc.getName(); nary[y] = kqzmc.getName();
naryid[y] = String.valueOf(kqzmc.getId());
} }
} }
List<KqglAssOvertimeVice> vice = kqglassovertimevicemapper.selectList(new QueryWrapper<KqglAssOvertimeVice>().lambda().eq(KqglAssOvertimeVice::getOvertimeRulesId, listAs.get(i).getId()));
StartTimeRestDto[] starttime = new StartTimeRestDto[vice.size()];//用户名;
for(int r = 0,t = vice.size(); r < t ; r++) {
StartTimeRestDto startt = new StartTimeRestDto(vice.get(r).getBreakStartTime(),vice.get(r).getBreakEndTime(),vice.get(r).getOverType());
starttime[r] = startt;
}
KqglAssoOvertimeRulesDto ruldto = KqglAssoOvertimeRulesDto.builder().build(); KqglAssoOvertimeRulesDto ruldto = KqglAssoOvertimeRulesDto.builder().build();
ruldto.setApplyrange(nary); ruldto.setApplyrange(nary);
BeanUtil.copyProperties(listAs.get(i), ruldto , "starttime","applyrange"); ruldto.setApplyrangeid(naryid);
ruldto.setStarttime(starttime);
BeanUtil.copyProperties(listAs.get(i), ruldto , "starttime","applyrange","applyrangeid");
rulesdto.add(ruldto); rulesdto.add(ruldto);
} }
return ResultUtil.data(pageAs, rulesdto, "操作成功!"); return ResultUtil.data(pageAs, rulesdto, "操作成功!");
...@@ -296,7 +316,7 @@ public class TimeCardController { ...@@ -296,7 +316,7 @@ public class TimeCardController {
Integer id = rul.getId(); Integer id = rul.getId();
Console.log("新增/修改加班规则id: " + id); Console.log("新增/修改加班规则id: " + id);
List<KqglAssoOvertimeRange> overatts=new ArrayList<KqglAssoOvertimeRange>(); List<KqglAssoOvertimeRange> overatts=new ArrayList<KqglAssoOvertimeRange>();
String[] launchs = overrules.getApplyrange(); String[] launchs = overrules.getApplyrangeid();
if(launchs.length == 0) { if(launchs.length == 0) {
KqglAssoOvertimeRange.builder().build().delete(new QueryWrapper<KqglAssoOvertimeRange>().lambda().eq(KqglAssoOvertimeRange::getOvertimeRulesId, id)); KqglAssoOvertimeRange.builder().build().delete(new QueryWrapper<KqglAssoOvertimeRange>().lambda().eq(KqglAssoOvertimeRange::getOvertimeRulesId, id));
}else if(launchs != null && launchs.length>0){ }else if(launchs != null && launchs.length>0){
...@@ -2006,7 +2026,7 @@ public class TimeCardController { ...@@ -2006,7 +2026,7 @@ public class TimeCardController {
public Result<Object> LeaveBalanceList(@CurrentUser UserBean userBean, @Validated @RequestBody AttqueryCriteriaDto attquerycriteriadto) { public Result<Object> LeaveBalanceList(@CurrentUser UserBean userBean, @Validated @RequestBody AttqueryCriteriaDto attquerycriteriadto) {
IPage<EmployeeLeaveBalanceDto> page = new Page<EmployeeLeaveBalanceDto>( IPage<EmployeeLeaveBalanceDto> page = new Page<EmployeeLeaveBalanceDto>(
attquerycriteriadto.getCurrentPage() == null ? 1 : attquerycriteriadto.getCurrentPage(), attquerycriteriadto.getCurrentPage() == null ? 1 : attquerycriteriadto.getCurrentPage(),
attquerycriteriadto.getTotalPage() == null ? 10 : attquerycriteriadto.getTotalPage()); attquerycriteriadto.getTotalPage() == 10 ? 9999 : attquerycriteriadto.getTotalPage());
attquerycriteriadto.setOrgCode(userBean.getOrgCode()); attquerycriteriadto.setOrgCode(userBean.getOrgCode());
attquerycriteriadto.setEmpNum(userBean.getEmpNum()); attquerycriteriadto.setEmpNum(userBean.getEmpNum());
// 缺-部门id 搜索 // 缺-部门id 搜索
......
...@@ -358,7 +358,7 @@ public class CmsController { ...@@ -358,7 +358,7 @@ public class CmsController {
// 查询条件 // 查询条件
QueryWrapper<CmsContent> queryWrapper = new QueryWrapper<>(); QueryWrapper<CmsContent> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("organization_id", userBean.getOrgCode()) queryWrapper.eq("organization_id", userBean.getOrgCode())
.select("id", "auditopinion", "modularid", "status", "title", "releasetime", "addeddate", "author", .select("id","publisher_name", "auditopinion", "modularid", "status", "title", "releasetime", "addeddate", "author",
"summary", "releasetype", "fmtpath") "summary", "releasetype", "fmtpath")
.ne("status", 1).eq(t != null && t > -1, "modularid", t) .ne("status", 1).eq(t != null && t > -1, "modularid", t)
.between(!StrUtil.hasBlank(s) && !StrUtil.hasBlank(e), "releasetime", .between(!StrUtil.hasBlank(s) && !StrUtil.hasBlank(e), "releasetime",
......
...@@ -9,6 +9,7 @@ package cn.timer.api.controller.qyzx; ...@@ -9,6 +9,7 @@ package cn.timer.api.controller.qyzx;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.timer.api.bean.qyzx.auth.QyzxAuthAccount; import cn.timer.api.bean.qyzx.auth.QyzxAuthAccount;
...@@ -170,4 +172,20 @@ public class QyzxAuthController { ...@@ -170,4 +172,20 @@ public class QyzxAuthController {
} }
@GetMapping(value = "/getYgAuth")
@ApiOperation(value = "获取全部权限信息", httpMethod = "GET", notes = "接口发布说明")
public Result<List<YgglMainEmp>> getYgAuth(@CurrentUser UserBean userBean) {
YgglMainEmp main = YgglMainEmp.builder().build()
.selectOne(new LambdaQueryWrapper<YgglMainEmp>().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())
.eq(YgglMainEmp::getIsManager, 1).select(YgglMainEmp::getName, YgglMainEmp::getPhone,
YgglMainEmp::getEmpNum, YgglMainEmp::getIsManager));
List<YgglMainEmp> child = YgglMainEmp.builder().build()
.selectList(new LambdaQueryWrapper<YgglMainEmp>().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())
.eq(YgglMainEmp::getIsManager, 2).select(YgglMainEmp::getName, YgglMainEmp::getPhone,
YgglMainEmp::getEmpNum, YgglMainEmp::getIsManager));
child.add(main);
return ResultUtil.data(child, "查询成功");
}
} }
...@@ -98,7 +98,10 @@ public class KqglAssoOvertimeRulesDto { ...@@ -98,7 +98,10 @@ public class KqglAssoOvertimeRulesDto {
@ApiModelProperty(value = "扣除休息时间段", example = "12:00-13:30") @ApiModelProperty(value = "扣除休息时间段", example = "12:00-13:30")
private StartTimeRestDto[] starttime; private StartTimeRestDto[] starttime;
@ApiModelProperty(value = "应用范围", example = "[]") @ApiModelProperty(value = "应用范围name", example = "[]")
private String[] applyrange; private String[] applyrange;
@ApiModelProperty(value = "应用范围id", example = "[]")
private String[] applyrangeid;
} }
\ No newline at end of file
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