Commit baa4b30b authored by 廖旭伟's avatar 廖旭伟

Merge remote-tracking branch 'origin/master'

parents 50813b9e f13b28fa
...@@ -66,14 +66,14 @@ ...@@ -66,14 +66,14 @@
@click="lookexportHis" @click="lookexportHis"
>导出记录</el-button >导出记录</el-button
> >
<el-button <!-- <el-button
slot="table-head-left2" slot="table-head-left2"
style="margin-left: 10px" style="margin-left: 10px"
icon="el-icon-tickets" icon="el-icon-tickets"
size="mini" size="mini"
@click="setdialog" @click="setdialog"
>表格设置</el-button >表格设置</el-button
> > -->
</LayoutTable> </LayoutTable>
<drawer-show ref="drawerform" @ok="getData" /> <drawer-show ref="drawerform" @ok="getData" />
<!-- 导出记录查看 --> <!-- 导出记录查看 -->
......
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
type="success" type="success"
@click="lookexportHis" @click="lookexportHis"
>导出记录</el-button> >导出记录</el-button>
<el-button <!-- <el-button
slot="table-head-left2" slot="table-head-left2"
style="margin-left: 10px" style="margin-left: 10px"
icon="el-icon-tickets" icon="el-icon-tickets"
size="mini" size="mini"
@click="setdialog" @click="setdialog"
>表格设置</el-button> >表格设置</el-button> -->
</LayoutTable> </LayoutTable>
<dialog-show ref="dialogform" @ok="getData" /> <dialog-show ref="dialogform" @ok="getData" />
<!-- 表格设置 --> <!-- 表格设置 -->
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<el-form-item label="问卷封面:" label-width="125px"> <el-form-item label="问卷封面:" label-width="125px">
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<img style="width:80px; height: 80px; margin-right: 10px;cursor: pointer;" <img style="width:80px; height: 80px; margin-right: 10px;cursor: pointer;"
v-for="(i, j) in coverImg" :key="j" :src="ImgUrl + '/' + i.url" alt="" v-for="(i, j) in coverImg" :key="j" :src="showImgUrl + '/' + i.url" alt=""
:class="selImg == j ? 'selImg' : ''" @click="selImg = j"> :class="selImg == j ? 'selImg' : ''" @click="selImg = j">
<el-upload v-show="coverImg.length < 4" :action="ImgUrl + '/attendance/file/commonupload'" <el-upload v-show="coverImg.length < 4" :action="ImgUrl + '/attendance/file/commonupload'"
accept="image/jpeg,image/png,image/jpg" list-type="picture-card" class="upload" accept="image/jpeg,image/png,image/jpg" list-type="picture-card" class="upload"
...@@ -185,6 +185,7 @@ export default { ...@@ -185,6 +185,7 @@ export default {
editStyle: false, editStyle: false,
loadingstate: false, loadingstate: false,
ImgUrl: process.env.VUE_APP_API_BASE_URL, ImgUrl: process.env.VUE_APP_API_BASE_URL,
showImgUrl:'',
coverImg: [], coverImg: [],
weblink: 0, weblink: 0,
...@@ -198,6 +199,13 @@ export default { ...@@ -198,6 +199,13 @@ export default {
} }
} }
}, },
created(){
if(process.env.NODE_ENV == "development"){
this.showImgUrl= process.env.VUE_APP_API_BASE_URL
}else{
this.showImgUrl=''
}
},
mounted() { mounted() {
console.log(process.env.VUE_APP_API_BASE_URL) console.log(process.env.VUE_APP_API_BASE_URL)
this.getDeptData() this.getDeptData()
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
<profiles.hik.appSecret>2m9RcPJOKq5j2QPQM4v5</profiles.hik.appSecret> <profiles.hik.appSecret>2m9RcPJOKq5j2QPQM4v5</profiles.hik.appSecret>
<profiles.dingtalk.domain>https://oapi.dingtalk.com</profiles.dingtalk.domain> <profiles.dingtalk.domain>https://oapi.dingtalk.com</profiles.dingtalk.domain>
<profiles.dingtalk.oaUrl>api.dingtalk.com</profiles.dingtalk.oaUrl>
<profiles.dingtalk.agentId>2652674890</profiles.dingtalk.agentId> <profiles.dingtalk.agentId>2652674890</profiles.dingtalk.agentId>
<profiles.dingtalk.appKey>dingpqzradgfr4efdi2j</profiles.dingtalk.appKey> <profiles.dingtalk.appKey>dingpqzradgfr4efdi2j</profiles.dingtalk.appKey>
<profiles.dingtalk.appSecret>bF2WALmo5_Wuj3hg5gXeWqezrYnZChUJ88HjzNWpkA9ivdOxfBDGOGYcfVRfB3vd</profiles.dingtalk.appSecret> <profiles.dingtalk.appSecret>bF2WALmo5_Wuj3hg5gXeWqezrYnZChUJ88HjzNWpkA9ivdOxfBDGOGYcfVRfB3vd</profiles.dingtalk.appSecret>
...@@ -98,6 +99,7 @@ ...@@ -98,6 +99,7 @@
<profiles.hik.appSecret>2m9RcPJOKq5j2QPQM4v5</profiles.hik.appSecret> <profiles.hik.appSecret>2m9RcPJOKq5j2QPQM4v5</profiles.hik.appSecret>
<profiles.dingtalk.domain>http://172.15.28.113:8918</profiles.dingtalk.domain> <profiles.dingtalk.domain>http://172.15.28.113:8918</profiles.dingtalk.domain>
<profiles.dingtalk.oaUrl>172.15.28.113:8919</profiles.dingtalk.oaUrl>
<profiles.dingtalk.agentId>2652674890</profiles.dingtalk.agentId> <profiles.dingtalk.agentId>2652674890</profiles.dingtalk.agentId>
<profiles.dingtalk.appKey>dingpqzradgfr4efdi2j</profiles.dingtalk.appKey> <profiles.dingtalk.appKey>dingpqzradgfr4efdi2j</profiles.dingtalk.appKey>
<profiles.dingtalk.appSecret>bF2WALmo5_Wuj3hg5gXeWqezrYnZChUJ88HjzNWpkA9ivdOxfBDGOGYcfVRfB3vd</profiles.dingtalk.appSecret> <profiles.dingtalk.appSecret>bF2WALmo5_Wuj3hg5gXeWqezrYnZChUJ88HjzNWpkA9ivdOxfBDGOGYcfVRfB3vd</profiles.dingtalk.appSecret>
......
...@@ -158,11 +158,12 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi ...@@ -158,11 +158,12 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
homeStatInfo.setTotalDeptNum(totalDeptNum); homeStatInfo.setTotalDeptNum(totalDeptNum);
//todo //todo
homeStatInfo.setAttendRadio(new BigDecimal(91.00)); homeStatInfo.setAttendRadio(new BigDecimal(98.00));
homeStatInfo.setLevealPersonNum(6); homeStatInfo.setLevealPersonNum(6);
homeStatInfo.setLatePersonNum(2); homeStatInfo.setLatePersonNum(2);
homeStatInfo.setLeftEarlyPersonNum(1); homeStatInfo.setLeftEarlyPersonNum(1);
homeStatInfo.setMissCardPersonNum(0); homeStatInfo.setMissCardPersonNum(23);
homeStatInfo.setAttendPersonNum(426);
data.put("homeStat", homeStatInfo); data.put("homeStat", homeStatInfo);
data.put("token", token); data.put("token", token);
......
...@@ -19,8 +19,6 @@ public abstract class BaseReq implements Serializable { ...@@ -19,8 +19,6 @@ public abstract class BaseReq implements Serializable {
*/ */
private Integer size; private Integer size;
/** /**
* 工号 * 工号
*/ */
......
package com.mortals.xhx.busiz;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class TestReq {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTimeStart;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTimeEnd;
}
...@@ -139,21 +139,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -139,21 +139,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
attendanceStatEntity.setHomeLeave(balanceEntity.getHomeLeave()); attendanceStatEntity.setHomeLeave(balanceEntity.getHomeLeave());
attendanceStatEntity.setPersonalLeave(balanceEntity.getPersonalLeaveDays()); attendanceStatEntity.setPersonalLeave(balanceEntity.getPersonalLeaveDays());
attendanceStatService.save(attendanceStatEntity); attendanceStatService.save(attendanceStatEntity);
//统计各级部门员工数量 todo 优化统计
if (!ObjectUtils.isEmpty(deptEntity.getAncestors())) {
String[] split = deptEntity.getAncestors().split(",", 2);
if (split.length > 1) {
String ancestor = split[1];
String[] ancestors = ancestor.split(",");
for (String newAncestor : ancestors) {
DeptEntity deptEntity2 = deptService.get(Long.valueOf(newAncestor));
if (Objects.nonNull(deptEntity2)) {
deptEntity2.setPersonNum(deptEntity2.getPersonNum() + 1);
deptService.update(deptEntity2);
}
}
}
}
} else { } else {
//更新 //更新
if (!ObjectUtils.isEmpty(deptEntity)) { if (!ObjectUtils.isEmpty(deptEntity)) {
...@@ -170,21 +156,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -170,21 +156,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
staffEntity.setUpdateUserId(1L); staffEntity.setUpdateUserId(1L);
staffEntity.setUpdateTime(new Date()); staffEntity.setUpdateTime(new Date());
staffService.update(staffEntity); staffService.update(staffEntity);
//统计各级部门员工数量
if (!ObjectUtils.isEmpty(deptEntity.getAncestors())) {
String[] split = deptEntity.getAncestors().split(",", 2);
if(split.length>1){
String ancestor = split[1];
String[] ancestors = ancestor.split(",");
for (String newAncestor : ancestors) {
DeptEntity deptEntity2 = deptService.get(Long.valueOf(newAncestor));
if (Objects.nonNull(deptEntity2)) {
deptEntity2.setPersonNum(deptEntity2.getPersonNum() + 1);
deptService.update(deptEntity2);
}
}
}
}
} }
} }
} }
......
package com.mortals.xhx.module.attendance.service; package com.mortals.xhx.module.attendance.service;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.attendance.dao.AttendanceRecordHikDao;
import com.mortals.xhx.module.attendance.model.AttendanceRecordHikEntity; import com.mortals.xhx.module.attendance.model.AttendanceRecordHikEntity;
/** /**
...@@ -13,6 +14,8 @@ import com.mortals.xhx.module.attendance.model.AttendanceRecordHikEntity; ...@@ -13,6 +14,8 @@ import com.mortals.xhx.module.attendance.model.AttendanceRecordHikEntity;
*/ */
public interface AttendanceRecordHikService extends ICRUDService<AttendanceRecordHikEntity,Long>{ public interface AttendanceRecordHikService extends ICRUDService<AttendanceRecordHikEntity,Long>{
AttendanceRecordHikDao getDao();
/** /**
* 将原始数据导入打卡记录表 * 将原始数据导入打卡记录表
* @param entity * @param entity
......
package com.mortals.xhx.module.dept.service; package com.mortals.xhx.module.dept.service;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.dept.dao.DeptDao;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptTreeSelect; import com.mortals.xhx.module.dept.model.DeptTreeSelect;
...@@ -15,6 +16,8 @@ import java.util.List; ...@@ -15,6 +16,8 @@ import java.util.List;
*/ */
public interface DeptService extends ICRUDService<DeptEntity,Long>{ public interface DeptService extends ICRUDService<DeptEntity,Long>{
DeptDao getDao();
/** /**
* 是否存在部门信息节点 * 是否存在部门信息节点
* *
......
...@@ -52,6 +52,12 @@ public abstract class AbstractDingTalkService implements IDingPersonService { ...@@ -52,6 +52,12 @@ public abstract class AbstractDingTalkService implements IDingPersonService {
@Value("${dingtalk.AppSecret:''}") @Value("${dingtalk.AppSecret:''}")
protected String appSecret; protected String appSecret;
/**
* appKey
*/
@Value("${dingtalk.oaUrl:}")
protected String oaUrl;
@Autowired @Autowired
private ICacheService cacheService; private ICacheService cacheService;
......
...@@ -120,9 +120,11 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID ...@@ -120,9 +120,11 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
*/ */
public com.aliyun.dingtalkworkflow_1_0.Client createClient() throws Exception { public com.aliyun.dingtalkworkflow_1_0.Client createClient() throws Exception {
com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config(); com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config();
config.protocol = "https"; //config.protocol = "https";
config.protocol = "http";
config.regionId = "central"; config.regionId = "central";
// config.endpoint = domain.replace("http://", ""); // config.endpoint = domain.replace("http://", "");
config.endpoint = oaUrl;
return new com.aliyun.dingtalkworkflow_1_0.Client(config); return new com.aliyun.dingtalkworkflow_1_0.Client(config);
} }
...@@ -132,11 +134,11 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID ...@@ -132,11 +134,11 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
com.aliyun.dingtalkworkflow_1_0.Client client = createClient(); com.aliyun.dingtalkworkflow_1_0.Client client = createClient();
com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceHeaders getProcessInstanceHeaders = new com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceHeaders(); com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceHeaders getProcessInstanceHeaders = new com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceHeaders();
getProcessInstanceHeaders.xAcsDingtalkAccessToken = getToken(); getProcessInstanceHeaders.xAcsDingtalkAccessToken = getToken();
/* HashMap<String, String> map = new HashMap<>(); HashMap<String, String> map = new HashMap<>();
getProcessInstanceHeaders.setCommonHeaders(map); getProcessInstanceHeaders.setCommonHeaders(map);
getProcessInstanceHeaders.getCommonHeaders().put("host", "172.15.28.113"); getProcessInstanceHeaders.getCommonHeaders().put("host", "172.15.28.113:8919");
getProcessInstanceHeaders.getCommonHeaders().put("port", "8918"); // getProcessInstanceHeaders.getCommonHeaders().put("port", "8919");
getProcessInstanceHeaders.getCommonHeaders().put("protocol", "http");*/ // getProcessInstanceHeaders.getCommonHeaders().put("protocol", "http");
com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceRequest getProcessInstanceRequest = new com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceRequest() com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceRequest getProcessInstanceRequest = new com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceRequest()
.setProcessInstanceId(processInstanceId); .setProcessInstanceId(processInstanceId);
......
...@@ -8,7 +8,7 @@ import java.util.Map; ...@@ -8,7 +8,7 @@ import java.util.Map;
public abstract class AbstractHikService { public abstract class AbstractHikService {
@Value("${hik.host:''}") @Value("${hik.host:}")
protected String host; protected String host;
@Value("${hik.appKey:''}") @Value("${hik.appKey:''}")
......
...@@ -42,7 +42,7 @@ public class JobController extends BaseCRUDJsonBodyMappingController<JobService, ...@@ -42,7 +42,7 @@ public class JobController extends BaseCRUDJsonBodyMappingController<JobService,
@Override @Override
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "type", JobTypeEnum.getEnumMap()); this.addDict(model, "type", JobTypeEnum.getEnumMap());
this.addDict(model, "group",service.queryGroupName(new JobQuery()).stream().collect(Collectors.toMap(x->x.getId().toString(), y->y.getGroupName(),(o, n)->n))); this.addDict(model, "groupId",service.queryGroupName(new JobQuery()).stream().collect(Collectors.toMap(x->x.getId().toString(), y->y.getGroupName(),(o, n)->n)));
super.init(model, context); super.init(model, context);
} }
......
...@@ -74,4 +74,5 @@ dingtalk: ...@@ -74,4 +74,5 @@ dingtalk:
AppSecret: @profiles.dingtalk.appSecret@ AppSecret: @profiles.dingtalk.appSecret@
AesKey: @profiles.dingtalk.aesKey@ AesKey: @profiles.dingtalk.aesKey@
token: @profiles.dingtalk.token@ token: @profiles.dingtalk.token@
oaUrl: @profiles.dingtalk.oaUrl@
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<plugin interceptor="com.mortals.framework.thirty.mybatis.LogInterceptor"> <plugin interceptor="com.mortals.framework.thirty.mybatis.LogInterceptor">
<property name="enableExecutorTime" value="true" /> <property name="enableExecutorTime" value="true" />
<property name="showSql" value="true" /> <property name="showSql" value="false" />
</plugin> </plugin>
</plugins> </plugins>
</configuration> </configuration>
\ 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