Browse Source

[update]客户资料,修改审核流程中未结束选项,填充数据。

dev
zhangsiqi 7 months ago
parent
commit
8cceccdb17
  1. 4
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java
  2. 35
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java
  3. 4
      ruoyi-admin/src/main/resources/templates/system/customer/add.html
  4. 6
      ruoyi-admin/src/main/resources/templates/system/customer/detail.html
  5. 6
      ruoyi-admin/src/main/resources/templates/system/customer/edit.html
  6. 6
      ruoyi-admin/src/main/resources/templates/system/customer/taskModifyApply.html
  7. 6
      ruoyi-admin/src/main/resources/templates/system/customer/taskYwjlVerify.html
  8. 6
      ruoyi-admin/src/main/resources/templates/system/customer/taskYwzgVerify.html
  9. 6
      ruoyi-admin/src/main/resources/templates/system/customer/taskZozjVerify.html

4
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java

@ -104,6 +104,10 @@ public class SysCustomerController extends BaseController
SysUser curUser = ShiroUtils.getSysUser(); SysUser curUser = ShiroUtils.getSysUser();
Long userId = curUser.getUserId(); Long userId = curUser.getUserId();
// 业务员角色只能看到自己创建的数据 // 业务员角色只能看到自己创建的数据
SysRole role = roleService.selectRoleById(curUser.getRoleId());
if (role.getRoleKey().equals("ywyRole")){
sysCustomerVo.setCreateBy(curUser.getUserName());
}
startPage(); startPage();
List<SysCustomerVo> list = sysCustomerService.selectSysCustomerList(sysCustomerVo); List<SysCustomerVo> list = sysCustomerService.selectSysCustomerList(sysCustomerVo);
return getDataTable(list); return getDataTable(list);

35
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java

@ -92,19 +92,19 @@ public class SysCustomerServiceImpl implements ISysCustomerService
PageDomain pageDomain = TableSupport.buildPageRequest(); PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum(); Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize(); Integer pageSize = pageDomain.getPageSize();
Page<SysCustomerVo> list = (Page<SysCustomerVo>) sysCustomerMapper.selectSysCustomerList(sysCustomerVo1);
Page<SysCustomerVo> returnList = new Page<>(); Page<SysCustomerVo> returnList = new Page<>();
//PageHelper 仅对第一List分页有效 //PageHelper 仅对第一List分页有效
Page<SysCustomerVo> list = (Page<SysCustomerVo>) sysCustomerMapper.selectSysCustomerList(sysCustomerVo1); for(SysCustomerVo sysCustomer : list){
for(SysCustomerVo sysCustomerVo : list){ SysUser sysUser = userMapper.selectUserByLoginName(sysCustomer.getCreateBy());
SysUser sysUser = userMapper.selectUserByLoginName(sysCustomerVo.getCreateBy());
if (sysUser != null) { if (sysUser != null) {
sysCustomerVo.setCreateBy(sysUser.getUserName()); sysCustomer.setCreateBy(sysUser.getUserName());
} }
SysUser sysUser2 = userMapper.selectUserByLoginName(sysCustomerVo.getApplyUser()); SysUser sysUser2 = userMapper.selectUserByLoginName(sysCustomer.getApplyUser());
if (sysUser2!=null){ if (sysUser2!=null){
sysCustomerVo.setApplyUserName(sysUser2.getUserName()); sysCustomer.setApplyUserName(sysUser2.getUserName());
} }
String instanceId = sysCustomerVo.getInstanceId(); String instanceId = sysCustomer.getInstanceId();
// 当前环节 // 当前环节
if (StringUtils.isNotBlank(instanceId)) { if (StringUtils.isNotBlank(instanceId)) {
List<Task> taskList = taskService.createTaskQuery() List<Task> taskList = taskService.createTaskQuery()
@ -114,28 +114,27 @@ public class SysCustomerServiceImpl implements ISysCustomerService
if (!CollectionUtils.isEmpty(taskList)) { if (!CollectionUtils.isEmpty(taskList)) {
TaskEntityImpl task = (TaskEntityImpl) taskList.get(0); TaskEntityImpl task = (TaskEntityImpl) taskList.get(0);
String taskId = task.getId(); String taskId = task.getId();
sysCustomerVo.setTaskId(taskId); sysCustomer.setTaskId(taskId);
// 设置待办用户 // 设置待办用户
List<String> todoUserList = todoItemMapper.selectUndealTodoUserList(taskId); List<String> todoUserList = todoItemMapper.selectUndealTodoUserList(taskId);
if(!CollectionUtils.isEmpty(taskList)){ if(!CollectionUtils.isEmpty(taskList)){
sysCustomerVo.setTodoUserId(String.join(",",todoUserList)); sysCustomer.setTodoUserId(String.join(",",todoUserList));
} }
if (task.getSuspensionState() == 2) { if (task.getSuspensionState() == 2) {
sysCustomerVo.setTaskName("已挂起"); sysCustomer.setTaskName("已挂起");
sysCustomerVo.setSuspendState("2"); sysCustomer.setSuspendState("2");
} else { } else {
sysCustomerVo.setTaskName(task.getName()); sysCustomer.setTaskName(task.getName());
sysCustomerVo.setSuspendState("1"); sysCustomer.setSuspendState("1");
} }
} else { } else {
// 已办结或者已撤销 // 已办结或者已撤销
sysCustomerVo.setTaskName("已结束"); sysCustomer.setTaskName("已结束");
} }
} else {
sysCustomer.setTaskName("未启动");
} }
else { returnList.add(sysCustomer);
sysCustomerVo.setTaskName("未启动");
}
returnList.add(sysCustomerVo);
} }
returnList.setTotal(CollectionUtils.isEmpty(list) ? 0 : list.getTotal()); returnList.setTotal(CollectionUtils.isEmpty(list) ? 0 : list.getTotal());
returnList.setPageNum(pageNum); returnList.setPageNum(pageNum);

