修改数据大屏

wushunjie
杜函宇 3 months ago
parent 392485c8d7
commit de23667e4e

@ -35,6 +35,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.io.Serializable;
import java.util.Objects;
/**
* j_smart_reminders
@ -195,14 +196,42 @@ public class JSmartRemindersController extends BaseController {
* @param dq
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "修改定期提醒数据")
@PostMapping("/updateDq")
public AjaxResult updateDq(@RequestBody @Valid JSmartRemindersDq dq) throws SchedulerException, TaskException {
if (dq.getAlertType() == 1 || dq.getAlertType() == 4) {
return success(jSmartRemindersService.updateDq(dq));
} else {
throw new ServiceException("请选择正确类型!");
// 看当前用户是否是admin
boolean admin = false;
//查看是other-gov还是gov
boolean b = false;
boolean c = false;
Long userId = null;
try {
admin = SecurityUtils.isAdmin(SecurityUtils.getUserId());
b = SecurityUtils.hasRole("other-gov");
c = SecurityUtils.hasRole("gov");
userId=SecurityUtils.getUserId();
} catch (Exception ignored) {
}
if (admin || b) {
if (dq.getAlertType() == 1 || dq.getAlertType() == 4) {
return success(jSmartRemindersService.updateDq(dq));
} else {
throw new ServiceException("请选择正确类型!");
}
}else if(c){
JSmartReminders bys = jSmartRemindersService.getById(dq.getId());
if(!Objects.equals(bys.getCreateId(), userId)){
throw new ServiceException("您暂无权限修改他人的定时提醒!");
}else {
if (dq.getAlertType() == 1 || dq.getAlertType() == 4) {
return success(jSmartRemindersService.updateDq(dq));
} else {
throw new ServiceException("请选择正确类型!");
}
}
}else {
throw new ServiceException("修改失败,请联系管理员!");
}
}

@ -25,6 +25,7 @@
COUNT(DISTINCT credit_code),
COUNT(*)) AS count
FROM j_project
where status = 5
GROUP BY project_big_type) AS rs ON a.dict_value = rs.project_big_type
LEFT JOIN (SELECT project_middle_type,
IF
@ -34,15 +35,17 @@
COUNT(DISTINCT credit_code),
COUNT(*)) AS count
FROM j_project
where status = 5
GROUP BY project_middle_type) AS ys ON b.dict_value = ys.project_middle_type
LEFT JOIN (SELECT project_small_type,
IF(project_small_type = 14, COUNT(DISTINCT credit_code), COUNT(*)) AS count
FROM j_project
where status = 5
GROUP BY project_small_type) AS us ON c.dict_value = us.project_small_type
LEFT JOIN (SELECT ns.project_small_type,
COUNT(*) AS count
FROM j_project ns
WHERE YEAR(
WHERE status = 5 and YEAR(
NOW()) = ns.project_year
GROUP BY ns.project_small_type) AS ns ON c.dict_value = ns.project_small_type
WHERE a.dict_type = 'project_categories'

@ -16,11 +16,11 @@
ELSE '服务业总部'
END as type,
a.hydm,
IFNULL( ROUND( a.revenue / 10000, 3 ), '-' ) AS revenue,
IFNULL( ROUND( a.taxation / 10000, 3 ), '-' ) AS taxation,
IFNULL( ROUND( a.revenue / 10000, 1 ), '-' ) AS revenue,
IFNULL( ROUND( a.taxation / 10000, 1 ), '-' ) AS taxation,
a.years,
IFNULL( a.output, '-' ) AS output,
IFNULL( a.sales, '-' ) AS sales
IFNULL( ROUND( a.output / 10000, 1 ), '-' ) AS output,
IFNULL( ROUND( a.sales / 10000, 1 ), '-' ) AS sales
FROM
(
SELECT

@ -28,14 +28,25 @@
</select>
<select id="selectAllServicesCount"
resultType="com.ruoyi.jjh.ent.entity.response.JServicesListCountResponse">
SELECT a.services_type,
count(*) AS qyCount,
IFNULL(b.add_value, '-') AS addValue,
IFNULL(ROUND(SUM(b.revenue) / 100000, 1), '-') AS allRevenue
FROM j_services_list a
LEFT JOIN j_business_revenue b ON a.tyshxydm = b.tyshxydm
GROUP BY a.services_type
ORDER BY a.services_type
# SELECT a.services_type,
# count(*) AS qyCount,
# IFNULL(b.add_value, '-') AS addValue,
# IFNULL(ROUND(SUM(b.revenue) / 100000, 1), '-') AS allRevenue
# FROM j_services_list a
# LEFT JOIN j_business_revenue b ON a.tyshxydm = b.tyshxydm
# GROUP BY a.services_type
# ORDER BY a.services_type
SELECT IFNULL(ROUND(SUM(a.revenue) / 100000, 1), '-') as allRevenue,
'-' AS addValue,
a.type as servicesType,
b.qyCount AS qyCount
FROM j_total_revenue a
LEFT JOIN (SELECT a.services_type, count(*) AS qyCount
FROM j_services_list a
GROUP BY a.services_type) AS b ON a.type = b.services_type
WHERE a.years = YEAR(
NOW()) - 1
GROUP BY a.type
</select>
<select id="selectAllZbCount" resultType="com.ruoyi.jjh.ent.entity.response.JServicesListCountResponse">
SELECT 5 AS services_type,

Loading…
Cancel
Save