be66f3ab 康伟

Merge remote-tracking branch 'origin/master'

2 个父辈 69681c61 88172627
......@@ -349,8 +349,10 @@ public class AjhRectificationInfoController {
@ApiOperation(value="安全态势总览数据统计:统计教育+题库", notes="安全态势总览数据统计:统计教育+题库")
@RequestMapping(value = "/jyCensus", method = RequestMethod.GET)
public Map<String,Object> jyCensus(@RequestParam(name="now",required=true) String now) {
Map<String, Object> result = ajhRectificationInfoService.jyCensus(now);
public Result<Map<String,Object>> jyCensus(@RequestParam(name="now",required=true) String now) {
Result<Map<String,Object>> result = new Result<Map<String,Object>>();
Map<String, Object> map = ajhRectificationInfoService.jyCensus(now);
result.setResult(map);
return result;
}
}
......
......@@ -93,7 +93,7 @@ public class AjhWasteReportController {
if(reportYear==null){
reportYear = String.valueOf(Year.now().getValue());
}
IPage<AjhWasteYearReport> pageList = wasteReportService.queryPageListByYear(page, departId,reportYear);
IPage<AjhWasteYearReport> pageList = wasteReportService.queryPageListByYear(page, departId, reportYear);
result.setSuccess(true);
result.setResult(pageList);
return result;
......
......@@ -9,6 +9,8 @@ import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.jeecgframework.poi.excel.annotation.Excel;
import java.text.DecimalFormat;
/**
* 危险废物台账月报报表
*/
......@@ -57,11 +59,11 @@ public class AjhWasteMonthReport {
@ApiModelProperty(value = "贮存量")
private String monthKeep;
public String getStockOnHand() {
//数据之间应进行逻辑验算:期初量+入库量-出库量=在存量。
if(StringUtils.isEmpty(stockOnHand)){
stockOnHand = ConvertUtils.getDouble(monthProduce,0d) + ConvertUtils.getDouble(monthKeep,0d) - ConvertUtils.getDouble(monthOut,0d)+"" ;
DecimalFormat df = new DecimalFormat("#.##");
stockOnHand = df.format(ConvertUtils.getDouble(monthKeep,0d) - ConvertUtils.getDouble(monthOut,0d)) ;
}
return stockOnHand;
}
......
package com.skua.modules.ajh.entity;
import java.text.DecimalFormat;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.skua.core.aspect.annotation.Dict;
import com.skua.core.util.ConvertUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
......@@ -56,11 +59,23 @@ public class AjhWasteYearReport {
@ApiModelProperty(value = "年度贮存量")
private String yearKeep;
@TableField(exist=false)
@Excel(name = "在存量", width = 15)
@ApiModelProperty(value = "在存量")
private String stockOnHand;
/**出库量*/
@TableField(exist=false)
@Excel(name = "出库量", width = 15)
@ApiModelProperty(value = "出库量")
private String yearOut;
public String getStockOnHand() {
//数据之间应进行逻辑验算:期初量+入库量-出库量=在存量。
if(StringUtils.isEmpty(stockOnHand)){
DecimalFormat df = new DecimalFormat("#.##");
stockOnHand = df.format(ConvertUtils.getDouble(yearKeep,0d) - ConvertUtils.getDouble(yearOut,0d)) ;
}
return stockOnHand;
}
}
......
......@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.skua.modules.ajh.entity.AjhWasteMonthReport;
import com.skua.modules.ajh.entity.AjhWasteYearReport;
import com.skua.tool.annotation.Anonymous;
import org.apache.ibatis.annotations.Param;
import com.skua.modules.ajh.entity.AjhWasteProduce;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
......@@ -14,6 +15,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* 危废产生记录表
*/
public interface AjhWasteProduceMapper extends BaseMapper<AjhWasteProduce> {
/***
* 月报
* @param page
......
......@@ -46,20 +46,19 @@
<select id="queryPageListByYear" resultType="com.skua.modules.ajh.entity.AjhWasteYearReport">
SELECT
p.id,
p.waste_code,
p.waste_name,
LEFT ( p.pro_out_date, 4 ) AS report_year,
ROUND(ifnull(SUM( p.pro_come_count ),0) , 2) AS year_produce,
ROUND(ifnull(SUM( k.keep_out_count ),0) , 2) AS year_out,
ROUND(ifnull(SUM( k.keep_in_count ),0) , 2) AS year_keep,
d.depart_name AS depart_name,
d.id as depart_id
p.id,
p.waste_code,
p.waste_name,
LEFT ( p.pro_out_date, 4 ) AS report_year,
ROUND(ifnull(SUM( p.pro_come_count ),0) , 2) AS year_produce,
ROUND(ifnull(SUM( k.keep_out_count ),0) , 2) AS year_out,
ROUND(ifnull(SUM( k.keep_in_count ),0) , 2) AS year_keep,
d.depart_name AS depart_name,
d.id as depart_id
FROM
ajh_waste_produce p
ajh_waste_produce p
LEFT JOIN ( SELECT * FROM ajh_waste_keep WHERE LEFT ( keep_in_date, 4 ) = #{reportYear} ) k ON p.depart_id = k.depart_id
AND p.waste_code = k.waste_code
AND p.waste_name = k.waste_name
AND p.waste_code = k.waste_code AND p.waste_name = k.waste_name
LEFT JOIN sys_depart d ON p.depart_id = d.id
WHERE
LEFT ( p.pro_out_date, 4 ) = #{reportYear}
......@@ -70,8 +69,8 @@
</foreach>
</if>
GROUP BY
p.depart_id,
p.waste_code,
p.waste_name
p.depart_id,
p.waste_code,
p.waste_name
</select>
</mapper>
......
......@@ -5,9 +5,9 @@ import java.util.Map;
public interface IRealTimeDataService {
List<Map<String, Object>> queryRealTimeData(String factoryId, String type, String structId,String nmName);
List<Map<String, Object>> queryRealTimeData(String departId, String type, String structId,String nmName);
List<Map<String, Object>> queryStructData(String factoryId);
List<Map<String, Object>> queryStructData(String departId);
/**
......@@ -17,7 +17,7 @@ public interface IRealTimeDataService {
* @Param [factoryId]
* @return java.util.Map<java.lang.String, java.lang.Object>
**/
Map<String, Object> getFacInfoByFactoryId(String factoryId);
Map<String, Object> getFacInfoByFactoryId(String departId);
......@@ -34,10 +34,10 @@ public interface IRealTimeDataService {
*
* @Description web趋势
* @Date 2022-03-24 10:12
* @Param [factoryId, timeType, startTime, endTime, id]
* @Param [departId, timeType, startTime, endTime, id]
* @return java.util.Map<java.lang.String, java.lang.Object>
**/
Map<String, Object> getSZTreadWeb(String factoryId, String timeType, String startTime, String endTime, String id);
Map<String, Object> getSZTreadWeb(String departId, String timeType, String startTime, String endTime, String id);
/**
* <pre>
......@@ -71,7 +71,7 @@ public interface IRealTimeDataService {
*/
Map<String, Object> getProjectInfo();
List<Map<String, Object>> queryStructDataApp(String factoryId);
List<Map<String, Object>> queryStructDataApp(String departId);
List<Map<String, Object>> queryRealTimeDataApp(String factoryId, String type, String structId, String sortType,String nmName);
List<Map<String, Object>> queryRealTimeDataApp(String departId, String type, String structId, String sortType,String nmName);
}
......
......@@ -196,20 +196,19 @@ public class ScreenDataServiceImpl implements IScreenDataService {
if (StringUtil.isNotBlank(sb.toString())) {
appendSql = "and a.id in (" + sb.substring(1) + ")";
}
}
return masterDB.queryForList("select t.*,\n" +
"round(avg(t.indexValue/t.proScale),2) as fhl\n" +
", round(sum(t.indexValue),2) totalCLSL\n" +
"from(\n" +
"SELECT a.id as departId,a.depart_name as departName,b.index_tag as indexTag,b.index_value as indexValue," +
"(select c.pro_scale*10000 from sys_factory_info c where a.id = c.depart_id) as proScale\n" +
"FROM sys_depart a LEFT JOIN sys_data_calculation b ON a.id = b.depart_id \n" +
"where a.del_flag= 1 and a.depart_type = 1 and b.index_tag = 'JSLJLL'\n" +
"\tand ts LIKE '" + month + "%' \n" + appendSql+
"\tGROUP BY a.id, b.ts)t GROUP BY t.departId");
String dataViewName2119 = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL", departId, month);
String sql = "select t.*," +
" round(avg(t.indexValue/t.proScale),2) as fhl," +
" round(sum(t.indexValue),2) totalCLSL " +
" from( " +
" SELECT a.id as departId,a.depart_name as departName,'JSLJLL' as indexTag,b.CSL as indexValue," +
" (select c.pro_scale*10000 from sys_factory_info c where a.id = c.depart_id) as proScale " +
" FROM sys_depart a " +
" LEFT JOIN (select v2.time,v2.CSL,v2.depart_id from "+dataViewName2119+" v2 where v2.time like '"+month+"%') b ON a.id = b.depart_id" +
" where a.del_flag= 1 and a.depart_type = 1 " + appendSql +
" GROUP BY a.id, b.time)t GROUP BY t.departId";
return masterDB.queryForList(sql);
}
@Override
......
......@@ -162,11 +162,11 @@ skua:
isRunTimeInterval: 3600
#视频对接相关配置,未使用,待完善
video:
lan: 20.0.99.6
ip: 113.249.91.27
lan: 112.123.135.139
ip: 112.123.135.139
port: 8667
appkey: 21656155
secretkey: llQvkzDIzmYnNiXNYxDN
appkey: 29461614
secretkey: RkJhpwVKJyf0FbDwQpbP
#消息推送
push:
#是否开启流程消息推送
......
......@@ -103,4 +103,7 @@ public class EquipmentMaintainTask {
@ApiModelProperty(value = "维保类型")
@Dict(dicCode = "maintenance_type")
private String maintenanceType;
@TableField(exist = false)
@ApiModelProperty(value = "预估费用")
private String planCost;
}
......
......@@ -26,6 +26,7 @@
emt.picture_url AS pictureUrl,
emt.equipment_id AS equipmentId,
emt.results_enforcement AS resultsEnforcement,
emp.plan_cost AS planCost,
emp.plan_accepter_id AS planAccepterId,
emp.plan_arranger_id,
emt.device_administrator_id AS deviceAdministratorId,
......
......@@ -1121,20 +1121,21 @@ public class SysUserController {
String newCid = loginUser.getCid();
if (StrUtil.isNotBlank(newCid)) {
//修改手机cid
String oldCid = oldUser.getCid();
if (StringUtils.isBlank(oldCid)) {
oldUser.setCid(loginUser.getCid());
} else {
String[] split = oldCid.split(",");
Set<String> sets = new HashSet<>(Arrays.asList(split));
sets.add(loginUser.getCid());
StringBuilder stringBuilder = new StringBuilder();
for (String set : sets) {
stringBuilder.append(set + ",");
}
stringBuilder.deleteCharAt(stringBuilder.length() - 1);
oldUser.setCid(stringBuilder.toString());
}
oldUser.setCid(loginUser.getCid());
// String oldCid = oldUser.getCid();
// if (StringUtils.isBlank(oldCid)) {
// oldUser.setCid(loginUser.getCid());
// } else {
// String[] split = oldCid.split(",");
// Set<String> sets = new HashSet<>(Arrays.asList(split));
// sets.add(loginUser.getCid());
// StringBuilder stringBuilder = new StringBuilder();
// for (String set : sets) {
// stringBuilder.append(set + ",");
// }
// stringBuilder.deleteCharAt(stringBuilder.length() - 1);
// oldUser.setCid(stringBuilder.toString());
// }
sysBaseAPI.updateUser(oldUser);
result.success("cid修改成功");
}
......
......@@ -255,6 +255,11 @@
'${item}'
</foreach>
)
OR parent_id IN ( SELECT id from sys_depart WHERE parent_id IN(SELECT id FROM sys_depart WHERE parent_id IN
<foreach item="item" index="index" collection="departIds.split(',')" open="(" separator="," close=")">
'${item}'
</foreach>
))
ORDER BY
depart_type,
depart_order
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!