5b7b75e4 张雷

Merge remote-tracking branch 'origin/master' into master

# Conflicts:
#	sk-module-system/src/main/java/com/skua/modules/system/mapper/SysUserMapper.java
2 个父辈 1290f512 9fd81101
正在显示 56 个修改的文件 包含 813 行增加195 行删除
......@@ -7,10 +7,7 @@ import java.math.BigDecimal;
import java.text.ParseException;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.YearMonth;
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.*;
......@@ -74,8 +71,10 @@ public class DateUtils {
};
public static void main(String[] args) {
System.out.println( differenceHours("2025-02-24 10:00:00","2025-02-24 14:00:00") );
// System.out.println(getHbMonth(formatDate("2024-01-01","yyyy-MM")));
// 获取当前日期的Calendar实例
/* // 获取当前日期的Calendar实例
Calendar calendar = Calendar.getInstance();
// 将当前日期减去一个月
calendar.add(Calendar.MONTH, -1);
......@@ -92,7 +91,7 @@ public class DateUtils {
System.out.println("上月"+lastMonth);
System.out.println("上上月"+lastMonth2);
System.out.println("同比"+lastMonth3);
System.out.println("同比"+lastMonth3);*/
// System.out.println("天数差异: " + daysBetween);
}
......@@ -169,6 +168,41 @@ public class DateUtils {
return dayNUm;
}
/***
* 两个时间相差的小时数
* @return
*/
public static Long differenceHours(String startTimeStr,String endTimeStr){
// 定义时间格式
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
// 将时间字符串转换为LocalDateTime对象
LocalDateTime startTime = LocalDateTime.parse(startTimeStr, formatter);
LocalDateTime endTime = LocalDateTime.parse(endTimeStr, formatter);
// 计算两个时间点之间的持续时间
Duration duration = Duration.between(startTime, endTime);
// 获取持续时间的小时数
long hours = duration.toHours();
// 输出结果
System.out.println("两个时间字符串相差的小时数: " + hours);
return hours;
}
public static Long differenceHours(Date startTime,Date endTime){
// 将Date转换为Instant
Instant startTimeInstant = startTime.toInstant();
Instant endTimeInstant = endTime.toInstant();
// 计算两个Instant之间的Duration
Duration duration = Duration.between(startTimeInstant, endTimeInstant);
// 获取相差的小时数
long hours = duration.toHours();
return hours;
}
/**
* 根据月份获取天数
* @param month
......
......@@ -49,6 +49,11 @@ public class AjhPlanScheduleConfig {
@Excel(name = "负责人", width = 15)
@ApiModelProperty(value = "负责人")
private String responsibler;
/**完成时间*/
@Excel(name = "用户标准版化", width = 15)
@ApiModelProperty(value = "用户标准版化")
private String userStandard;
/**排序序号*/
@Excel(name = "排序序号", width = 15)
@ApiModelProperty(value = "排序序号")
......
package com.skua.modules.ajh.vo;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
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;
/**
* 经营方案数据表
*/
......
......@@ -383,24 +383,16 @@ public class ReportItemvService {
startTime = dateVO.getLastMonthStartTime();
endTime = dateVO.getLastMonthEndTime();
String dfValueSql = "select sum(cost) cost from report_electric_cost t where t.month >='"+DateUtils.formatDate(startTime,"yyyy-MM")+"' and t.month<='"+DateUtils.formatDate(endTime,"yyyy-MM")+"' ";
dfValueSql += " and t.depart_id in ("+JSUtils.quoteEach(departId,",")+")";
String dfValue = getJdbcTemplate().queryForObject(dfValueSql,String.class);
String dfValue = getDSDFsql(departId, startTime, endTime);
String dfTBValue = getDSDFsql( departId, DateUtils.getHbDate(startTime), DateUtils.getHbDate(endTime));
String dfHBValue = getDSDFsql(departId, DateUtils.getHbDate(startTime), DateUtils.getHbDate(endTime));
String dfTBValueSql = "select sum(cost) cost from report_electric_cost t where t.month >='"+DateUtils.formatDate(DateUtils.getTbDate(startTime),"yyyy-MM")+"' and t.month<='"+DateUtils.formatDate(DateUtils.getTbDate(endTime),"yyyy-MM")+"' ";
dfTBValueSql += " and t.depart_id in ("+JSUtils.quoteEach(departId,",")+")";
String dfTBValue = getJdbcTemplate().queryForObject(dfTBValueSql,String.class);
String dfHBValueSql = "select sum(cost) cost from report_electric_cost t where t.month >='"+DateUtils.formatDate(DateUtils.getHbDate(startTime),"yyyy-MM")+"' and t.month<='"+DateUtils.formatDate(DateUtils.getHbDate(endTime),"yyyy-MM")+"' ";
dfHBValueSql += " and t.depart_id in ("+JSUtils.quoteEach(departId,",")+")";
String dfHBValue = getJdbcTemplate().queryForObject(dfHBValueSql,String.class);
//出水量:+同比+环比
ReportItemVO csl_reportVO = ReportViewUtil.getSumValueByTBHB(ReportConstant.view2119,ReportConstant.field_CSL, departId, startTime, endTime);
//当月数据/环比、同比
FRportlCommandCenterVO nowMonthVO = new FRportlCommandCenterVO("月总电耗", "万kwh",JSUtils.divide(dlhjData.getValue(),10000), JSUtils.divide(dlhjData.getValueTb(),10000), JSUtils.divide(dlhjData.getValueHb(),10000));
//日均数据:/环比/同比
FRportlCommandCenterVO lastMonthVO = new FRportlCommandCenterVO("吨水电费","元/t",JSUtils.divide(dfValue,csl_reportVO.getValue()) ,JSUtils.divide(dfTBValue,csl_reportVO.getValueTb()) ,JSUtils.divide(dfHBValue,csl_reportVO.getValueHb()));
FRportlCommandCenterVO lastMonthVO = new FRportlCommandCenterVO("吨水电费","元/t",dfValue ,dfTBValue,dfHBValue);
//吨水消耗
FRportlCommandCenterVO lastYearVo = new FRportlCommandCenterVO("吨水电耗","kwh/t",dsdh_value ,dsdh_value_Tb,dsdh_value_Hb );
fRportlCommandCenterVOList.add( nowMonthVO) ;
......@@ -409,6 +401,19 @@ public class ReportItemvService {
return fRportlCommandCenterVOList;
}
//吨水电耗
private String getDSDFsql(String departId,String startTime,String endTime){
String dfValueSql = null;
String buildView2119 = ReportViewUtil.buildView(ReportConstant.view2119,ReportConstant.field_CSL, departId, startTime, endTime);
dfValueSql = " select round(avg(t.cost / bbb.CSL),2) 'cost' from report_electric_cost t left join (";
dfValueSql +=" select aaa.depart_id , sum(aaa.CSL) 'CSL' from " +buildView2119+" aaa group by aaa.depart_id )bbb on t.depart_id = bbb.depart_id";
dfValueSql += " where t.month='"+DateUtils.formatDate(startTime,"yyyy-MM")+"' and t.cost > 0";
if(StringUtils.isNotEmpty(departId)){
dfValueSql += " and t.depart_id in ("+JSUtils.quoteEach(departId,",")+")";
}
String dfValue = getJdbcTemplate().queryForObject(dfValueSql,String.class);
return dfValue;
}
/***
......@@ -442,9 +447,9 @@ public class ReportItemvService {
String dataViewName3a24_valueHB = ReportViewUtil.buildView(ReportConstant.view4411,"yyh", departIds, monthHB,monthHB);
String dataViewName3a24_valueTB = ReportViewUtil.buildView(ReportConstant.view4411,"yyh", departIds, monthTB,monthTB);
String sql = "select ";
sql += "(select ROUND(ifnull(avg(aaa.yyh),0) ,2) 'value' from " + dataViewName3a24_value+ "aaa) 'value',";
sql += "(select ROUND(ifnull(avg(aaa.yyh),0) ,2) 'value' from " + dataViewName3a24_valueHB+ "aaa) 'valueHb',";
sql += "(select ROUND(ifnull(avg(aaa.yyh),0) ,2) 'value' from " + dataViewName3a24_valueTB+ "aaa) 'valueTb' ";
sql += "(select ROUND(ifnull(avg(aaa.yyh),0) ,2) 'value' from " + dataViewName3a24_value+ "aaa where aaa.yyh > 0 ) 'value',";
sql += "(select ROUND(ifnull(avg(aaa.yyh),0) ,2) 'value' from " + dataViewName3a24_valueHB+ "aaa where aaa.yyh > 0 ) 'valueHb',";
sql += "(select ROUND(ifnull(avg(aaa.yyh),0) ,2) 'value' from " + dataViewName3a24_valueTB+ "aaa where aaa.yyh > 0 ) 'valueTb' ";
sql += " from dual";
JdbcTemplate masterDB = (JdbcTemplate)SpringContextUtils.getBean("master");
ReportItemVO dsyfReportVO = null;
......
......@@ -91,7 +91,7 @@ public class SysCommandCentreController {
fReportItemvList.add( avgDayDataVO );
//年数据统计:
String total = factoryInfoService.querySumProScale();
String total = factoryInfoService.querySumProScale( JSUtils.quoteEach(departIds,",") );
total = String.format("%.2f", Double.parseDouble(total));
fReportItemvList.add( new FRportlCommandCenterVO( total,"0","0"));
......@@ -364,8 +364,13 @@ public class SysCommandCentreController {
@ApiOperation(value="指挥中心-药剂趋势", notes="指挥中心-药剂趋势")
@GetMapping(value = "/statisticsByYjqs")
public Result<DepartDrugResult> statisticsByYjqs(@RequestParam(name = "month", required = true)String month) {
DateVO dateVO = new DateVO(month);
DepartDrugResult departDrugResult = commandCentreService.getYhTotal(dateVO.getNowMonth());
// DateVO dateVO = new DateVO(month);
String departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674
/* if(StringUtils.isNotEmpty(reportItemvParam.getDepartIds()) ){
departIds = reportItemvParam.getDepartIds();
}*/
DepartDrugResult departDrugResult = commandCentreService.getYhTotal(departIds,month);
Result<DepartDrugResult> result = new Result<>();
result.setSuccess(true);
result.setResult(departDrugResult);
......
......@@ -26,7 +26,7 @@ public interface ICommandCentreService {
* @param month
* @return
*/
DepartDrugResult getYhTotal(String month);
DepartDrugResult getYhTotal(String departIds,String month);
/***
* 指挥中心----运行负荷率分析----处理水量详情
* @param
......
......@@ -43,21 +43,21 @@ public class CommandCentreServiceImpl implements ICommandCentreService {
}
@Override
public DepartDrugResult getYhTotal(String month) {
public DepartDrugResult getYhTotal(String departIds,String month) {
String monthTb = DateUtils.getTbMonth(month);//同比时间
String monthHb = DateUtils.getHbMonth(month);//环比时间
String dataViewName2119 = ReportViewUtil.buildViewLike(ReportConstant.view2119, ReportConstant.fieldClsl, "", month);
String dataViewName2119tb = ReportViewUtil.buildViewLike(ReportConstant.view2119, ReportConstant.fieldClsl, "", monthTb);
String dataViewName2119hb = ReportViewUtil.buildViewLike(ReportConstant.view2119, ReportConstant.fieldClsl, "", monthHb);
String dataViewName3a24 = ReportViewUtil.buildViewLike(ReportConstant.view3a24, ReportConstant.fieldYj, "", month);
String dataViewName3a24tb = ReportViewUtil.buildViewLike(ReportConstant.view3a24, ReportConstant.fieldYj, "", monthTb);
String dataViewName3a24hb = ReportViewUtil.buildViewLike(ReportConstant.view3a24, ReportConstant.fieldYj, "", monthHb);
String dataViewName2119 = ReportViewUtil.buildViewLike(ReportConstant.view2119, ReportConstant.fieldClsl, departIds, month);
String dataViewName2119tb = ReportViewUtil.buildViewLike(ReportConstant.view2119, ReportConstant.fieldClsl, departIds, monthTb);
String dataViewName2119hb = ReportViewUtil.buildViewLike(ReportConstant.view2119, ReportConstant.fieldClsl, departIds, monthHb);
String dataViewName3a24 = ReportViewUtil.buildViewLike(ReportConstant.view3a24, ReportConstant.fieldYj, departIds, month);
String dataViewName3a24tb = ReportViewUtil.buildViewLike(ReportConstant.view3a24, ReportConstant.fieldYj, departIds, monthTb);
String dataViewName3a24hb = ReportViewUtil.buildViewLike(ReportConstant.view3a24, ReportConstant.fieldYj, departIds, monthHb);
DepartDrugResult departDrugResult = fReportItemvMapper.getYhData(month,monthTb,monthHb,
dataViewName3a24,dataViewName3a24tb,dataViewName3a24hb);
if(departDrugResult == null){
departDrugResult = new DepartDrugResult();
}
List<DepartDrugDataVO> drugList = new ArrayList<>();
List<DepartDrugDataVO> drugList = null;
drugList = fReportItemvMapper.getYhList(month,monthTb,monthHb,
dataViewName2119,dataViewName2119tb,dataViewName2119hb,
dataViewName3a24,dataViewName3a24tb,dataViewName3a24hb);
......
......@@ -184,7 +184,7 @@ public class PaperController {
messageEntity.setMessageTitle(messageTitle);
messageEntity.setMessageBody(messageBody);
messageEntity.setReceiveUser(userIdList);
messageEntity.setReceiveUserCid(userCidList);
messageEntity.setReceiveUserCid(userCidList);//移动端推送
messageEntity.setSendUser(BaseContextHandler.getUserName());
messageEntity.setForwardTag("historyRecordRemind");//消息提醒类型 保持唯一
......
package com.skua.modules.edu.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
......@@ -20,7 +21,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.skua.modules.edu.vo.QuestionExcel;
import com.skua.modules.erp.entity.MaterialIN;
import com.skua.modules.erp.vo.MaterialINVO;
import com.skua.modules.system.service.ISysDepartService;
import com.skua.tool.util.JSUtils;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
......@@ -53,22 +57,6 @@ public class QuestionController {
@Autowired
private IQuestionService questionService;
@Autowired
private ISysDepartService departService;
/**
* <pre>
* 分页列表查询
* </pre>
* @param question
* @param pageNo
* @param pageSize
* @param req
* @return
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog(value = "在线考试-试题-分页列表查询")
@ApiOperation(value="在线考试-试题-分页列表查询", notes="在线考试-试题-分页列表查询")
@GetMapping(value = "/list")
......@@ -105,15 +93,6 @@ public class QuestionController {
return result;
}
/**
* <pre>
* 添加
* </pre>
* @param question
* @return
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog(value = "在线考试-试题-添加")
@ApiOperation(value="在线考试-试题-添加", notes="在线考试-试题-添加")
@PostMapping(value = "/add")
......@@ -130,15 +109,7 @@ public class QuestionController {
}
return result;
}
/**
* <pre>
* 编辑
* </pre>
* @param question
* @return
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog(value = "在线考试-试题-编辑")
@ApiOperation(value="在线考试-试题-编辑", notes="在线考试-试题-编辑")
@PutMapping(value = "/edit")
......@@ -155,18 +126,9 @@ public class QuestionController {
result.success("修改成功!");
}
}
return result;
}
/**
* <pre>
* 通过id删除
* </pre>
* @param id
* @return
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog(value = "在线考试-试题-通过id删除")
@ApiOperation(value="在线考试-试题-通过id删除", notes="在线考试-试题-通过id删除")
@DeleteMapping(value = "/delete")
......@@ -186,15 +148,6 @@ public class QuestionController {
return Result.ok("删除成功!");
}
/**
* <pre>
* 批量删除
* </pre>
* @param ids
* @return
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog(value = "在线考试-试题-批量删除")
@ApiOperation(value="在线考试-试题-批量删除", notes="在线考试-试题-批量删除")
@DeleteMapping(value = "/deleteBatch")
......@@ -208,15 +161,80 @@ public class QuestionController {
}
return result;
}
/**
* <pre>
* 通过id查询
* </pre>
* @param id
* @return
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog(value = "在线考试-试题-送审")
@ApiOperation(value="在线考试-试题-送审", notes="在线考试-试题-送审")
@GetMapping(value = "/sendAudit")
public Result<Question> sendAudit(@RequestParam(name="id",required=true) String id) {
Result<Question> result = new Result<Question>();
Question question = null;
try {
question = questionService.getById(id);
if(question == null) {
result.error500("未找到对应实体");
}else{
question.setAuditStatus("1");//提交审核
//question.setApplyUser(BaseContextHandler.getUserId());
questionService.updateById(question);
}
} catch (Exception e) {
log.error("送审失败",e.getMessage());
result.setResult(question);
result.setSuccess(true);
}
return result;
}
@AutoLog(value = "在线考试-试题-批量送审")
@ApiOperation(value="在线考试-试题-批量送审", notes="在线考试-试题-批量送审")
@DeleteMapping(value = "/batchSendAudit")
public Result<Question> batchSendAudit(@RequestParam(name="ids",required=true) String ids) {
Result<Question> result = new Result<Question>();
if(ids==null || "".equals(ids.trim())) {
result.error500("参数不识别!");
}else {
String auditStatus = "1";
this.questionService.batchSendAudit(JSUtils.quoteEach(ids,","),auditStatus);
result.success("删除成功!");
}
return result;
}
@AutoLog(value = "在线考试-试题-审批")
@ApiOperation(value="在线考试-试题-审批", notes="在线考试-试题-审批")
@PutMapping(value = "/audit")
public Result<Question> auditQuestion(@RequestBody Question question) {
Result<Question> result = new Result<Question>();
try {
questionService.auditQuestion(question);
result.setResult(question);
result.setSuccess(true);
} catch (Exception e) {
log.error("审批失败",e.getMessage());
result.error500("审批失败:"+e.getMessage());
}
return result;
}
@AutoLog(value = "在线考试-试题-批量审批")
@ApiOperation(value="在线考试-试题-批量审批", notes="在线考试-试题-批量审批")
@GetMapping(value = "/auditBatch")
public Result<String> auditBatchMaterialINVO(@RequestParam(name="ids",required=true) String ids,String approveState,String approveMessage) {
Result<String> result = new Result<String>();
String errMsg = null;
try {
errMsg = questionService.auditBatchQuestion(ids,approveState,approveMessage);
//result.setResult(materialINVO);
result.setSuccess(true);
} catch (Exception e) {
log.error("审批失败",errMsg);
result.error500("审批失败:"+ errMsg);
}
return result;
}
@AutoLog(value = "在线考试-试题-通过id查询")
@ApiOperation(value="在线考试-试题-通过id查询", notes="在线考试-试题-通过id查询")
@GetMapping(value = "/queryById")
......@@ -232,39 +250,18 @@ public class QuestionController {
return result;
}
/**
* <pre>
* 导出excel
* </pre>
* @param request
* @param response
* @return
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@RequestMapping(value = "/exportXls")
@RequestMapping(value = "/exportXlsTemplate")
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
// Step.1 组装查询条件
QueryWrapper<Question> queryWrapper = null;
try {
String paramsStr = request.getParameter("paramsStr");
if (ConvertUtils.isNotEmpty(paramsStr)) {
String deString = URLDecoder.decode(paramsStr, "UTF-8");
Question question = JSON.parseObject(deString, Question.class);
queryWrapper = QueryGenerator.initQueryWrapper(question, request.getParameterMap());
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
//Step.2 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
List<Question> pageList = questionService.list(queryWrapper);
List<QuestionExcel> pageList = new ArrayList<>();
pageList.add( new QuestionExcel("单选", "车辆在较窄的山路上行驶时,如果靠山体的一方不让行,应怎样做?", "鸣喇叭催其让行", "保持正常车速行驶", "提前减速或停车避让", "向左占道,谨慎驶过", "A", ""));
pageList.add( new QuestionExcel("多选", "交通信号灯由( )组成。", "鸣喇叭催其让行", "红灯", "绿灯", "黄灯", "蓝", "ABC"));
//导出文件名称
mv.addObject(NormalExcelConstants.FILE_NAME, "在线考试-试题列表");
mv.addObject(NormalExcelConstants.CLASS, Question.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("在线考试-试题列表数据", "导出人:Jeecg", "导出信息"));
mv.addObject(NormalExcelConstants.FILE_NAME, "选择题_批量导入模板");
mv.addObject(NormalExcelConstants.CLASS, QuestionExcel.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("选择题_批量导入模板", "导出人", ""));
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
return mv;
}
......@@ -291,7 +288,6 @@ public class QuestionController {
params.setNeedSave(true);
try {
String dbId = request.getParameter("dbId");
List<QuestionExcel> listQuestions = ExcelImportUtil.importExcel(file.getInputStream(), QuestionExcel.class, params);
questionService.batchImportExcel(listQuestions,dbId);
return Result.ok("文件导入成功!数据行数:" + listQuestions.size());
......
......@@ -57,6 +57,16 @@ public class Question {
@Excel(name = "试题解析", width = 15)
@ApiModelProperty(value = "试题解析")
private String analyzes;
@Excel(name = "审批状态:0 未发布 1 已发布(待审核)2 审核驳回 3 审核通过", width = 15)
@ApiModelProperty(value = "审批状态:0 未发布 1 已发布(待审核)2 审核驳回 3 审核通过")
private String auditStatus;
@Excel(name = "审批意见", width = 15)
@ApiModelProperty(value = "审批意见")
private String approveMessage;
/**备注*/
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注")
......
......@@ -42,7 +42,26 @@ public class QuestionOption implements Serializable {
@ApiModelProperty(value = "选项标题")
private String optionTitle;
/**正确答案*/
@Excel(name = "正确答案", width = 15)
@ApiModelProperty(value = "正确答案")
@Excel(name = "是否正确答案", width = 15)
@ApiModelProperty(value = "是否正确答案")
private String correct;
public QuestionOption(){
}
public QuestionOption(String alias, String optionTitle) {
this.alias = alias;
this.optionTitle = optionTitle;
}
public QuestionOption(String alias, String optionTitle, String correct) {
this.alias = alias;
this.optionTitle = optionTitle;
this.correct = correct;
}
public QuestionOption(String questionId,String alias, String optionTitle, String correct) {
this.questionId = questionId;
this.alias = alias;
this.optionTitle = optionTitle;
this.correct = correct;
}
}
......
......@@ -53,4 +53,12 @@ public interface QuestionMapper extends BaseMapper<Question> {
* @return 在线考试--试题集合
*/
public IPage<Question> queryPageList(Page<Question> page,@Param("param") Question eduQuestion);
/**
* 批量送审
* @param ids
* @param auditStatus
* @return
*/
public int batchSendAudit(@Param("id")String ids, @Param("auditStatus")String auditStatus);
}
......
......@@ -83,5 +83,10 @@
select count(1) from edu_paper_question where question_id =#{questionId}
</select>
<!-- 批量送审-->
<update id="batchSendAudit" >
update edu_question set audit_status = #{auditStatus} where id in (${ids}) and audit_status =audit_status = '0'
</update>
</mapper>
......
package com.skua.modules.edu.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.skua.modules.edu.entity.QuestionOption;
/**
* 在线考试-试题
*/
public interface IQuestionOptionService extends IService<QuestionOption> {
}
......@@ -27,7 +27,7 @@ public interface IQuestionService extends IService<Question> {
* @param question
* @return
*/
public int saveQuestion(Question question)throws Exception;
public int saveQuestion(Question question);
/***
* 修改试题 以及试题选项
......@@ -58,4 +58,26 @@ public interface IQuestionService extends IService<Question> {
* @param dbId
*/
public void batchImportExcel(List<QuestionExcel> listQuestions, String dbId);
/***
* 批量送审
* @param ids
* @param auditStatus
*/
int batchSendAudit(String ids, String auditStatus);
/***
* 审批
* @param question
*/
int auditQuestion(Question question);
/**
* 批量审批
* @param ids
* @param approveState
* @param approveMessage
* @return
*/
String auditBatchQuestion(String ids, String approveState, String approveMessage);
}
......
package com.skua.modules.edu.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.skua.modules.edu.entity.QuestionOption;
import com.skua.modules.edu.mapper.QuestionOptionMapper;
import com.skua.modules.edu.service.IQuestionOptionService;
import org.springframework.stereotype.Service;
/**
* 在线考试-试题选项
*/
@Service
public class QuestionOptionServiceImpl extends ServiceImpl<QuestionOptionMapper, QuestionOption> implements IQuestionOptionService {
}
......@@ -4,13 +4,21 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.gson.Gson;
import com.skua.core.context.BaseContextHandler;
import com.skua.core.service.ISequenceService;
import com.skua.modules.edu.entity.Question;
import com.skua.modules.edu.entity.QuestionDB;
import com.skua.modules.edu.entity.QuestionOption;
import com.skua.modules.edu.mapper.QuestionMapper;
import com.skua.modules.edu.mapper.QuestionOptionMapper;
import com.skua.modules.edu.service.IQuestionOptionService;
import com.skua.modules.edu.service.IQuestionService;
import com.skua.modules.edu.vo.QuestionExcel;
import com.skua.modules.erp.entity.ApproveRecord;
import com.skua.modules.erp.mapper.ApproveRecordMapper;
import com.skua.tool.util.UniqIdUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
......@@ -27,6 +35,15 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
@Resource
private QuestionOptionMapper optionMapper;
@Autowired
private IQuestionOptionService questionOptionService;
@Resource
private ApproveRecordMapper recordMapper;
@Autowired
private ISequenceService sequenceService;
public IPage<Question> queryPageList(Page<Question> page, Question questionDB) {
return this.baseMapper.queryPageList(page,questionDB);
}
......@@ -41,16 +58,17 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
* @return
*/
@Transactional
public int saveQuestion(Question question)throws Exception{
public int saveQuestion(Question question){
int count = this.baseMapper.insert( question );
// 步骤2:批量插入试题选项集合
if(question.getOptionList() != null ){
for(QuestionOption option : question.getOptionList() ){
option.setQuestionId( question.getId() ) ;
optionMapper.insert( option );
// optionMapper.insert( option );
}
questionOptionService.saveBatch(question.getOptionList());
// 创建Gson实例
Gson gson = new Gson();
// 将List转换为Json字符串
......@@ -119,15 +137,97 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
* @param listQuestions
* @param dbId
*/
@Transactional
public void batchImportExcel(List<QuestionExcel> listQuestions, String dbId){
Question question = null;
List<QuestionOption> optionList = null;
// 创建Gson实例
Gson gson = new Gson();
if(listQuestions != null && !listQuestions.isEmpty()){
for(QuestionExcel questionExcel : listQuestions){
String questionId = UniqIdUtils.getInstance().getUniqID();
System.out.println("试题编号 = "+questionId);
question = new Question();
question.setQuestionDbId(dbId);
question.setId(questionId);
question.setQuestionAnswer(questionExcel.getAnswer());
question.setQuestionType(questionExcel.getQuestionType());//试题类型:1 单选、2多选、3判断
question.setQuestionTitle(questionExcel.getQuestionTitle());
question.setAnalyzes(questionExcel.getAnalyzes());//试题解析
optionList = new ArrayList<>();
if(StringUtils.isNotEmpty(questionExcel.getOptionA()))optionList.add( new QuestionOption(questionId,"A",questionExcel.getOptionA(),checkAnswer(questionExcel.getAnswer(),"A")) ) ;
if(StringUtils.isNotEmpty(questionExcel.getOptionB()))optionList.add( new QuestionOption(questionId,"B",questionExcel.getOptionB(),checkAnswer(questionExcel.getAnswer(),"B")) ) ;
if(StringUtils.isNotEmpty(questionExcel.getOptionC()))optionList.add( new QuestionOption(questionId,"C",questionExcel.getOptionC(),checkAnswer(questionExcel.getAnswer(),"C")) ) ;
if(StringUtils.isNotEmpty(questionExcel.getOptionD()))optionList.add( new QuestionOption(questionId,"D",questionExcel.getOptionD(),checkAnswer(questionExcel.getAnswer(),"D")) ) ;
if(StringUtils.isNotEmpty(questionExcel.getOptionE()))optionList.add( new QuestionOption(questionId,"E",questionExcel.getOptionE(),checkAnswer(questionExcel.getAnswer(),"E")) ) ;
if(StringUtils.isNotEmpty(questionExcel.getOptionF()))optionList.add( new QuestionOption(questionId,"F",questionExcel.getOptionF(),checkAnswer(questionExcel.getAnswer(),"F")) ) ;
if(StringUtils.isNotEmpty(questionExcel.getOptionG()))optionList.add( new QuestionOption(questionId,"G",questionExcel.getOptionG(),checkAnswer(questionExcel.getAnswer(),"G")) ) ;
// 将List转换为Json字符串
String questionData = gson.toJson( question.getOptionList() ) ;
question.setQuestionData( questionData ) ;
this.baseMapper.insert(question);
//批量新增
questionOptionService.saveBatch(optionList);
}
}
/* // 创建Gson实例
Gson gson = new Gson();
// 将List转换为Json字符串
String questionData = gson.toJson( question.getOptionList() ) ;
question.setQuestionData( questionData ) ;*/
}
private String checkAnswer(String answer,String option){
if(answer.toUpperCase().contains(option)){
return "1";
}
return "0" ;
}
/***
* 批量送审
* @param ids
* @param auditStatus
*/
public int batchSendAudit(String ids, String auditStatus){
return this.baseMapper.batchSendAudit(ids,auditStatus);
}
/***
* 审批
* @param question
*/
public int auditQuestion(Question question){
//审批记录
ApproveRecord record = new ApproveRecord( "YJIN", BaseContextHandler.getUserName(), question.getId(), BaseContextHandler.getUserId(), question.getApproveMessage(), question.getAuditStatus());
recordMapper.insert( record ) ;
return this.baseMapper.updateById( question ) ;
}
/**
* 批量审批
* @param ids
* @param auditStatus
* @param approveMessage
* @return
*/
public String auditBatchQuestion(String ids, String auditStatus, String approveMessage){
String[] idsList = ids.split(",");
StringBuffer sb = new StringBuffer();
Question question = null;
for(String id : idsList){
if(StringUtils.isNotEmpty(id)) {
question = new Question();
question.setId(id);
question.setApproveMessage(approveMessage);
question.setAuditStatus(auditStatus);
auditQuestion(question);
}
}
return sb.toString();
}
private Question converQuestion(QuestionExcel questionExcel,String dbId){
Question question = new Question();
......
......@@ -56,5 +56,17 @@ public class QuestionExcel {
@ApiModelProperty(value = "试题解析")
private String analyzes;
public QuestionExcel(){
}
public QuestionExcel(String questionType, String questionTitle, String optionA, String optionB, String optionC, String optionD, String answer, String analyzes) {
this.questionType = questionType;
this.questionTitle = questionTitle;
this.optionA = optionA;
this.optionB = optionB;
this.optionC = optionC;
this.optionD = optionD;
this.answer = answer;
this.analyzes = analyzes;
}
}
......
......@@ -2,6 +2,7 @@ package com.skua.modules.emergency.controller;
import com.skua.core.api.vo.Result;
import com.skua.core.aspect.annotation.AutoLog;
import com.skua.core.context.BaseContextHandler;
import com.skua.modules.emergency.service.IEmergencyRiskEventService;
import com.skua.modules.emergency.vo.DangerDatabaseResult;
import com.skua.modules.emergency.vo.MapDatabaseResult;
......@@ -9,6 +10,7 @@ import com.skua.modules.emergency.vo.RiskDatabaseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.*;
......@@ -58,9 +60,12 @@ public class EventMapController {
@AutoLog(value = "隐患排查巡检统计")
@ApiOperation(value="隐患排查巡检统计", notes="隐患排查巡检统计")
@GetMapping(value = "/getDangerList")
public Result<List<DangerDatabaseResult>> getDangerList(String year){
public Result<List<DangerDatabaseResult>> getDangerList( String departIds,String year){
Result<List<DangerDatabaseResult>> result = new Result<>();
List<DangerDatabaseResult> list = emergencyRiskEventService.getDangerList(year);
if(StringUtils.isEmpty(departIds)){
departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674
}
List<DangerDatabaseResult> list = emergencyRiskEventService.getDangerList(departIds,year);
result.setSuccess(true);
result.setResult(list);
return result;
......@@ -72,9 +77,12 @@ public class EventMapController {
@AutoLog(value = "地图隐患排查巡检统计")
@ApiOperation(value="地图隐患排查巡检统计", notes="地图隐患排查巡检统计")
@GetMapping(value = "/getMapData")
public Result<List<MapDatabaseResult>> getMapData(String year){
public Result<List<MapDatabaseResult>> getMapData(String departIds,String year){
Result<List<MapDatabaseResult>> result = new Result<>();
List<MapDatabaseResult> list = emergencyRiskEventService.getMapData(year);
if(StringUtils.isEmpty(departIds)){
departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674
}
List<MapDatabaseResult> list = emergencyRiskEventService.getMapData(departIds,year);
result.setSuccess(true);
result.setResult(list);
return result;
......
......@@ -19,8 +19,8 @@ public interface EmergencyRiskEventMapper extends BaseMapper<EmergencyRiskEvent>
List<RiskDatabaseResult> getRiskList(@Param("year") String year);
@Anonymous
List<DangerDatabaseResult> getDangerList(@Param("year") String year);
List<DangerDatabaseResult> getDangerList( @Param("departIds")String departIds , @Param("year") String year);
@Anonymous
List<MapDatabaseResult> getMapData(@Param("year") String year);
List<MapDatabaseResult> getMapData( @Param("departIds")String departIds , @Param("year") String year);
}
......
......@@ -38,7 +38,9 @@
WHERE
d.depart_type = 1
AND r.report_date LIKE CONCAT(#{year},'%')
<if test="departIds != null and departIds !='' ">
and d.id in (${departIds})
</if>
order by r.report_date desc
</select>
......@@ -53,6 +55,10 @@
LEFT JOIN sys_factory_info f ON f.depart_id = d.id
WHERE
d.depart_type = 1
<if test="departIds != null and departIds !='' ">
and d.id in (${departIds})
</if>
</select>
</mapper>
......
......@@ -45,12 +45,12 @@ public interface IEmergencyRiskEventService extends IService<EmergencyRiskEvent>
* 隐患排查巡检统计
* @return
*/
List<DangerDatabaseResult> getDangerList(String year);
List<DangerDatabaseResult> getDangerList(String departIds, String year);
/**
* 地图隐患排查数量
* @param year
* @return
*/
List<MapDatabaseResult> getMapData(String year);
List<MapDatabaseResult> getMapData(String departIds, String year);
}
......
......@@ -29,6 +29,7 @@ import com.skua.modules.safe.entity.DangerLevelManageShare;
import com.skua.modules.safe.mapper.DangerInspectionRecordMapper;
import com.skua.modules.safe.mapper.DangerLevelManageMapper;
import com.skua.modules.safe.mapper.DangerLevelManageShareMapper;
import com.skua.tool.util.JSUtils;
import com.skua.tool.util.UniqIdUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
......@@ -160,21 +161,21 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven
}
@Override
public List<DangerDatabaseResult> getDangerList(String year) {
public List<DangerDatabaseResult> getDangerList(String departIds, String year) {
if(StringUtils.isEmpty(year)){
year = String.valueOf(DateUtils.getYear());
}
List<DangerDatabaseResult> list = emergencyRiskEventMapper.getDangerList(year);
List<DangerDatabaseResult> list = emergencyRiskEventMapper.getDangerList(JSUtils.quoteEach( departIds, ","), year);
return list;
}
@Override
public List<MapDatabaseResult> getMapData(String year) {
public List<MapDatabaseResult> getMapData(String departIds,String year) {
if(StringUtils.isEmpty(year)){
year = String.valueOf(DateUtils.getYear());
}
List<DangerDatabaseResult> dangerList = emergencyRiskEventMapper.getDangerList(year);
List<MapDatabaseResult> list = emergencyRiskEventMapper.getMapData(year);
List<DangerDatabaseResult> dangerList = emergencyRiskEventMapper.getDangerList(JSUtils.quoteEach(departIds,","), year);
List<MapDatabaseResult> list = emergencyRiskEventMapper.getMapData(JSUtils.quoteEach(departIds,","),year);
for (MapDatabaseResult mapDatabaseResult : list) {
List<DangerDatabaseResult> daList = new ArrayList<>();
String departId = mapDatabaseResult.getDepartId();
......
......@@ -256,7 +256,7 @@ public class ErpSettlementController {
if(erpSettlementEntity==null) {
result.error500("未找到对应实体");
}else {
boolean ok = erpSettlementService.updateById(erpSettlementEntity);
boolean ok = erpSettlementService.auditAccept(erpSettlementEntity);
if(ok) {
result.success("验收审批成功!");
}
......
......@@ -293,7 +293,8 @@ public class MaterialINController {
}else{
materialIN.setAuditStatus("1");//提交审核
materialIN.setApplyUser(BaseContextHandler.getUserId());
materialINService.updateById(materialIN);
//materialINService.updateById(materialIN);
materialINService.sendAudit(materialIN);
}
} catch (Exception e) {
log.error("送审失败",e.getMessage());
......
......@@ -250,7 +250,9 @@ public class PurchaseContractController {
purchaseContract.setStatus("1");
purchaseContract.setApplyUser(BaseContextHandler.getUserId());
purchaseContract.setApplyTime(DateUtils.now());
purchaseContractService.updateById(purchaseContract);
//purchaseContractService.updateById(purchaseContract);
purchaseContractService.sendAudit(purchaseContract);
result.setResult(purchaseContract);
result.setSuccess(true);
}
......
......@@ -39,4 +39,6 @@ public interface MaterialINMapper extends BaseMapper<MaterialIN> {
* @return
*/
public int batchSendAudit(@Param("id")String ids, @Param("auditStatus")String auditStatus);
}
......
......@@ -99,4 +99,10 @@ public interface IERPPurchaseContractService extends IService<ERPPurchaseContrac
* @return
*/
List<String> selectIdsByCode(String contractCode);
/***
* 送审
* @param purchaseContract
*/
void sendAudit(PurchaseContractVO purchaseContract);
}
......
......@@ -46,6 +46,13 @@ public interface IErpSettlementService extends IService<ErpSettlement> {
/***结算:修改 药剂入库结算状态*/
boolean updateMaterialInSettlementFlag(ErpSettlement erpSettlementEntity,String settlementFlag);
/**
* 结算单:验收审批
* @param erpSettlementEntity
* @return
*/
boolean auditAccept(ErpSettlement erpSettlementEntity);
// (供应商)送货单以及物资验收单
// ErpSettlementFormVO querySupplierSettlementFormById(String id);
//(水厂) 送货单以及物资验收单
......
......@@ -64,4 +64,10 @@ public interface IMaterialINService extends IService<MaterialIN> {
* @return
*/
public int batchSendAudit(String ids,String auditStatus);
/**
*
* @param materialIN
*/
void sendAudit(MaterialIN materialIN);
}
......
......@@ -13,6 +13,8 @@ import com.skua.modules.erp.vo.MaterialSearchVO;
import com.skua.modules.erp.vo.PurchaseContractVO;
import com.skua.modules.guest.util.DateUtil;
import com.skua.modules.quartz.util.BaseUtil;
import com.skua.modules.system.service.ISysConfigService;
import com.skua.modules.system.service.SmsService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -39,6 +41,10 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr
@Autowired
private IEquipmentInService equipmentInService;
@Autowired
private SmsService smsService;
@Autowired
private ISysConfigService configService;
/***
......@@ -128,6 +134,11 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr
purchaseContractVO.setPurchaseMoney( purchaseMoney ) ;
this.baseMapper.updateById(purchaseContractVO ) ;
if("1".equals( purchaseContractVO.getStatus() )){
//发送信息
String roleId = configService.queryValueByKey("TGHT_SP_ROLE_ID");
smsService.pushMsgNoProcessByRoleId("统购合同审批","有统购合同["+purchaseContractVO.getContractName()+"]需要审批审批",roleId,"PurchaseContract");
}
}
/**
......@@ -153,6 +164,12 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr
int count = this.baseMapper.updateById( purchaseContractVO );
purchaseMaterialMapper.changePurchaseContract( purchaseContractVO.getId(),purchaseContractVO.getUseFlag()) ;
if("1".equals( purchaseContractVO.getStatus() )){
//发送信息
String roleId = configService.queryValueByKey("TGHT_SP_ROLE_ID");
smsService.pushMsgNoProcessByRoleId("统购合同审批","有统购合同["+purchaseContractVO.getContractName()+"]需要审批审批",roleId,"PurchaseContract");
}
return count > 0 ? true :false;
}
/***
......@@ -277,6 +294,17 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr
public List<String> selectIdsByCode(String contractCode){
return this.baseMapper.selectIdsByCode(contractCode);
}
/***
* 送审
* @param purchaseContract
*/
@Transactional
public void sendAudit(PurchaseContractVO purchaseContract){
this.baseMapper.updateById(purchaseContract);
//发送信息
String roleId = configService.queryValueByKey("TGHT_SP_ROLE_ID");
smsService.pushMsgNoProcessByRoleId("统购合同审批","有统购合同["+purchaseContract.getContractName()+"]需要审批审批",roleId,"PurchaseContract");
}
/***
* 同步入库
......
......@@ -16,6 +16,8 @@ import com.skua.modules.erp.vo.ErpSettlementVO;
import com.skua.modules.erp.vo.SparepartSettlementVO;
import com.skua.modules.system.entity.SysDepart;
import com.skua.modules.system.mapper.SysDepartMapper;
import com.skua.modules.system.service.ISysConfigService;
import com.skua.modules.system.service.SmsService;
import com.skua.tool.util.JSUtils;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
......@@ -45,6 +47,11 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E
private SupplierManageMapper supplierManageMapper;
@Autowired
private SysDepartMapper departMapper ;
@Autowired
private SmsService smsService;
@Autowired
private ISysConfigService configService;
/**
* 新增结算单
* @param erpSettlementVO
......@@ -60,6 +67,18 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E
}
//修改药剂入库的状态
updateMaterialInSettlementFlag( erpSettlementVO,"1");
//发送消息
// settlementType;结算类型:0 供应商结算,1 水厂结算
String msgTitle = "药剂结算验收审批";
if("0".equals( erpSettlementVO.getSettlementType() )){
msgTitle = "供应商结算验收审批";
}
if("1".equals( erpSettlementVO.getSettlementType() )){
msgTitle = "水厂结算验收审批";
}
//发送信息
String roleId = configService.queryValueByKey("YJJS_YS_ROLE_ID");
smsService.pushMsgNoProcessByRoleId(msgTitle,msgTitle,roleId,"ErpSettlement");
}
/**
......@@ -147,7 +166,28 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E
public List<ErpSettlementVO> checkSettlementByWaterDepart(String materialInIds){
return this.baseMapper.checkSettlementByWaterDepart( materialInIds );
}
/**
* 结算单:验收审批
* @param erpSettlementEntity
* @return
*/
public boolean auditAccept(ErpSettlement erpSettlementEntity){
this.baseMapper.updateById( erpSettlementEntity );
//发送信息
String roleId = configService.queryValueByKey("YJJS_JLSP_ROLE_ID");
//发送消息
// settlementType;结算类型:0 供应商结算,1 水厂结算
String msgTitle = "药剂结算经理审批";
if("0".equals( erpSettlementEntity.getSettlementType() )){
msgTitle = "供应商结算经理审批";
}
if("1".equals( erpSettlementEntity.getSettlementType() )){
msgTitle = "水厂结算经理审批";
}
//发送信息
smsService.pushMsgNoProcessByRoleId(msgTitle,msgTitle,roleId,"ErpSettlement");
return true;
}
//修改药剂入库的结算状态
public boolean updateMaterialInSettlementFlag(ErpSettlement erpSettlementEntity,String settlementFlag){
......
......@@ -28,6 +28,8 @@ import com.skua.modules.quartz.util.BaseUtil;
import com.skua.modules.supplies.entity.PurchaseContract;
import com.skua.modules.supplies.entity.SuppliesWarehouse;
import com.skua.modules.supplies.service.ISuppliesWarehouseService;
import com.skua.modules.system.service.ISysConfigService;
import com.skua.modules.system.service.SmsService;
import com.skua.tool.util.DateUtils;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.service.spi.ServiceException;
......@@ -53,19 +55,19 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia
private ApproveRecordMapper recordMapper;
@Autowired
private IERPPurchaseContractService purchaseContractService;
@Autowired
private IPurchaseMaterialService purchaseMaterialService;
@Autowired
private IEquipmentInService equipmentInService;
@Autowired
private IEquipmentOutService equipmentOutService;
@Autowired
private ISuppliesWarehouseService warehouseService;
@Autowired
private IMaterialAcceptanceFormService materialAcceptanceFormService;//验收单
@Autowired
private ICommonSqlService commonSqlService;
private SmsService smsService;
@Autowired
private ISysConfigService configService;
/***
......@@ -91,9 +93,25 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia
* @param ids
* @return
*/
@Transactional
public int batchSendAudit(String ids,String auditStatus){
//发送信息
String roleId = configService.queryValueByKey("YJRK_SP_ROLE_ID");
smsService.pushMsgNoProcessByRoleId("药剂入库审批","有多个药剂入库需要审批审批",roleId,"MaterialIN");
return this.baseMapper.batchSendAudit(ids,auditStatus);
}
/**
*
* @param materialIN
*/
@Transactional
public void sendAudit(MaterialIN materialIN){
this.baseMapper.updateById(materialIN);
//发送信息
String roleId = configService.queryValueByKey("YJRK_SP_ROLE_ID");
smsService.pushMsgNoProcessByRoleId("药剂入库审批","有药剂入库单["+materialIN.getProjectName()+"]需要审批审批",roleId,"MaterialIN");
}
/***
* 审核药剂入库单
* @param materialINVO
......
......@@ -22,8 +22,12 @@ import java.util.Date;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.skua.modules.system.entity.SysConfig;
import com.skua.modules.system.service.ISysConfigService;
import com.skua.modules.system.service.SmsService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
......@@ -56,6 +60,12 @@ public class MajorIssuesProcessController {
@Autowired
private IMajorIssuesProcessItemService majorIssuesProcessItemService;
@Autowired
private SmsService smsService;
@Autowired
private ISysConfigService sysConfigService;
@AutoLog(value = "重点事项推进情况-分页列表查询")
@ApiOperation(value="重点事项推进情况-分页列表查询", notes="重点事项推进情况-分页列表查询")
@GetMapping(value = "/list")
......@@ -109,7 +119,7 @@ public class MajorIssuesProcessController {
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
try {
majorIssuesProcessService.removeById(id);
majorIssuesProcessService.deleteById(id);
} catch (Exception e) {
log.error("删除失败",e.getMessage());
return Result.error("删除失败!");
......@@ -147,6 +157,28 @@ public class MajorIssuesProcessController {
return result;
}
@AutoLog(value = "重点事项推进情况-信息推送")
@ApiOperation(value="重点事项推进情况-信息推送", notes="重点事项推进情况-信息推送")
@GetMapping(value = "/pushMessage")
public Result<MajorIssuesProcess> pushMessage(@RequestParam(name="id",required=true) String id) {
Result<MajorIssuesProcess> result = new Result<MajorIssuesProcess>();
MajorIssuesProcess majorIssuesProcess = majorIssuesProcessService.getById(id);
if(majorIssuesProcess==null) {
result.error500("未找到对应实体");
}else {
//
String roleId = sysConfigService.queryValueByKey("YXBG_ROLE_ID");
if(StringUtils.isNotEmpty(roleId)){
smsService.pushMsgNoProcessByRoleId("请查看重点事项推进进展" ,"请查看:["+majorIssuesProcess.getMatterName()+"]重点事项推进进展" ,roleId,"MajorIssuesProcess");
result.setResult(majorIssuesProcess);
result.setSuccess(true);
}else{
result.error500("未找到信息推送的角色");
}
}
return result;
}
@AutoLog(value = "重点事项推进情况-进展列表")
@ApiOperation(value="重点事项推进情况-进展列表", notes="重点事项推进情况-进展列表")
@GetMapping(value = "/processList")
......
......@@ -3,6 +3,7 @@ package com.skua.modules.report.controller;
import com.skua.core.api.vo.Result;
import com.skua.core.aspect.annotation.AutoLog;
import com.skua.core.context.BaseContextHandler;
import com.skua.modules.custom.service.IFCustomReportDatasetService;
import com.skua.modules.report.service.IOperationReportService;
import com.skua.modules.report.vo.JnhbReportData;
......@@ -38,7 +39,8 @@ public class OperationReportController {
@RequestParam(name="season") Integer season,
HttpServletRequest req) {
Result<ProductDataVO> result = new Result<ProductDataVO>();
ProductDataVO productDataVO = operationReportService.handeReportMonthData(year,season);
String departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674
ProductDataVO productDataVO = operationReportService.handeReportMonthData(departIds,year,season);
result.setResult( productDataVO );
return result;
}
......
......@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.skua.core.aspect.annotation.Dict;
import com.skua.tool.util.DateUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -53,6 +54,9 @@ public class MajorIssuesProcess {
@ApiModelProperty(value = "循环周期单位")
@Dict(dicCode = "loop_unit")
private String cycleUnit;
/**预估金额*/
@Excel(name = "预估金额", width = 15)
@ApiModelProperty(value = "预估金额")
......@@ -94,4 +98,40 @@ public class MajorIssuesProcess {
@Excel(name = "删除标识,0:正常,1:删除", width = 15)
@ApiModelProperty(value = "删除标识,0:正常,1:删除")
private Integer delFlag;
@TableField(exist=false)
@Excel(name = "推进频率小时", width = 15)
@ApiModelProperty(value = "推进频率小时:提供计算使用")
private Long frequency;
@TableField(exist=false)
@Excel(name = "是否超频率", width = 15)
@ApiModelProperty(value = "是否超频率:默认 false 没有超标;true表示超标")
private Boolean contrastFlag;
public Long getFrequency() {
// cycleUnit: 周=2;天=1:月=3:年=4
frequency = 0l;
Long hours = 0l;
if("1" == cycleUnit) hours = hours*24 ;
if("2" == cycleUnit) hours = hours*24*7 ;
if("3" == cycleUnit) hours = hours*24*30 ;
if("4" == cycleUnit) hours = hours*24*365 ;
if(cycle != null && cycle.intValue() !=0){
frequency = hours/cycle;
}
return frequency;
}
public Boolean getContrastFlag() {
contrastFlag = false;
if( this.getCurrentProgressTime() != null ){
long houts = DateUtils.differenceHours(this.getCurrentProgressTime(),new Date());
if(this.getFrequency() > houts){
contrastFlag = true;
}
}
return contrastFlag;
}
}
......
......@@ -11,4 +11,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface MajorIssuesProcessMapper extends BaseMapper<MajorIssuesProcess> {
/**
* 级联删除
* @param id
*/
void deleteItemById(@Param("id") String id);
}
......
......@@ -2,4 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.skua.modules.report.mapper.MajorIssuesProcessMapper">
</mapper>
\ No newline at end of file
<delete id="deleteItemById" >
delete from f_major_issues_process where matter_process_id = #{id}
</delete>
</mapper>
......
......@@ -8,4 +8,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IMajorIssuesProcessService extends IService<MajorIssuesProcess> {
/***
* 删除重点事项推荐情况
* @param id
*/
Integer deleteById(String id);
}
......
......@@ -13,5 +13,5 @@ public interface IOperationReportService {
* @param season
* @return
*/
ProductDataVO handeReportMonthData(Integer year, Integer season);
ProductDataVO handeReportMonthData(String departIds,Integer year, Integer season);
}
......
......@@ -6,6 +6,7 @@ import com.skua.modules.report.service.IMajorIssuesProcessService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
/**
* 重点事项推进情况
......@@ -13,4 +14,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class MajorIssuesProcessServiceImpl extends ServiceImpl<MajorIssuesProcessMapper, MajorIssuesProcess> implements IMajorIssuesProcessService {
/***
* 删除重点事项推荐情况
* @param id
*/
@Transactional
public Integer deleteById(String id){
this.baseMapper.deleteItemById(id);
return this.baseMapper.deleteById(id);
}
}
......
......@@ -44,26 +44,27 @@ public class OperationReportServiceImpl implements IOperationReportService {
* @param season
* @return
*/
public ProductDataVO handeReportMonthData(Integer year, Integer season){
public ProductDataVO handeReportMonthData(String departId,Integer year, Integer season){
ProductDataVO productDataVO = new ProductDataVO();//返回结果
int lastYear = year - 1;//去年
productDataVO.setLastYear(lastYear);
productDataVO.setYear( year );
SeasonTimeVO seasonTimeVO = new SeasonTimeVO(year ,season );
SeasonTimeVO lastSeasonTimeVO = new SeasonTimeVO(lastYear ,season );
// SeasonTimeVO lastSeasonTimeVO = new SeasonTimeVO(lastYear ,season );
productDataVO.setSeansonEndDay(seasonTimeVO.getEndTime());//季度最后一天
productDataVO.setStartTime(seasonTimeVO.getStartTime());//季度开始时间
productDataVO.setEndTime( seasonTimeVO.getEndTime());//季度结束时间
//水务公司总数
String sql = "select count(1) from sys_depart where depart_type = 1";
String sql = "select count(1) from sys_depart where depart_type = 1 and id in ("+JSUtils.quoteEach(departId,",")+")";
String deptartCount = getJdbcTemplate().queryForObject(sql,String.class);
productDataVO.setDeptartCount( deptartCount );
long dayNum = DateUtils.differenceDay(seasonTimeVO.getStartTime(),seasonTimeVO.getEndTime());//天数
String departId = BaseContextHandler.getDeparts();
// String departId = BaseContextHandler.getDeparts();
productDataVO.setSequentialProgress("基本满足时序进度");
// ysfsl:月收费水量 ; yyf:月药费 ; ysjsl:月实际水量
String dataViewName4411 = ReportViewUtil.buildView(ReportConstant.view4411,"ysfsl,ysjsl,yyf", departId, seasonTimeVO.getStartTime(),seasonTimeVO.getEndTime());
sql = "select sum(aaa.ysfsl) 'ysfsl' , sum(aaa.yyf) 'yyf' ,sum(aaa.ysjsl) 'ysjsl' from "+ dataViewName4411 + " aaa";
sql = "select round(sum(aaa.ysfsl),2) 'ysfsl' , round(sum(aaa.yyf),2) 'yyf' ,round(sum(aaa.ysjsl),2) 'ysjsl' from "+ dataViewName4411 + " aaa";
String ysfsl = null;//月收费水量 ;
String ysjsl = null;//月实际水量;
Map<String, Object> dataMap = getJdbcTemplate().queryForMap(sql);
......
......@@ -19,6 +19,9 @@ public class ProductDataVO {
@ApiModelProperty(value = "去年")
private Integer lastYear;
@ApiModelProperty(value = "今年")
private Integer year;
@ApiModelProperty(value = "季度开始时间")
private String startTime;
@ApiModelProperty(value = "季度结束时间")
......
......@@ -37,7 +37,6 @@
select ei.depart_id,ei.in_order 'in_out_order' ,ei.in_type,ei.in_date 'inOutDate',ei.use_by,ei.choose_time,ei.supplies_warehouse_id,sw.warehouse_name,
mic.sparepart_id , mic.cur_storage_num 'storageNum', mic.in_num 'inOutNum' ,mic.quality,mic.batch_num,
ss.sparepart_code,ss.sparepart_name, ss.specification,ss.measuring_unit,st.item_text as 'sparepart_type_name'
from equipment_in_child mic
left join equipment_in ei on ei.id = mic.in_id
left join supplies_warehouse sw on sw.id = ei.supplies_warehouse_id
......@@ -50,7 +49,6 @@
select eo.depart_id,eo.out_order 'in_out_order' ,eo.out_date 'inOutDate' ,eo.use_by,eo.choose_time,eo.supplies_warehouse_id,sw.warehouse_name,
moc.sparepart_id , moc.actual_num 'storageNum',moc.out_num 'inOutNum',moc.batch_num,
ss.sparepart_code,ss.sparepart_name, ss.specification,ss.measuring_unit,st.item_text as 'sparepart_type_name'
from equipment_out_child moc
left join equipment_out eo on eo.id = moc.out_id
left join supplies_warehouse sw on sw.id = eo.supplies_warehouse_id
......
......@@ -669,11 +669,11 @@
SELECT eor.factory_id ,IFNULL( SUM( SUBSTRING( run_time, 1, 2 ) ), 0 ) / 24 AS runTime
FROM equipment_operation_record eor
WHERE 1=1
<if test="startDate != null and startDate != ''">
and eor.create_time &gt;= #{startDate}
<if test="startTime != null and startTime != ''">
and eor.create_time &gt;= #{startTime}
</if>
<if test="endDate != null and endDate != ''">
and eor.create_time &lt;= #{endDate}
<if test="endTime != null and endTime != ''">
and eor.create_time &lt;= #{endTime}
</if>
group by eor.factory_id
)aaa on aaa.factory_id = d.id
......@@ -682,18 +682,17 @@
SELECT er.depart_id,COUNT( DISTINCT info_id ) AS equips,COUNT( er.id ) AS failures, round( IFNULL(SUM( UNIX_TIMESTAMP( er.reality_maintenance_end_time )- UNIX_TIMESTAMP( er.repair_date ) ),0)/60/60/24 ,2) AS downtime
FROM equipment_repair er
WHERE er.del_flag = 1
<if test="startDate != null and startDate != ''">
and er.create_time &gt;= #{startDate}
<if test="startTime != null and startTime != ''">
and er.create_time &gt;= #{startTime}
</if>
<if test="endDate != null and endDate != ''">
and er.create_time &lt;= #{endDate}
<if test="endTime != null and endTime != ''">
and er.create_time &lt;= #{endTime}
</if>
AND
)bbb on bbb.depart_id = d.id
where d.depart_type = 1
<if test="departIds != null ">
and d.depart_id in(${departIds})
</if>
<if test="departIds != null ">
and d.id in(${departIds})
</if>
</select>
......
......@@ -51,7 +51,7 @@ public interface IProductionEquipmentService {
// MF 详情
List<Map> getEquipmentMFDetails(ReportStatisticsDTO reportStatisticsDTO);
public List<ContrastDetailVO> getEquipmentMFDetailsNew(String departIds,String startTime,String endTime);
List<ContrastDetailVO> getEquipmentMFDetailsNew(String departIds,String startTime,String endTime);
//维护完成率趋势
List<ContrastVO> getMaintainCompleteRate(ReportStatisticsDTO reportStatisticsDTO);
......
......@@ -47,7 +47,7 @@ public class ContrastDetailVO {
public Double getRepairNum() {
repairNum = 0.00d;
if (StringUtils.isNotEmpty(failures) && StringUtils.isNotEmpty(equips) && !failures.equals("0") && !equips.equals("0")) {
if (StringUtils.isNotEmpty(runTime) && StringUtils.isNotEmpty(failures) && StringUtils.isNotEmpty(equips) && !failures.equals("0") && !equips.equals("0")) {
repairNum = Double.parseDouble(runTime) / Integer.parseInt(failures) / Integer.parseInt(equips);
repairNum = DoubleOperaUtils.bigDecimalRound(repairNum,2);
}
......@@ -56,7 +56,7 @@ public class ContrastDetailVO {
public Double getMaintainNum() {
maintainNum =0.00d;
if (StringUtils.isNotEmpty(increase) && !increase.equals("0")) {
if (StringUtils.isNotEmpty(downtime) && StringUtils.isNotEmpty(increase) && !increase.equals("0")) {
maintainNum = Double.parseDouble(downtime) / Integer.parseInt(increase);
maintainNum = DoubleOperaUtils.bigDecimalRound(maintainNum,2);
}
......
......@@ -100,5 +100,5 @@ public interface SysFactoryInfoMapper extends BaseMapper<SysFactoryInfo> {
* 获取总的设计规模
* @return
*/
public String querySumProScale();
public String querySumProScale(@Param("departIds") String departIds);
}
......
......@@ -81,4 +81,11 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
String queryDepartIdsByUserId(@Param("userId") String userId);
List<SysUser> getNoUpdatePasswordUserList(@Param("editTime") String editTime);
/**
* 根据角色获取用户集合(包含权限)
* @param roleId
* @return
*/
List<SysUser> queryUserByRoleId(@Param("roleId") String roleId);
}
......
......@@ -495,5 +495,9 @@
<!-- 获取总的设计规模-->
<select id="querySumProScale" resultType="java.lang.String">
select sum(pro_scale) from sys_factory_info
where 1=1
<if test="departIds != null and departIds != ''">
and depart_id in (${departIds})
</if>
</select>
</mapper>
......
......@@ -36,6 +36,27 @@
</foreach>
</if>
</select>
<select id="queryUserByRoleId" resultType="com.skua.modules.system.entity.SysUser">
SELECT
u.*
FROM
sys_user u
LEFT JOIN sys_user_depart d ON u.id = d.user_id
WHERE
u.del_flag = '0'
AND u.is_system_user = '0'
AND u.id IN ( SELECT user_id FROM sys_user_role WHERE role_id = #{roleId} )
<if test="username!=null and username!=''">
AND (u.username LIKE CONCAT('%',#{username},'%') or u.realname LIKE CONCAT('%',#{username},'%'))
</if>
<if test="departId!=null and departId!=''">
AND d.dep_id IN
<foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
<select id="queryDepartIdsByUserId" resultType="java.lang.String">
SELECT
......
......@@ -108,7 +108,7 @@ public interface ISysFactoryInfoService extends IService<SysFactoryInfo> {
* 获取总的设计规模
* @return
*/
public String querySumProScale();
public String querySumProScale(String departIds);
/**
* 获取进出水标准
......
......@@ -63,6 +63,12 @@ public interface ISysUserService extends IService<SysUser> {
IPage<SysUser> getUserByRoleId(Page<SysUser> page,String roleId, String username);
/**
* 根据角色Id查询
* @param
* @return
*/
List<SysUser> queryUserByRoleId(String roleId);
/**
* 通过用户名获取用户角色集合
*
* @param username 用户名
......
package com.skua.modules.system.service;
import com.skua.core.context.BaseContextHandler;
import com.skua.core.util.push.IPushService;
import com.skua.core.util.push.MessageEntity;
import com.skua.core.util.push.PushMessageFactory;
import com.skua.modules.system.entity.SysUser;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.stream.Collectors;
/**
* @auther kangwei
* @create 2025-02-24-10:38
*/
@Service
public class SmsService {
private ISysUserService userService;
public void pushMsgNoProcessByRoleId(String messageTitle ,String messageBody ,String roleId,String forwardTag){
if(StringUtils.isNotEmpty(roleId)){
List<SysUser> sysUserList = userService.queryUserByRoleId(roleId);
pushMessage(sysUserList,messageTitle , messageBody , forwardTag);
}
}
/***
* 信息推送:包含手机,web推送
* @param messageTitle
* @param messageBody
* @param userIds
* @param forwardTag
*/
public void pushMsgNoProcess(String messageTitle ,String messageBody ,String userIds,String forwardTag){
if(StringUtils.isNotEmpty(userIds)){
List<SysUser> sysUserList = userService.getUserByUserIds(userIds);
pushMessage(sysUserList,messageTitle , messageBody , forwardTag);
}
}
private void pushMessage(List<SysUser> sysUserList,String messageTitle ,String messageBody ,String forwardTag){
List<String> userCidList = sysUserList.stream().map(SysUser::getCid).filter(v -> StringUtils.isNotBlank(v)).collect(Collectors.toList());
List<String> userIdList = sysUserList.stream().map(SysUser::getId).collect(Collectors.toList());
MessageEntity messageEntity = new MessageEntity();
messageEntity.setMessageTitle(messageTitle);
messageEntity.setMessageBody(messageBody);
messageEntity.setReceiveUser(userIdList);
messageEntity.setReceiveUserCid(userCidList);//移动端推送
messageEntity.setSendUser(BaseContextHandler.getUserName());
messageEntity.setForwardTag(forwardTag);//消息提醒类型 保持唯一
IPushService appPushService = PushMessageFactory.getPushService("MOB");
IPushService webPushService = PushMessageFactory.getPushService("WEB");
appPushService.pushMessage(messageEntity);
webPushService.pushMessage(messageEntity);
}
/***
* 手机推送
* @param messageTitle
* @param messageBody
* @param userIds
* @param forwardTag
*/
public void appPushMsgNoProcess(String messageTitle ,String messageBody ,String userIds,String forwardTag){
if(StringUtils.isNotEmpty(userIds)){
List<SysUser> sysUserList = userService.getUserByUserIds(userIds);
List<String> userCidList = sysUserList.stream().map(SysUser::getCid).filter(v -> StringUtils.isNotBlank(v)).collect(Collectors.toList());
MessageEntity messageEntity = new MessageEntity();
messageEntity.setMessageTitle(messageTitle);
messageEntity.setMessageBody(messageBody);
messageEntity.setReceiveUserCid(userCidList);//移动端推送
messageEntity.setSendUser(BaseContextHandler.getUserName());
messageEntity.setForwardTag(forwardTag);//消息提醒类型 保持唯一
IPushService appPushService = PushMessageFactory.getPushService("MOB");
appPushService.pushMessage(messageEntity);
}
}
/***
* web推送
* @param messageTitle
* @param messageBody
* @param userIds
* @param forwardTag
*/
public void webPushMsgNoProcess(String messageTitle ,String messageBody ,String userIds,String forwardTag){
if(StringUtils.isNotEmpty(userIds)){
List<SysUser> sysUserList = userService.getUserByUserIds(userIds);
List<String> userCidList = sysUserList.stream().map(SysUser::getCid).filter(v -> StringUtils.isNotBlank(v)).collect(Collectors.toList());
List<String> userIdList = sysUserList.stream().map(SysUser::getId).collect(Collectors.toList());
MessageEntity messageEntity = new MessageEntity();
messageEntity.setMessageTitle(messageTitle);
messageEntity.setMessageBody(messageBody);
messageEntity.setReceiveUser(userIdList);
messageEntity.setSendUser(BaseContextHandler.getUserName());
messageEntity.setForwardTag(forwardTag);//消息提醒类型 保持唯一
IPushService webPushService = PushMessageFactory.getPushService("WEB");
webPushService.pushMessage(messageEntity);
}
}
}
......@@ -681,8 +681,8 @@ public class SysFactoryInfoServiceImpl extends ServiceImpl<SysFactoryInfoMapper,
* 获取总的设计规模
* @return
*/
public String querySumProScale(){
return sysFactoryInfoMapper.querySumProScale();
public String querySumProScale(String departIds){
return sysFactoryInfoMapper.querySumProScale(departIds);
}
@Override
......
......@@ -182,7 +182,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
return userMapper.getUserByRoleId(page, roleId, username, departIds);
}
//获取登录人所属集团
@Override
public List<SysUser> queryUserByRoleId(String roleId) {
return this.baseMapper.queryUserByRoleId(roleId);
}
//获取登录人所属集团
private String getUserOrgCode(String userId) {
String jtCode = "";
SysUser user = userMapper.selectById(userId);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!