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

增加用户是否使用

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