4
ruoyi-admin/src/main/resources/templates/system/customer/add.html

@ -10,14 +10,14 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-customer-add"> <form class="form-horizontal m" id="form-customer-add">
<div class="form-group" hidden="hidden"> <div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label">客户ID</label> <label class="col-sm-6 control-label">客户编号</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="id" class="form-control" type="text" required > <input name="id" class="form-control" type="text" required >
</div> </div>
</div> </div>
<div class="form-group" hidden="hidden"> <div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户代码</label> <label class="col-sm-6 control-label is-required">客户ID</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="enterpriseCode" class="form-control" type="text" required> <input name="enterpriseCode" class="form-control" type="text" required>
</div> </div>

6
ruoyi-admin/src/main/resources/templates/system/customer/detail.html

@ -10,13 +10,13 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-customer-detail" th:object="${sysCustomer}"> <form class="form-horizontal m" id="form-customer-detail" th:object="${sysCustomer}">
<div class="form-group" hidden="hidden"> <div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户ID</label> <label class="col-sm-6 control-label is-required">客户编号</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="customerId" th:field="*{id}" class="form-control" type="number" > <input name="id" th:field="*{id}" class="form-control" type="number" >
</div> </div>
</div> </div>
<div class="form-group" hidden="hidden"> <div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户代码</label> <label class="col-sm-6 control-label is-required">客户ID</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input readonly name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required> <input readonly name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required>
</div> </div>

6
ruoyi-admin/src/main/resources/templates/system/customer/edit.html

@ -10,13 +10,13 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-customer-edit" th:object="${sysCustomer}"> <form class="form-horizontal m" id="form-customer-edit" th:object="${sysCustomer}">
<div class="form-group" hidden="hidden"> <div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label">客户ID</label> <label class="col-sm-6 control-label">客户编号</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="customerId" th:field="*{id}" class="form-control" type="number" required > <input name="id" th:field="*{id}" class="form-control" type="number" required >
</div> </div>
</div> </div>
<div class="form-group" hidden="hidden"> <div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户代码</label> <label class="col-sm-6 control-label is-required">客户ID</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required> <input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required>
</div> </div>

6
ruoyi-admin/src/main/resources/templates/system/customer/taskModifyApply.html

@ -37,12 +37,6 @@
</div> </div>
<div class="form-group" hidden="hidden"> <div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户ID:</label> <label class="col-sm-6 control-label is-required">客户ID:</label>
<div class="col-sm-6">
<input name="customerId" th:field="*{id}" class="form-control" type="number" >
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户代码:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input readonly name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required> <input readonly name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required>
</div> </div>

6
ruoyi-admin/src/main/resources/templates/system/customer/taskYwjlVerify.html

@ -37,12 +37,6 @@
</div> </div>
<div class="form-group" hidden="hidden"> <div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户ID:</label> <label class="col-sm-6 control-label is-required">客户ID:</label>
<div class="col-sm-6">
<input name="customerId" th:field="*{id}" class="form-control" type="number" >
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户代码:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input readonly name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required> <input readonly name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required>
</div> </div>

6
ruoyi-admin/src/main/resources/templates/system/customer/taskYwzgVerify.html

@ -38,12 +38,6 @@
</div> </div>
<div class="form-group" hidden="hidden"> <div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户ID:</label> <label class="col-sm-6 control-label is-required">客户ID:</label>
<div class="col-sm-6">
<input name="customerId" th:field="*{id}" class="form-control" type="number" >
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户代码:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input readonly name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required> <input readonly name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required>
</div> </div>

6
ruoyi-admin/src/main/resources/templates/system/customer/taskZozjVerify.html

@ -37,12 +37,6 @@
</div> </div>
<div class="form-group" hidden="hidden"> <div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户ID:</label> <label class="col-sm-6 control-label is-required">客户ID:</label>
<div class="col-sm-6">
<input name="customerId" th:field="*{id}" class="form-control" type="number" >
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户代码:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input readonly name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required> <input readonly name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required>
</div> </div>

Loading…
Cancel
Save