Commit 6790884d authored by zhuxiang's avatar zhuxiang
Browse files

增加用户是否使用

parent b7bf1879
......@@ -69,6 +69,11 @@ public class CaseController extends BaseController {
return toAjax(caseService.updateExcelUse(excelDataDTO));
}
@PutMapping("/detail/updateUserUse")
public Result updateUserUse(@RequestBody ExcelDataDTO excelDataDTO) {
return toAjax(caseService.updateUserUse(excelDataDTO));
}
@ApiOperation(value = "合并人员")
@PutMapping("/detail/mergeUser")
public Result mergeUser(@RequestBody ExcelDataDTO excelDataDTO) {
......
......@@ -101,6 +101,9 @@ public class ExcelDataEntity {
@TableField("use_flag")
private Boolean useFlag;
@TableField("user_flag")
private Boolean userFlag;
@ApiModelProperty("本人账户")
@TableField(exist = false)
private String selfAccount;
......
......@@ -76,4 +76,6 @@ public interface CasesService extends IService<CasesEntity> {
* @return boolean
*/
Boolean removeBatchCase(List<String> ids);
boolean updateUserUse(ExcelDataDTO excelDataDTO);
}
......@@ -56,4 +56,6 @@ public interface ExcelDataService extends IService<ExcelDataEntity> {
List<ExcelDataEntity> relationPage(List<String> oneselfAccountList, List<String> otherAccountList);
List<ExcelDataEntity> queryInfoList(CaseDTO caseDTO);
List<ExcelDataEntity> queryListByPayUserName(ExcelDataDTO excelDataDTO);
}
......@@ -369,6 +369,14 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem
return baseMapper.removeBatchCase(ids);
}
@Override
public boolean updateUserUse(ExcelDataDTO excelDataDTO) {
//查看excelData
List<ExcelDataEntity> excelDataEntityList = excelDataService.queryListByPayUserName(excelDataDTO);
excelDataEntityList.forEach(excelDataEntity -> excelDataEntity.setUserFlag(excelDataDTO.getUserFlag()));
return excelDataService.updateBatchById(excelDataEntityList);
}
@Override
public List<NodeVO> info(CaseDTO caseDTO) {
// 使用Set去重
......@@ -420,14 +428,14 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem
iterator.remove(); // 安全移除元素
}
}
if(StringUtils.isNotEmpty(caseDTO.getAccountType())){
if(!excelDataVO.getAccountType().equals(caseDTO.getAccountType())){
if (StringUtils.isNotEmpty(caseDTO.getAccountType())) {
if (!excelDataVO.getAccountType().equals(caseDTO.getAccountType())) {
iterator.remove(); // 安全移除元素
}
}
}
List<NodeVO> result = Lists.newArrayList();
groupedObjects.forEach(excelDataVO->{
groupedObjects.forEach(excelDataVO -> {
NodeVO person = new NodeVO();
person.setNode(excelDataVO.getPayUserName());
person.setNodeNum(excelDataVO.getNodeNum());
......@@ -436,7 +444,7 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem
result.add(person);
NodeVO org = new NodeVO();
if(StringUtils.isNotBlank(excelDataVO.getPayeeName()) && excelDataVO.getPayeeName().contains("公司")){
if (StringUtils.isNotBlank(excelDataVO.getPayeeName()) && excelDataVO.getPayeeName().contains("公司")) {
org.setNode(excelDataVO.getPayeeName());
org.setNodeNum(excelDataVO.getNodeNum());
org.setBankCode(excelDataVO.getPayeeBankCard());
......
......@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Lists;
import com.platform.mapper.ExcelDataMapper;
import com.platform.model.dto.CaseDTO;
import com.platform.model.dto.ExcelDataDTO;
import com.platform.model.dto.UserDTO;
import com.platform.model.entity.ExcelDataEntity;
import com.platform.model.vo.AssociationVO;
......@@ -91,4 +92,11 @@ public class ExcelDataServiceImpl extends ServiceImpl<ExcelDataMapper, ExcelData
public List<ExcelDataEntity> queryInfoList(CaseDTO caseDTO) {
return baseMapper.queryInfoList(caseDTO);
}
@Override
public List<ExcelDataEntity> queryListByPayUserName(ExcelDataDTO excelDataDTO) {
return baseMapper.selectList(new LambdaQueryWrapper<ExcelDataEntity>()
.eq(ExcelDataEntity::getCaseId, excelDataDTO.getCaseId())
.eq(ExcelDataEntity::getPayUserName, excelDataDTO.getPayUserName()));
}
}
......@@ -7,6 +7,7 @@
select
ed.pay_user_name,
ed.use_flag,
ed.user_flag,
fu.file_name,
fu.path filePath,
ed.file_id
......@@ -40,6 +41,8 @@
excel_data
where
use_flag = 1
and
user_flag = 1
and
case_id = #{id}
<if test="startTime != null and endTime != ''">
......@@ -144,6 +147,8 @@
ed.pay_user_name = u.user_name
where
ed.use_flag = 1
and
ed.user_flag = 1
and
ed.case_id = #{id}
<if test="startTime != null and endTime != ''">
......
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