状态变更代码调整
This commit is contained in:
parent
46b23fe23a
commit
8df9efcdbe
|
|
@ -6,7 +6,6 @@ import com.bonus.purchase.domain.BpmNoticeUser;
|
||||||
import com.bonus.purchase.dto.NoticeDto;
|
import com.bonus.purchase.dto.NoticeDto;
|
||||||
import com.bonus.purchase.service.impl.BpmNoticeUserService;
|
import com.bonus.purchase.service.impl.BpmNoticeUserService;
|
||||||
import com.bonus.task.service.BpmTaskService;
|
import com.bonus.task.service.BpmTaskService;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
|
@ -54,13 +53,23 @@ public class BpmNoticeUserController extends BaseController {
|
||||||
/**
|
/**
|
||||||
* 根据任务ID查询数据
|
* 根据任务ID查询数据
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getUserList/{taskId}")
|
@GetMapping(value = "/getUserList")
|
||||||
public TableDataInfo getListByTaskId(@PathVariable("taskId") Integer taskId) {
|
public TableDataInfo getListByTaskId(@RequestParam("taskId") Integer taskId) {
|
||||||
startPage();
|
startPage();
|
||||||
List<BpmNoticeUser> list = this.bpmNoticeUserService.selectByTaskId(taskId);
|
List<BpmNoticeUser> list = this.bpmNoticeUserService.selectByTaskId(taskId);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有用户人员信息表
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getAllUser")
|
||||||
|
public TableDataInfo getAllUser() {
|
||||||
|
startPage();
|
||||||
|
List<BpmNoticeUser> list = this.bpmNoticeUserService.getAllUser();
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过主键查询单条数据
|
* 通过主键查询单条数据
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,9 @@ public class BpmNoticeUser implements Serializable {
|
||||||
@ApiModelProperty(value="用户角色")
|
@ApiModelProperty(value="用户角色")
|
||||||
private String userRole;
|
private String userRole;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="所属机构")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务ID
|
* 任务ID
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : 阮世耀
|
* @author : 阮世耀
|
||||||
|
|
@ -16,7 +17,7 @@ import javax.validation.constraints.NotEmpty;
|
||||||
public class NoticeDto {
|
public class NoticeDto {
|
||||||
|
|
||||||
@ApiModelProperty(value = "任务ID")
|
@ApiModelProperty(value = "任务ID")
|
||||||
@NotEmpty(message = "任务ID不能为空")
|
@NotNull(message = "任务ID不能为空")
|
||||||
private Integer taskId;
|
private Integer taskId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "类型")
|
@ApiModelProperty(value = "类型")
|
||||||
|
|
|
||||||
|
|
@ -64,5 +64,10 @@ public interface BpmNoticeUserMapper {
|
||||||
|
|
||||||
List<BpmNoticeUser> selectByTaskId(@Param("taskId")Integer taskId);
|
List<BpmNoticeUser> selectByTaskId(@Param("taskId")Integer taskId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有用户人员信息表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<BpmNoticeUser> getAllUser();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -52,7 +52,7 @@ public class BpmNoticeUserService{
|
||||||
.append(device.getMaterialName()).append(",规格型号:")
|
.append(device.getMaterialName()).append(",规格型号:")
|
||||||
.append(device.getMaterialModel())
|
.append(device.getMaterialModel())
|
||||||
.append(",数量:")
|
.append(",数量:")
|
||||||
.append(Double.valueOf(device.getPurchaseNum()) / 100);
|
.append(Double.valueOf(device.getPurchaseNum()) / 1000);
|
||||||
}
|
}
|
||||||
// 4. 调用工具类发送短信
|
// 4. 调用工具类发送短信
|
||||||
try {
|
try {
|
||||||
|
|
@ -116,6 +116,11 @@ public class BpmNoticeUserService{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有用户人员信息表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<BpmNoticeUser> getAllUser() {
|
||||||
|
return bpmNoticeUserMapper.getAllUser();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -199,11 +199,30 @@
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List"/>,
|
<include refid="Base_Column_List"/>,
|
||||||
sys_user.user_name,
|
sys_user.user_name,
|
||||||
sys_role.role_name as user_role
|
sys_role.role_name as user_role,
|
||||||
|
CONCAT(sd2.dept_name,'/',sd1.dept_name,'/',sd.dept_name) as deptName
|
||||||
from bpm_notice_user
|
from bpm_notice_user
|
||||||
left join sys_user on bpm_notice_user.user_id = sys_user.user_id
|
left join sys_user on bpm_notice_user.user_id = sys_user.user_id
|
||||||
left join sys_user_role on sys_user.user_id = sys_user_role.user_id
|
left join sys_user_role on sys_user.user_id = sys_user_role.user_id
|
||||||
left join sys_role on sys_user_role.role_id = sys_role.role_id
|
left join sys_role on sys_user_role.role_id = sys_role.role_id
|
||||||
|
LEFT JOIN sys_dept sd on sys_user.dept_id = sd.dept_id
|
||||||
|
LEFT JOIN sys_dept sd1 on sd.parent_id = sd1.dept_id
|
||||||
|
LEFT JOIN sys_dept sd2 on sd1.parent_id = sd2.dept_id
|
||||||
where bpm_notice_user.task_id = #{taskId,jdbcType=INTEGER}
|
where bpm_notice_user.task_id = #{taskId,jdbcType=INTEGER}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getAllUser" resultType="com.bonus.purchase.domain.BpmNoticeUser">
|
||||||
|
SELECT
|
||||||
|
su.user_id as userId,
|
||||||
|
su.user_name as userName,
|
||||||
|
sr.role_name AS userRole,
|
||||||
|
su.phonenumber as phone,
|
||||||
|
CONCAT( sd2.dept_name, '/', sd1.dept_name, '/', sd.dept_name ) as deptName
|
||||||
|
FROM
|
||||||
|
sys_user su
|
||||||
|
LEFT JOIN sys_user_role sur ON su.user_id = sur.user_id
|
||||||
|
LEFT JOIN sys_role sr ON sur.role_id = sr.role_id
|
||||||
|
LEFT JOIN sys_dept sd ON su.dept_id = sd.dept_id
|
||||||
|
LEFT JOIN sys_dept sd1 ON sd.parent_id = sd1.dept_id
|
||||||
|
LEFT JOIN sys_dept sd2 ON sd1.parent_id = sd2.dept_id
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue