bug修复
This commit is contained in:
parent
6803f3cb0d
commit
ba8285c918
|
|
@ -11,6 +11,11 @@ import java.time.LocalDateTime;
|
|||
@Data
|
||||
public class EmployeeVO {
|
||||
|
||||
|
||||
private String projectName;
|
||||
|
||||
private String taskName;
|
||||
|
||||
private Long userId;
|
||||
|
||||
private Long projectId;
|
||||
|
|
@ -56,5 +61,10 @@ public class EmployeeVO {
|
|||
*/
|
||||
private Integer terminalNum;
|
||||
|
||||
/**
|
||||
* 新增商户数
|
||||
*/
|
||||
private Integer storeNum;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
|||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.chushang.common.dict.annotation.DictFormat;
|
||||
import com.chushang.common.mybatis.base.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
|
@ -11,6 +12,7 @@ import lombok.EqualsAndHashCode;
|
|||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @auther: zhao
|
||||
|
|
@ -81,6 +83,7 @@ public class WrkAuditRule extends BaseEntity {
|
|||
* 单位
|
||||
*/
|
||||
@TableField(value = "number_type")
|
||||
@DictFormat(dictType = "sys_auditTime_type")
|
||||
private Integer numberType;
|
||||
|
||||
/**
|
||||
|
|
@ -89,4 +92,7 @@ public class WrkAuditRule extends BaseEntity {
|
|||
@TableField(value = "number_wrk")
|
||||
private Integer numberWrk;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<String> ruleTimeList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.chushang.common.mybatis.page.CommonParam;
|
|||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
|
|
@ -78,4 +79,7 @@ public class WrkAuditRuleDTO {
|
|||
private Integer numberWrk;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<String> ruleTimeList;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -201,6 +201,40 @@ public class WrkProjectController {
|
|||
return AjaxResult.success(projectService.empData(projectQuery));
|
||||
}
|
||||
|
||||
/**
|
||||
* 人工数据详情
|
||||
*/
|
||||
@GetMapping(value = "/detail/{userId}")
|
||||
// @RequiresPermissions("inspection:project:info")
|
||||
public AjaxResult detail(@PathVariable Long userId)
|
||||
{
|
||||
return AjaxResult.success(projectService.empDetail(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目数据导出
|
||||
* @param projectQuery 查询条件
|
||||
*/
|
||||
@SysLog(value = "项目数据", businessType = BusinessType.EXPORT)
|
||||
@GetMapping(value = "/emp/data/export")
|
||||
// @RequiresPermissions("inspection:project:export")
|
||||
public AjaxResult empDataExport(ProjectQuery projectQuery)
|
||||
{
|
||||
return AjaxResult.success("人员数据导出成功, 请在后台任务中查看, 任务id: ["+ projectService.projectDataExport(projectQuery) +"]");
|
||||
}
|
||||
|
||||
/**
|
||||
* 财务数据导出
|
||||
* @param projectQuery 查询条件
|
||||
*/
|
||||
@SysLog(value = "财务数据", businessType = BusinessType.EXPORT)
|
||||
@GetMapping(value = "/payMentData/data/export")
|
||||
// @RequiresPermissions("inspection:project:export")
|
||||
public AjaxResult payMentDataExport(ProjectQuery projectQuery)
|
||||
{
|
||||
return AjaxResult.success("财务数据导出成功, 请在后台任务中查看, 任务id: ["+ projectService.projectDataExport(projectQuery) +"]");
|
||||
}
|
||||
//
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@ public class WrkProjectPaymentService extends ServiceImpl<WrkProjectPaymentMappe
|
|||
@Resource
|
||||
WrkProjectContractService contractService;
|
||||
|
||||
public List<WrkProjectPaymentVO> payMentData(WrkProjectPayment query, CommonParam commonParam)
|
||||
public PageResult payMentData(WrkProjectPayment query, CommonParam commonParam)
|
||||
{
|
||||
Page<Store> page = new Page<>(commonParam.getPage(), commonParam.getLimit());
|
||||
return baseMapper.payMentData(query,page);
|
||||
return new PageResult(baseMapper.payMentData(query,page),page.getTotal(),page.getSize(),page.getCurrent());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -304,13 +304,13 @@ public class WrkProjectService extends ServiceImpl<WrkProjectMapper, WrkProject>
|
|||
|
||||
return remoteTaskService.createTask(CreateTaskDTO.builder()
|
||||
.params(JSON.toJSONString(projectQuery))
|
||||
.taskName("项目数据导出")
|
||||
.taskName("人员数据导出")
|
||||
.applicationName(ServiceEnum.INSPECTION)
|
||||
.methodName("export")
|
||||
.className(this.getClass().getName())
|
||||
.deptId(SecurityUtils.getDeptId())
|
||||
.taskType(TaskTypeEnum.DOWN)
|
||||
.remark("五统一商户明细导出")
|
||||
.remark("人员数据明细导出")
|
||||
.createBy(SecurityUtils.getUsername())
|
||||
.build(), SecurityConstants.INNER).getData();
|
||||
}
|
||||
|
|
@ -380,11 +380,33 @@ public class WrkProjectService extends ServiceImpl<WrkProjectMapper, WrkProject>
|
|||
}
|
||||
|
||||
public PageResult empData(ProjectQuery projectQuery) {
|
||||
CommonParam commonParam = CommonParam.buildPageRequest();
|
||||
Page<WrkInfoDetailsVO> page = new Page<>(commonParam.getPage(), commonParam.getLimit());
|
||||
List<EmployeeVO> employeeVOList1 = wrkInfoService.empData(
|
||||
projectQuery
|
||||
);
|
||||
return new PageResult(employeeVOList1,page.getTotal(),page.getSize(),page.getCurrent());
|
||||
return wrkInfoService.empData(projectQuery);
|
||||
}
|
||||
|
||||
public PageResult empDetail(Long userId){
|
||||
return wrkInfoService.detailData(userId);
|
||||
}
|
||||
|
||||
@DataScope
|
||||
public Long empDataExport(ProjectQuery projectQuery) {
|
||||
|
||||
LambdaQueryWrapper<WrkProject> sql = WrapperUtils.builder(projectQuery, CommonParam.buildAllRequest());
|
||||
long recordList = this.count(
|
||||
sql
|
||||
);
|
||||
AssertUtil.invalidate (recordList <= 0, "导出数据为空");
|
||||
|
||||
return remoteTaskService.createTask(CreateTaskDTO.builder()
|
||||
.params(JSON.toJSONString(projectQuery))
|
||||
.taskName("项目数据导出")
|
||||
.applicationName(ServiceEnum.INSPECTION)
|
||||
.methodName("export")
|
||||
.className(this.getClass().getName())
|
||||
.deptId(SecurityUtils.getDeptId())
|
||||
.taskType(TaskTypeEnum.DOWN)
|
||||
.remark("五统一商户明细导出")
|
||||
.createBy(SecurityUtils.getUsername())
|
||||
.build(), SecurityConstants.INNER).getData();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,4 +41,7 @@ public interface WrkInfoMapper extends BaseMapper<WrkInfo> {
|
|||
@Param("wrkTypes") Set<Integer> wrkTypes);
|
||||
|
||||
List<EmployeeVO> empData(@Param("query") ProjectQuery projectQuery, Page<WrkInfo> page);
|
||||
|
||||
|
||||
List<EmployeeVO> empDetail(@Param("userId") Long userId, Page<WrkInfo> page);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package com.chushang.inspection.work.service;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.chushang.common.mybatis.utils.PageResult;
|
||||
import com.chushang.common.mybatis.utils.WrapperUtils;
|
||||
import com.chushang.inspection.project.dto.AuditDTO;
|
||||
import com.chushang.inspection.project.query.ProjectQuery;
|
||||
import com.chushang.inspection.project.vo.CountVO;
|
||||
|
|
@ -55,7 +57,10 @@ public interface WrkInfoService extends IService<WrkInfo> {
|
|||
|
||||
List<CountVO> countByProjectIds(Set<Long> projectIds, Set<Integer> wrkType);
|
||||
|
||||
List<EmployeeVO> empData(ProjectQuery projectQuery);
|
||||
PageResult empData(ProjectQuery projectQuery);
|
||||
|
||||
PageResult detailData(Long userId);
|
||||
|
||||
default Map<Long, Integer> countByProjectIdsMap(Set<Long> projectIds, Set<Integer> wrkType){
|
||||
List<CountVO> countVOS = countByProjectIds(projectIds, wrkType);
|
||||
if (CollectionUtil.isNotEmpty(countVOS)){
|
||||
|
|
|
|||
|
|
@ -86,12 +86,28 @@ public class WrkAuditRuleServiceImpl extends ServiceImpl<WrkAuditRuleMapper, Wrk
|
|||
|
||||
@Override
|
||||
public PageResult queryRulePage(WrkAuditRuleQuery query) {
|
||||
Map<String,String> date = new HashMap<>();
|
||||
date.put("1","周一");
|
||||
date.put("2","周二");
|
||||
date.put("3","周三");
|
||||
date.put("4","周四");
|
||||
date.put("5","周五");
|
||||
date.put("6","周六");
|
||||
date.put("7","周日");
|
||||
CommonParam commonParam = CommonParam.buildPageRequest();
|
||||
LambdaQueryWrapper<WrkAuditRule> queryWrapper = WrapperUtils.builder(query, commonParam);
|
||||
IPage<WrkAuditRule> page = this.page(
|
||||
new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(commonParam.getPage(), commonParam.getLimit()),
|
||||
queryWrapper
|
||||
);
|
||||
for (WrkAuditRule record : page.getRecords()) {
|
||||
List<String> list = new ArrayList<>();
|
||||
for (String s : record.getRuleTime().split(",")) {
|
||||
list.add(date.get(s));
|
||||
}
|
||||
record.setRuleTimeList(Arrays.asList(String.join(",", list)));
|
||||
}
|
||||
|
||||
return new PageResult(page);
|
||||
}
|
||||
|
||||
|
|
@ -101,6 +117,9 @@ public class WrkAuditRuleServiceImpl extends ServiceImpl<WrkAuditRuleMapper, Wrk
|
|||
WrkAuditRule wrkAuditRule = this.getById(dto.getId());
|
||||
Assert.notNull(wrkAuditRule, "修改失败,数据不存在");
|
||||
BeanUtil.copyProperties(dto, wrkAuditRule);
|
||||
if(!dto.getRuleTimeList().isEmpty()){
|
||||
wrkAuditRule.setRuleTime(String.join(",", dto.getRuleTime()));
|
||||
}
|
||||
return this.updateById(wrkAuditRule) ? 1 : 0;
|
||||
} else {
|
||||
WrkAuditRule wrkAuditRule = new WrkAuditRule();
|
||||
|
|
@ -108,6 +127,7 @@ public class WrkAuditRuleServiceImpl extends ServiceImpl<WrkAuditRuleMapper, Wrk
|
|||
wrkAuditRule.setId(IdUtil.getSnowflakeNextId());
|
||||
wrkAuditRule.setDeptId(SecurityUtils.getDeptId());
|
||||
wrkAuditRule.setUserId(SecurityUtils.getUserId());
|
||||
wrkAuditRule.setRuleTime(String.join(",", dto.getRuleTime()));
|
||||
return this.save(wrkAuditRule) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -674,7 +674,7 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<EmployeeVO> empData(ProjectQuery projectQuery) {
|
||||
public PageResult empData(ProjectQuery projectQuery) {
|
||||
CommonParam commonParam = CommonParam.buildPageRequest();
|
||||
Page<WrkInfo> page = new Page<>(commonParam.getPage(), commonParam.getLimit());
|
||||
List<EmployeeVO> employeeVOList = baseMapper.empData(projectQuery, page);
|
||||
|
|
@ -685,20 +685,44 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
|||
= remoteDeptService.getDeptNameByIds(deptIds, SecurityConstants.INNER);
|
||||
|
||||
Map<Long, SysUser> userNameByIds = userFeignService.getUserNameByIds(userIds, SecurityConstants.INNER);
|
||||
System.out.println(JSON.toJSONString(userNameByIds));
|
||||
// 被派单次数
|
||||
|
||||
|
||||
LambdaQueryWrapper<WrkInfo> configSql = WrapperUtils.builder();
|
||||
configSql.in(WrkInfo::getUserId, userIds);
|
||||
|
||||
// 查询全部工单
|
||||
for (EmployeeVO employeeVO:employeeVOList){
|
||||
employeeVO.setDeptName(deptNameMap.get(employeeVO.getDeptId()));
|
||||
employeeVO.setProjectConcat(userNameByIds.get(employeeVO.getUserId()).getNickName());
|
||||
employeeVO.setProjectPhone(userNameByIds.get(employeeVO.getUserId()).getPhone());
|
||||
employeeVO.setProjectConcat(userNameByIds.get(employeeVO.getUserId()) == null ?"admin":userNameByIds.get(employeeVO.getUserId()).getNickName());
|
||||
employeeVO.setProjectPhone(userNameByIds.get(employeeVO.getUserId())== null ? "17638147107":userNameByIds.get(employeeVO.getUserId()).getPhone());
|
||||
}
|
||||
|
||||
return employeeVOList;
|
||||
return new PageResult(employeeVOList,page.getTotal(),page.getSize(),page.getCurrent());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult detailData(Long userId) {
|
||||
CommonParam commonParam = CommonParam.buildPageRequest();
|
||||
Page<WrkInfo> page = new Page<>(commonParam.getPage(), commonParam.getLimit());
|
||||
List<EmployeeVO> employeeVOList = baseMapper.empDetail(userId,page);
|
||||
Set<Long> deptIds = employeeVOList.stream().map(EmployeeVO::getDeptId).collect(Collectors.toSet());
|
||||
Set<Long> userIds = employeeVOList.stream().map(EmployeeVO::getUserId).collect(Collectors.toSet());
|
||||
// 查询全部部门
|
||||
Map<Long, String> deptNameMap
|
||||
= remoteDeptService.getDeptNameByIds(deptIds, SecurityConstants.INNER);
|
||||
|
||||
Map<Long, SysUser> userNameByIds = userFeignService.getUserNameByIds(userIds, SecurityConstants.INNER);
|
||||
// 被派单次数
|
||||
LambdaQueryWrapper<WrkInfo> configSql = WrapperUtils.builder();
|
||||
configSql.in(WrkInfo::getUserId, userIds);
|
||||
|
||||
// 查询全部工单
|
||||
for (EmployeeVO employeeVO:employeeVOList){
|
||||
employeeVO.setDeptName(deptNameMap.get(employeeVO.getDeptId()));
|
||||
employeeVO.setProjectConcat(userNameByIds.get(employeeVO.getUserId()) == null ?"admin":userNameByIds.get(employeeVO.getUserId()).getNickName());
|
||||
employeeVO.setProjectPhone(userNameByIds.get(employeeVO.getUserId())== null ? "17638147107":userNameByIds.get(employeeVO.getUserId()).getPhone());
|
||||
}
|
||||
return new PageResult(employeeVOList,page.getTotal(),page.getSize(),page.getCurrent());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chushang.inspection.work.mapper.WrkInfoMapper">
|
||||
<select id="queryDispatchPage" resultMap="wrkInfoDetailsVOResult">
|
||||
<include refid="wrkInfoDetailSql" />
|
||||
<include refid="wrkInfoDetailSql"/>
|
||||
<if test="1 == 1">
|
||||
${query.sqlParam.get('sqlWhere')}
|
||||
</if>
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
</select>
|
||||
|
||||
<select id="exportDispatchPage" resultType="com.chushang.inspection.work.vo.WrkInfoExportVO">
|
||||
<include refid="wrkInfoDetailSql" />
|
||||
<include refid="wrkInfoDetailSql"/>
|
||||
<if test="1 == 1">
|
||||
${query.sqlParam.get('sqlWhere')}
|
||||
</if>
|
||||
|
|
@ -23,19 +23,19 @@
|
|||
ORDER BY i.create_time desc
|
||||
</select>
|
||||
<resultMap id="resultWrkInfoExportVO" type="com.chushang.inspection.work.vo.WrkInfoExportVO">
|
||||
<id column="terminal_id" property="terminalId" />
|
||||
<result column="user_name" property="userName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="legal_name" property="legalName" />
|
||||
<result column="terminal_address" property="terminalAddress" />
|
||||
<result column="terminal_no" property="terminalNo" />
|
||||
<result column="terminal_sn" property="terminalSn" />
|
||||
<result column="terminal_source" property="terminalSource" />
|
||||
<result column="work_no" property="workNo" />
|
||||
<id column="terminal_id" property="terminalId"/>
|
||||
<result column="user_name" property="userName"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="legal_name" property="legalName"/>
|
||||
<result column="terminal_address" property="terminalAddress"/>
|
||||
<result column="terminal_no" property="terminalNo"/>
|
||||
<result column="terminal_sn" property="terminalSn"/>
|
||||
<result column="terminal_source" property="terminalSource"/>
|
||||
<result column="work_no" property="workNo"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="queryArchivePage" resultMap="wrkInfoDetailsVOResult">
|
||||
<include refid="wrkInfoDetailSql" />
|
||||
<include refid="wrkInfoDetailSql"/>
|
||||
<if test="1 == 1">
|
||||
${query.sqlParam.get('sqlWhere')}
|
||||
</if>
|
||||
|
|
@ -91,78 +91,78 @@
|
|||
</select>
|
||||
<resultMap id="wrkInfoDetailsVOResult" type="com.chushang.inspection.work.vo.WrkInfoDetailsVO">
|
||||
<association property="wrkInfo" javaType="com.chushang.inspection.work.vo.WrkInfoVO">
|
||||
<id column="wrk_id" property="wrkId" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="account_manager" property="accountManager" />
|
||||
<result column="account_phone" property="accountPhone" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="dept_id" property="deptId" />
|
||||
<result column="dept_name" property="deptName" />
|
||||
<result column="dispose_time" property="disposeTime" />
|
||||
<result column="end_time" property="endTime" />
|
||||
<result column="lower_task_id" property="lowerTaskId" />
|
||||
<result column="lower_task_name" property="lowerTaskName" />
|
||||
<result column="service_result" property="serviceResult" />
|
||||
<result column="task_id" property="taskId" />
|
||||
<result column="task_name" property="taskName" />
|
||||
<result column="user_id" property="userId" />
|
||||
<result column="user_name" property="userName" />
|
||||
<result column="work_method" property="workMethod" />
|
||||
<result column="work_no" property="workNo" />
|
||||
<result column="work_sort" property="workSort" />
|
||||
<result column="work_source" property="workSource" />
|
||||
<result column="work_type" property="workType" />
|
||||
<id column="wrk_id" property="wrkId"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="account_manager" property="accountManager"/>
|
||||
<result column="account_phone" property="accountPhone"/>
|
||||
<result column="create_by" property="createBy"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="dept_id" property="deptId"/>
|
||||
<result column="dept_name" property="deptName"/>
|
||||
<result column="dispose_time" property="disposeTime"/>
|
||||
<result column="end_time" property="endTime"/>
|
||||
<result column="lower_task_id" property="lowerTaskId"/>
|
||||
<result column="lower_task_name" property="lowerTaskName"/>
|
||||
<result column="service_result" property="serviceResult"/>
|
||||
<result column="task_id" property="taskId"/>
|
||||
<result column="task_name" property="taskName"/>
|
||||
<result column="user_id" property="userId"/>
|
||||
<result column="user_name" property="userName"/>
|
||||
<result column="work_method" property="workMethod"/>
|
||||
<result column="work_no" property="workNo"/>
|
||||
<result column="work_sort" property="workSort"/>
|
||||
<result column="work_source" property="workSource"/>
|
||||
<result column="work_type" property="workType"/>
|
||||
<result column="wrk_status" property="wrkStatus"/>
|
||||
</association>
|
||||
<association property="infoStore" javaType="com.chushang.inspection.work.vo.WrkInfoStoreVO">
|
||||
<id column="store_id" property="storeId" />
|
||||
<id column="store_id" property="storeId"/>
|
||||
|
||||
<result column="ins_fre" property="insFre" />
|
||||
<result column="legal_name" property="legalName" />
|
||||
<result column="products" property="products" />
|
||||
<result column="register_address" property="registerAddress" />
|
||||
<result column="shop_name" property="shopName" />
|
||||
<result column="special_num" property="specialNum" />
|
||||
<result column="store_address" property="storeAddress" />
|
||||
<result column="store_contact" property="storeContact" />
|
||||
<result column="store_name" property="storeName" />
|
||||
<result column="store_no" property="storeNo" />
|
||||
<result column="store_phone" property="storePhone" />
|
||||
<result column="state" property="storeStatus" />
|
||||
<result column="store_type" property="storeType" />
|
||||
<result column="tip_tool" property="tipTool" />
|
||||
<result column="ins_fre" property="insFre"/>
|
||||
<result column="legal_name" property="legalName"/>
|
||||
<result column="products" property="products"/>
|
||||
<result column="register_address" property="registerAddress"/>
|
||||
<result column="shop_name" property="shopName"/>
|
||||
<result column="special_num" property="specialNum"/>
|
||||
<result column="store_address" property="storeAddress"/>
|
||||
<result column="store_contact" property="storeContact"/>
|
||||
<result column="store_name" property="storeName"/>
|
||||
<result column="store_no" property="storeNo"/>
|
||||
<result column="store_phone" property="storePhone"/>
|
||||
<result column="state" property="storeStatus"/>
|
||||
<result column="store_type" property="storeType"/>
|
||||
<result column="tip_tool" property="tipTool"/>
|
||||
</association>
|
||||
<association property="infoTerminal" javaType="com.chushang.inspection.work.vo.WrkInfoTerminalVO">
|
||||
<id column="terminal_id" property="terminalId" />
|
||||
<result column="terminal_address" property="terminalAddress" />
|
||||
<result column="terminal_model" property="terminalModel" />
|
||||
<result column="terminal_no" property="terminalNo" />
|
||||
<result column="terminal_property" property="terminalProperty" />
|
||||
<result column="terminal_sn" property="terminalSn" />
|
||||
<result column="terminal_source" property="terminalSource" />
|
||||
<result column="terminal_status" property="terminalStatus" />
|
||||
<result column="terminal_type" property="terminalType" />
|
||||
<result column="terminal_version" property="terminalVersion" />
|
||||
<id column="terminal_id" property="terminalId"/>
|
||||
<result column="terminal_address" property="terminalAddress"/>
|
||||
<result column="terminal_model" property="terminalModel"/>
|
||||
<result column="terminal_no" property="terminalNo"/>
|
||||
<result column="terminal_property" property="terminalProperty"/>
|
||||
<result column="terminal_sn" property="terminalSn"/>
|
||||
<result column="terminal_source" property="terminalSource"/>
|
||||
<result column="terminal_status" property="terminalStatus"/>
|
||||
<result column="terminal_type" property="terminalType"/>
|
||||
<result column="terminal_version" property="terminalVersion"/>
|
||||
</association>
|
||||
<association property="infoTerminalIns" javaType="com.chushang.inspection.work.vo.WrkInfoTerminalInsVO">
|
||||
<id column="terminal_id" property="terminalId" />
|
||||
<result column="deviation" property="deviation" />
|
||||
<result column="geographic_location" property="geographicLocation" />
|
||||
<result column="work_address" property="workAddress" />
|
||||
<result column="work_location" property="workLocation" />
|
||||
<result column="geographic_address" property="locationAddress" />
|
||||
<result column="pre_code_encoding" property="preCodeEncoding" />
|
||||
<result column="service_result" property="serviceResult" />
|
||||
<result column="storage_time" property="storageTime" />
|
||||
<result column="times_pass" property="timesPass" />
|
||||
<result column="delivery_time" property="deliveryTime" />
|
||||
<result column="inspection_status" property="inspectionStatus" />
|
||||
<result column="inspection_time" property="inspectionTime" />
|
||||
<id column="terminal_id" property="terminalId"/>
|
||||
<result column="deviation" property="deviation"/>
|
||||
<result column="geographic_location" property="geographicLocation"/>
|
||||
<result column="work_address" property="workAddress"/>
|
||||
<result column="work_location" property="workLocation"/>
|
||||
<result column="geographic_address" property="locationAddress"/>
|
||||
<result column="pre_code_encoding" property="preCodeEncoding"/>
|
||||
<result column="service_result" property="serviceResult"/>
|
||||
<result column="storage_time" property="storageTime"/>
|
||||
<result column="times_pass" property="timesPass"/>
|
||||
<result column="delivery_time" property="deliveryTime"/>
|
||||
<result column="inspection_status" property="inspectionStatus"/>
|
||||
<result column="inspection_time" property="inspectionTime"/>
|
||||
</association>
|
||||
</resultMap>
|
||||
<select id="listInsTemplate" resultMap="wrkInfoDetailsVOResult">
|
||||
<include refid="wrkInfoDetailSql" />
|
||||
<include refid="wrkInfoDetailSql"/>
|
||||
<if test="1 == 1">
|
||||
${query.sqlParam.get('sqlWhere')}
|
||||
</if>
|
||||
|
|
@ -172,13 +172,12 @@
|
|||
ORDER BY i.create_time desc
|
||||
</select>
|
||||
<select id="getWrkInfoDetails" resultMap="wrkInfoDetailsVOResult">
|
||||
<include refid="wrkInfoDetailSql" />
|
||||
<include refid="wrkInfoDetailSql"/>
|
||||
AND i.wrk_id = #{wrkId}
|
||||
ORDER BY i.create_time desc
|
||||
</select>
|
||||
<sql id="wrkInfoDetailSql">
|
||||
SELECT
|
||||
i.wrk_id,
|
||||
SELECT i.wrk_id,
|
||||
i.`dept_id`,
|
||||
i.`task_id`,
|
||||
i.`lower_task_id`,
|
||||
|
|
@ -242,8 +241,7 @@
|
|||
itr.`terminal_version`,
|
||||
itr.`terminal_property`,
|
||||
itr.`terminal_status`
|
||||
FROM
|
||||
`wrk_info` i
|
||||
FROM `wrk_info` i
|
||||
LEFT JOIN wrk_info_store_record isr ON i.wrk_id = isr.wrk_id
|
||||
LEFT JOIN wrk_info_terminal_record itr ON i.wrk_id = itr.wrk_id
|
||||
LEFT JOIN wrk_info_terminal_ins_record itir ON i.wrk_id = itir.wrk_id
|
||||
|
|
@ -270,12 +268,26 @@
|
|||
</select>
|
||||
|
||||
<select id="empData" resultType="com.chushang.inspection.project.vo.EmployeeVO">
|
||||
SELECT user_id as userId,dept_id as deptId,count(user_id) as dispatchNum,count(CASE WHEN state = 4 OR state = 7 THEN 1 ELSE 0 END) as aduitNum
|
||||
SELECT user_id as userId,dept_id as deptId,count(user_id) as dispatchNum,count(CASE WHEN wrk_status = 4 OR wrk_status = 7
|
||||
THEN 1 ELSE 0 END) as aduitNum
|
||||
FROM wrk_info
|
||||
where del_state = 0
|
||||
<if test="query.projectConcat != null and query.projectConcat != ''">
|
||||
AND project_concat = #{projectConcat}
|
||||
AND project_concat = #{query.projectConcat}
|
||||
</if>
|
||||
GROUP BY user_id
|
||||
</select>
|
||||
|
||||
<select id="empDetail" resultType="com.chushang.inspection.project.vo.EmployeeVO">
|
||||
SELECT t1.user_id as userId,
|
||||
t1.dept_id as deptId,
|
||||
t1.lower_task_name as taskName,
|
||||
t2.project_name as projectName,
|
||||
count(1) as dispatchNum,count(CASE WHEN t1.wrk_status = 4 OR t1.wrk_status = 7
|
||||
THEN 1 ELSE 0 END) as aduitNum
|
||||
FROM wrk_info t1 inner join wrk_project t2 on t1.project_id = t2.project_id
|
||||
where t1.del_state = 0
|
||||
and t1.user_id = #{userId}
|
||||
GROUP BY t1.project_id,t1.lower_task_id
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
<select id="payMentData" resultType="com.chushang.inspection.project.vo.WrkProjectPaymentVO">
|
||||
select
|
||||
t2.project_name as projectName,
|
||||
t2.user_id as userId,
|
||||
t2.project_id as projectId,
|
||||
t2.project_concat as projectConcat,
|
||||
t2.project_phone as projectPhone,
|
||||
|
|
|
|||
|
|
@ -2,12 +2,15 @@ package com.chushang.system.remote;
|
|||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.chushang.common.core.util.StringUtils;
|
||||
import com.chushang.common.core.web.AjaxResult;
|
||||
import com.chushang.common.core.web.Result;
|
||||
import com.chushang.common.mybatis.utils.PageResult;
|
||||
import com.chushang.security.entity.po.DataScopeEntity;
|
||||
import com.chushang.security.annotation.InnerAuth;
|
||||
import com.chushang.security.entity.po.SysDept;
|
||||
import com.chushang.security.entity.vo.LoginUser;
|
||||
import com.chushang.security.entity.po.SysUser;
|
||||
import com.chushang.system.entity.dto.ListUserDTO;
|
||||
import com.chushang.system.feign.RemoteUserService;
|
||||
import com.chushang.system.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -106,4 +109,10 @@ public class RemoteUserController implements RemoteUserService {
|
|||
}
|
||||
|
||||
|
||||
@GetMapping(value = "/empData")
|
||||
@InnerAuth
|
||||
public AjaxResult empData(ListUserDTO listUser) {
|
||||
return sysUserService.listUser(listUser);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue