包头bug修改
This commit is contained in:
parent
d2d44b5c40
commit
3e511807eb
@ -1,12 +1,18 @@
|
||||
package com.zhgd.xmgl.modules.baotou.controller;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IQualityCommonProblemRecordService;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.QualityCommonProblemLibrary;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.QualityCommonProblemRecord;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IQualityCommonProblemLibraryService;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IQualityCommonProblemRecordService;
|
||||
import com.zhgd.xmgl.util.ExcelUtils;
|
||||
import com.zhgd.xmgl.util.MessageUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
@ -15,7 +21,10 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.HashMap;
|
||||
@ -38,6 +47,9 @@ import java.util.Optional;
|
||||
public class QualityCommonProblemRecordController {
|
||||
@Autowired
|
||||
private IQualityCommonProblemRecordService qualityCommonProblemRecordService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IQualityCommonProblemLibraryService qualityCommonProblemLibraryService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
@ -153,6 +165,57 @@ public class QualityCommonProblemRecordController {
|
||||
return Result.success(qualityCommonProblemRecordService.tree(param));
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 录入数据模板
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// @PostMapping(value = "/importData")
|
||||
// public Result importData(@ApiIgnore MultipartFile file) {
|
||||
// List<Map<String, String>> list = null;
|
||||
// try {
|
||||
// list = ExcelUtils.jxlExlToList(file.getInputStream(), 0);
|
||||
// if (list == null || list.size() == 0) {
|
||||
// throw new OpenAlertException(MessageUtil.get("excelNotDataErr"));
|
||||
// }
|
||||
// int sort = 0;
|
||||
// String projectSn = "5B8B3DB047214AE188F2C7916DD08203";
|
||||
// String one = null;
|
||||
// Long top1 = null;
|
||||
// Long top2 = null;
|
||||
// for (Map<String, String> map : list) {
|
||||
// if (StrUtil.isNotBlank(one = map.get("left1"))) {
|
||||
// QualityCommonProblemLibrary library = getLibrary(projectSn, 0L, sort++, one);
|
||||
// qualityCommonProblemLibraryService.add(library);
|
||||
// top1 = library.getId();
|
||||
// } else if (StrUtil.isNotBlank(one = map.get("left2"))) {
|
||||
// QualityCommonProblemLibrary library = getLibrary(projectSn, top1, sort++, one);
|
||||
// qualityCommonProblemLibraryService.add(library);
|
||||
// top2 = library.getId();
|
||||
// }
|
||||
// if (StrUtil.isNotBlank(one = map.get("right"))) {
|
||||
// QualityCommonProblemRecord record = new QualityCommonProblemRecord();
|
||||
// record.setQualityCommonProblemLibraryId(top2);
|
||||
// record.setCommonDiseasePhenomena(one);
|
||||
// record.setProjectSn(projectSn);
|
||||
// qualityCommonProblemRecordService.add(record);
|
||||
// }
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// throw new OpenAlertException();
|
||||
// }
|
||||
// return Result.ok();
|
||||
// }
|
||||
//
|
||||
// private QualityCommonProblemLibrary getLibrary(String projectSn, long parentId, int sort, String name) {
|
||||
// QualityCommonProblemLibrary library = new QualityCommonProblemLibrary();
|
||||
// library.setQualityCommonProblemName(name);
|
||||
// library.setProjectSn(projectSn);
|
||||
// library.setParentId(parentId);
|
||||
// library.setSort(sort);
|
||||
// return library;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.zhgd.xmgl.modules.baotou.entity;
|
||||
import java.io.Serializable;
|
||||
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 lombok.Data;
|
||||
@ -21,30 +22,62 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
@TableName("project_home_notice")
|
||||
@ApiModel(value="ProjectHomeNotice实体类",description="ProjectHomeNotice")
|
||||
public class ProjectHomeNotice implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.Long id;
|
||||
/**
|
||||
* 所属项目SN
|
||||
*/
|
||||
@ApiModelProperty(value = "所属项目SN")
|
||||
private java.lang.String projectSn;
|
||||
/**
|
||||
* 1人员2安全3质量4进度5施工6党建7质量监督通知公告8系统管理
|
||||
*/
|
||||
@ApiModelProperty(value = "1人员2安全3质量4进度5施工6党建7质量监督通知公告8系统管理")
|
||||
private java.lang.Integer whichModule;
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ApiModelProperty(value = "标题")
|
||||
private java.lang.String title;
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@ApiModelProperty(value = "内容")
|
||||
private java.lang.String content;
|
||||
@ApiModelProperty(value = "附件url")
|
||||
private java.lang.String fileUrl;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "上传时间")
|
||||
private java.util.Date uploadTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updateTime;
|
||||
@ApiModelProperty(value = "下发部门(字典值)")
|
||||
private java.lang.String issueDepartment;
|
||||
|
||||
@ApiModelProperty(value = "1首页显示2专题页显示")
|
||||
private java.lang.Integer showHome;
|
||||
@ApiModelProperty(value = "上传人")
|
||||
private java.lang.Long uploader;
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "上传人名称")
|
||||
private java.lang.String uploaderName;
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "下发部门(字典名)")
|
||||
private java.lang.String issueDepartmentName;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value="id")
|
||||
private java.lang.Long id ;
|
||||
/**所属项目SN*/
|
||||
@ApiModelProperty(value="所属项目SN")
|
||||
private java.lang.String projectSn ;
|
||||
/**1人员2安全3质量4进度5施工6党建7质量监督通知公告*/
|
||||
@ApiModelProperty(value="1人员2安全3质量4进度5施工6党建7质量监督通知公告")
|
||||
private java.lang.Integer whichModule ;
|
||||
/**标题*/
|
||||
@ApiModelProperty(value="标题")
|
||||
private java.lang.String title ;
|
||||
/**内容*/
|
||||
@ApiModelProperty(value="内容")
|
||||
private java.lang.String content ;
|
||||
@ApiModelProperty(value="附件url")
|
||||
private java.lang.String fileUrl ;
|
||||
/**创建时间*/
|
||||
@ApiModelProperty(value="创建时间")
|
||||
private java.util.Date createTime ;
|
||||
/**更新时间*/
|
||||
@ApiModelProperty(value="更新时间")
|
||||
private java.util.Date updateTime ;
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
,pgu.project_group_id
|
||||
from
|
||||
device_unit t
|
||||
join project_group pg on find_in_set(pg.id,t.project_group_ids)
|
||||
left join project_group pg on find_in_set(pg.id,t.project_group_ids)
|
||||
left join project_group_unit pgu on pg.id = pgu.project_group_id
|
||||
left join enterprise_info ei on find_in_set(ei.id,t.epc_contractor_ids)
|
||||
left join enterprise_info ei3 on find_in_set(ei3.id,t.construction_unit_ids)
|
||||
|
||||
@ -5,14 +5,24 @@
|
||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.baotou.entity.ProjectHomeNotice">
|
||||
select * from (
|
||||
select t.*
|
||||
,su.real_name as uploader_name
|
||||
,di.name as issue_department_name
|
||||
from project_home_notice t
|
||||
left join system_user su on su.user_id=t.uploader
|
||||
left join dictionary_item di on di.data=t.issue_department and
|
||||
di.dictionary_encoding='project_home_notice_department'
|
||||
)t
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
<select id="queryById" resultType="com.zhgd.xmgl.modules.baotou.entity.ProjectHomeNotice">
|
||||
select * from (
|
||||
select t.*
|
||||
,su.real_name as uploader_name
|
||||
,di.name as issue_department_name
|
||||
from project_home_notice t
|
||||
left join system_user su on su.user_id=t.uploader
|
||||
left join dictionary_item di on di.data=t.issue_department and
|
||||
di.dictionary_encoding='project_home_notice_department'
|
||||
)t
|
||||
where t.id = #{id}
|
||||
</select>
|
||||
@ -27,8 +37,10 @@
|
||||
,t.file_url
|
||||
,t.create_time
|
||||
,t.update_time
|
||||
,su.real_name as uploader_name
|
||||
from
|
||||
project_home_notice t
|
||||
left join system_user su on su.user_id=t.uploader
|
||||
where project_sn = #{param.projectSn} and which_module = 7
|
||||
union all
|
||||
select
|
||||
@ -40,6 +52,7 @@
|
||||
,r.attachment
|
||||
,r.time
|
||||
,r.update_date
|
||||
,''
|
||||
from
|
||||
project_supervision_monthly_report r
|
||||
where project_sn = #{param.projectSn}
|
||||
|
||||
@ -203,8 +203,8 @@ public class PlanFeedbackApprovalController {
|
||||
return planFeedbackApprovalService.saveInfo(param);
|
||||
}
|
||||
|
||||
@OperLog(operModul = "进度反馈审批管理", operType = "删除", operDesc = "删除关联的作业和反馈记录")
|
||||
@ApiOperation(value = "删除关联的作业和反馈记录", notes = "删除关联的作业和反馈记录", httpMethod = "POST")
|
||||
@OperLog(operModul = "进度反馈审批管理", operType = "删除", operDesc = "删除关联的作业和反馈记录(未发起审批时调用)")
|
||||
@ApiOperation(value = "删除关联的作业和反馈记录(未发起审批时调用)", notes = "删除关联的作业和反馈记录(未发起审批时调用)", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "approvalId", value = "进度反馈审批ID", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "recordId", value = "记录ID", paramType = "body", required = true, dataType = "String"),
|
||||
|
||||
@ -126,10 +126,13 @@ public class PlanFeedbackController {
|
||||
|
||||
@OperLog(operModul = "进度反馈记录管理", operType = "", operDesc = "查询最新进度反馈记录信息")
|
||||
@ApiOperation(value = "查询最新进度反馈记录信息", notes = "查询最新进度反馈记录信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "recordId", value = "计划编制id", paramType = "query", required = true, dataType = "String")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "recordId", value = "计划编制id", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "feedbackType", value = "1计划2实际", paramType = "query", required = false, dataType = "String"),
|
||||
})
|
||||
@GetMapping(value = "/getNewest")
|
||||
public Result<PlanFeedback> getNewest(@RequestParam(name = "recordId", required = true) String recordId) {
|
||||
return Result.success(planFeedbackService.getNewest(recordId));
|
||||
public Result<PlanFeedback> getNewest(@RequestParam(name = "recordId", required = true) String recordId, Integer feedbackType) {
|
||||
return Result.success(planFeedbackService.getNewest(recordId, feedbackType));
|
||||
}
|
||||
|
||||
@OperLog(operModul = "进度反馈记录管理", operType = "", operDesc = "分页查询计划反馈的周期里程碑列表")
|
||||
|
||||
@ -415,7 +415,7 @@ public class PlanRecordController {
|
||||
// }
|
||||
|
||||
// /**
|
||||
// * 导入里程碑
|
||||
// *录入数据-里程碑
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
|
||||
@ -33,17 +33,28 @@ public class PlanFeedbackApprovalWork implements Serializable {
|
||||
/**计划编制id*/
|
||||
@ApiModelProperty(value="计划编制id")
|
||||
private java.lang.Long recordId ;
|
||||
/**反馈id*/
|
||||
/**
|
||||
* 反馈id,这个审批未通过之前是空的,通过之后才保存,因为审批未通过之前外面的反馈要和里面批量反馈的反馈内容一致
|
||||
*/
|
||||
@ApiModelProperty(value="反馈id")
|
||||
private java.lang.Long feedbackId ;
|
||||
/**创建时间 yyyy-MM-dd HH:mm:ss*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value="创建时间 yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date createTime ;
|
||||
/**更新时间 yyyy-MM-dd HH:mm:ss*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value="更新时间 yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date updateTime ;
|
||||
private java.lang.Long feedbackId;
|
||||
/**
|
||||
* 创建时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间 yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date createTime;
|
||||
/**
|
||||
* 更新时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间 yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date updateTime;
|
||||
/**
|
||||
* 1计划2实际
|
||||
**/
|
||||
@ApiModelProperty(value = "1计划2实际")
|
||||
private Integer feedbackType;
|
||||
}
|
||||
|
||||
@ -200,4 +200,12 @@ public class PlanRecord implements Serializable {
|
||||
@ApiModelProperty(value = "审批通过的最新的feedBackId")
|
||||
@Deprecated
|
||||
private Long newestFeedBackId;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "1能反馈")
|
||||
private Integer isFeedback;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "1计划2实际")
|
||||
private Integer feedbackType;
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ public interface IPlanFeedbackService extends IService<PlanFeedback> {
|
||||
*/
|
||||
PlanFeedback queryById(String id);
|
||||
|
||||
PlanFeedback getNewest(String recordId);
|
||||
PlanFeedback getNewest(String recordId, Integer feedbackType);
|
||||
|
||||
List<PlanFeedbackPeriod> getPeriodMilestones(Map<String, Object> param);
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package com.zhgd.xmgl.modules.baotou.plan.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.baotou.plan.entity.PlanMilestone;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.xmgl.modules.baotou.plan.entity.PlanMilestone;
|
||||
import com.zhgd.xmgl.modules.baotou.plan.entity.PlanRecord;
|
||||
|
||||
import java.util.HashMap;
|
||||
@ -11,42 +11,53 @@ import java.util.List;
|
||||
/**
|
||||
* @Description: 进度里程碑
|
||||
* @author: pds
|
||||
* @date: 2024-11-28
|
||||
* @date: 2024-11-28
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface IPlanMilestoneService extends IService<PlanMilestone> {
|
||||
/**
|
||||
* 分页列表查询进度里程碑信息
|
||||
*
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
IPage<PlanMilestone> queryPageList(HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 列表查询进度里程碑信息
|
||||
*
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
List<PlanMilestone> queryList(HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 添加进度里程碑信息
|
||||
*
|
||||
* @param planMilestone 进度里程碑
|
||||
* @return
|
||||
*/
|
||||
void add(PlanMilestone planMilestone);
|
||||
|
||||
/**
|
||||
* 编辑进度里程碑信息
|
||||
*
|
||||
* @param planMilestone 进度里程碑
|
||||
* @return
|
||||
*/
|
||||
void edit(PlanMilestone planMilestone);
|
||||
|
||||
/**
|
||||
* 根据id删除进度里程碑信息
|
||||
*
|
||||
* @param id 进度里程碑的id
|
||||
* @return
|
||||
*/
|
||||
void delete(String id);
|
||||
|
||||
/**
|
||||
* 根据id查询进度里程碑信息
|
||||
*
|
||||
* @param id 进度里程碑的id
|
||||
* @return
|
||||
*/
|
||||
@ -54,6 +65,13 @@ public interface IPlanMilestoneService extends IService<PlanMilestone> {
|
||||
|
||||
List<PlanMilestone> getParentMilestones(String recordId);
|
||||
|
||||
/**
|
||||
* 获取计划编制的里程碑
|
||||
*
|
||||
* @param record
|
||||
* @param allPlanMilestones
|
||||
* @return
|
||||
*/
|
||||
List<PlanMilestone> getParentMilestones(PlanRecord record, List<PlanMilestone> allPlanMilestones);
|
||||
|
||||
/**
|
||||
|
||||
@ -155,6 +155,7 @@ public class PlanFeedbackApprovalServiceImpl extends ServiceImpl<PlanFeedbackApp
|
||||
PlanFeedbackApprovalWork work = ridMap.get(record.getId());
|
||||
if (work != null) {
|
||||
record.setFeedbackId(work.getFeedbackId());
|
||||
record.setFeedbackType(work.getFeedbackType());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -300,7 +301,7 @@ public class PlanFeedbackApprovalServiceImpl extends ServiceImpl<PlanFeedbackApp
|
||||
faw.setRecordId(rid);
|
||||
PlanFeedback feedback = ridFeedBackMap.get(rid);
|
||||
if (feedback == null || feedback.getApprovalStatus() != 1) {
|
||||
feedback = planFeedbackService.getNewest(String.valueOf(rid));
|
||||
feedback = planFeedbackService.getNewest(String.valueOf(rid), feedback.getFeedbackType());
|
||||
feedback.setRecordId(rid);
|
||||
}
|
||||
feedback.setProjectSn(approval.getProjectSn());
|
||||
@ -340,7 +341,7 @@ public class PlanFeedbackApprovalServiceImpl extends ServiceImpl<PlanFeedbackApp
|
||||
for (PlanFeedbackApprovalWork approvalWork : approvalWorks) {
|
||||
Long feedbackId = approvalWork.getFeedbackId();
|
||||
if (feedbackId == null) {
|
||||
PlanFeedback newest = planFeedbackService.getNewest(recordId);
|
||||
PlanFeedback newest = planFeedbackService.getNewest(recordId, approvalWork.getFeedbackType());
|
||||
feedbackId = newest != null ? newest.getId() : -100L;
|
||||
}
|
||||
planFeedbackService.removeById(feedbackId);
|
||||
|
||||
@ -148,9 +148,9 @@ public class PlanFeedbackServiceImpl extends ServiceImpl<PlanFeedbackMapper, Pla
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlanFeedback getNewest(String recordId) {
|
||||
public PlanFeedback getNewest(String recordId, Integer feedbackType) {
|
||||
PlanRecord record = planRecordService.queryById(recordId);
|
||||
PlanFeedback feedback = this.getNewestFeedback(Long.valueOf(recordId), null, null);
|
||||
PlanFeedback feedback = this.getNewestFeedback(Long.valueOf(recordId), null, feedbackType);
|
||||
if (feedback == null) {
|
||||
PlanPbs pbs = planPbsService.queryById(record.getPbsId() + "");
|
||||
feedback = new PlanFeedback();
|
||||
@ -239,6 +239,8 @@ public class PlanFeedbackServiceImpl extends ServiceImpl<PlanFeedbackMapper, Pla
|
||||
} else {
|
||||
feedbackPeriods = this.getExistFeedbackPeriods(Long.valueOf(feedbackId), record);
|
||||
}
|
||||
|
||||
//筛选时间
|
||||
if (CollUtil.isNotEmpty(feedbackPeriods)) {
|
||||
if (StrUtil.isNotBlank(beginDate)) {
|
||||
feedbackPeriods = feedbackPeriods.stream().filter(o -> DateUtil.compare(DateUtil.parseDate(beginDate), o.getPeriodEnd()) <= 0).collect(Collectors.toList());
|
||||
@ -273,7 +275,7 @@ public class PlanFeedbackServiceImpl extends ServiceImpl<PlanFeedbackMapper, Pla
|
||||
mv.setWeight(milestone.getWeight());
|
||||
milestoneVals.add(mv);
|
||||
}
|
||||
fb.setPlanMilestoneVals(milestoneVals);
|
||||
fb.setMilestoneVals(milestoneVals);
|
||||
feedbackPeriods.add(fb);
|
||||
}
|
||||
return feedbackPeriods;
|
||||
@ -338,7 +340,7 @@ public class PlanFeedbackServiceImpl extends ServiceImpl<PlanFeedbackMapper, Pla
|
||||
public void saveInfo(PlanFeedback feedback) {
|
||||
//最新一条是新增状态的就更新
|
||||
Long recordId = feedback.getRecordId();
|
||||
PlanFeedback feedback1 = this.getNewestFeedback(recordId, null, null);
|
||||
PlanFeedback feedback1 = this.getNewestFeedback(recordId, null, feedback.getFeedbackType());
|
||||
PlanRecord record = planRecordService.getById(recordId);
|
||||
if (record.getWorkType() != 1) {
|
||||
throw new OpenAlertException("只有作业可以新增反馈内容");
|
||||
|
||||
@ -325,6 +325,8 @@ public class PlanRecordServiceImpl extends ServiceImpl<PlanRecordMapper, PlanRec
|
||||
} else {
|
||||
throw new OpenAlertException("不存在的类型");
|
||||
}
|
||||
|
||||
//筛选时间
|
||||
if (CollUtil.isNotEmpty(feedbackPeriods)) {
|
||||
if (StrUtil.isNotBlank(beginDate)) {
|
||||
feedbackPeriods = feedbackPeriods.stream().filter(o -> DateUtil.compare(DateUtil.parseDate(beginDate), o.getPeriodEnd()) <= 0).collect(Collectors.toList());
|
||||
@ -333,28 +335,24 @@ public class PlanRecordServiceImpl extends ServiceImpl<PlanRecordMapper, PlanRec
|
||||
feedbackPeriods = feedbackPeriods.stream().filter(o -> DateUtil.compare(DateUtil.parseDate(endDate), o.getPeriodStart()) >= 0).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
//去掉里程碑
|
||||
if (record.getWorkType() == 2) {
|
||||
boolean have = planMilestoneService.checkHaveMilestone(recordId);
|
||||
if (!have) {
|
||||
//去掉里程碑
|
||||
for (PlanFeedbackPeriod period : feedbackPeriods) {
|
||||
period.setPlanMilestoneVals(new ArrayList<>());
|
||||
period.setActualMilestoneVals(new ArrayList<>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//多的周期要删除,少的周期要添加
|
||||
List<PlanFeedbackPeriod> feedbackPeriods1 = new ArrayList<>();
|
||||
List<PlanFeedbackPeriod> myPeriods = this.getCalFeedbackPeriods(record, planPeriod);
|
||||
for (PlanFeedbackPeriod myPeriod : myPeriods) {
|
||||
Optional<PlanFeedbackPeriod> first = feedbackPeriods.stream().filter(o -> DateUtil.compare(o.getPeriodStart(), myPeriod.getPeriodStart()) == 0).findFirst();
|
||||
PlanFeedbackPeriod planFeedbackPeriod;
|
||||
if (first.isPresent()) {
|
||||
planFeedbackPeriod = first.get();
|
||||
} else {
|
||||
planFeedbackPeriod = myPeriod;
|
||||
}
|
||||
feedbackPeriods1.add(planFeedbackPeriod);
|
||||
feedbackPeriods1.add(first.orElse(myPeriod));
|
||||
}
|
||||
feedbackPeriods1 = feedbackPeriods1.stream().sorted((o1, o2) -> o1.getPeriodStart().compareTo(o2.getPeriodStart())).collect(Collectors.toList());
|
||||
|
||||
@ -453,6 +451,7 @@ public class PlanRecordServiceImpl extends ServiceImpl<PlanRecordMapper, PlanRec
|
||||
milestoneVals.add(mv);
|
||||
}
|
||||
fb.setPlanMilestoneVals(milestoneVals);
|
||||
fb.setActualMilestoneVals(milestoneVals);
|
||||
fb.setActualPer(new BigDecimal("0"));
|
||||
fb.setPlanPer(new BigDecimal("0"));
|
||||
fb.setActualYdz(new BigDecimal("0"));
|
||||
@ -766,12 +765,11 @@ public class PlanRecordServiceImpl extends ServiceImpl<PlanRecordMapper, PlanRec
|
||||
* @return
|
||||
*/
|
||||
private List<PlanFeedbackPeriod> getFeedbackPeriods(PlanRecord record, PlanPeriod planPeriod, List<PlanMilestone> allPlanMilestones, PlanFeedback planNewestFeedback, int feedbackType, List<PlanFeedbackPeriod> fbPeriods, List<PlanMilestoneVal> allVals) {
|
||||
String recordId = record.getId() + "";
|
||||
List<PlanFeedbackPeriod> feedbackPeriods = new ArrayList<>();
|
||||
if (planNewestFeedback == null) {
|
||||
//计算划分周期
|
||||
List<Map<String, Date>> divPeriods = planPeriodService.getDivPeriods(record.getPlannedStart(), record.getPlannedFinish(), planPeriod);
|
||||
List<PlanMilestone> milestones = allPlanMilestones.stream().filter(o -> Objects.equals(recordId, o.getRecordId() + "")).collect(Collectors.toList());
|
||||
List<PlanMilestone> milestones = planMilestoneService.getParentMilestones(record, allPlanMilestones);
|
||||
for (Map<String, Date> divPeriod : divPeriods) {
|
||||
PlanFeedbackPeriod fb = new PlanFeedbackPeriod();
|
||||
fb.setPeriodStart(divPeriod.get("s"));
|
||||
|
||||
@ -94,11 +94,15 @@ public class ProjectHomeNoticeServiceImpl extends ServiceImpl<ProjectHomeNoticeM
|
||||
@Override
|
||||
public void addFromFlow(Map<String, Object> param) {
|
||||
ProjectHomeNotice e = new ProjectHomeNotice();
|
||||
e.setProjectSn(FlowUtil.getString(param,"projectSn"));
|
||||
e.setWhichModule(FlowUtil.getInteger(param,"whichModule"));
|
||||
e.setTitle(FlowUtil.getString(param,"title"));
|
||||
e.setContent(FlowUtil.getString(param,"content"));
|
||||
e.setProjectSn(FlowUtil.getString(param, "projectSn"));
|
||||
e.setWhichModule(FlowUtil.getInteger(param, "whichModule"));
|
||||
e.setTitle(FlowUtil.getString(param, "title"));
|
||||
e.setContent(FlowUtil.getString(param, "content"));
|
||||
e.setFileUrl(FlowUtil.getString(param, "fileUrl"));
|
||||
e.setIssueDepartment(FlowUtil.getString(param, "issueDepartment"));
|
||||
e.setShowHome(FlowUtil.getPullDownInteger(param, "showHome"));
|
||||
e.setUploader(FlowUtil.getLong(param, "startUser"));
|
||||
e.setUpdateTime(FlowUtil.getDate(param, "updateTime"));
|
||||
this.add(e);
|
||||
}
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gexin.fastjson.TypeReference;
|
||||
@ -156,8 +157,8 @@ public class SystemUserController {
|
||||
return Result.success(systemUserService.queryById(map));
|
||||
}
|
||||
|
||||
@OperLog(operModul = "账号管理", operType = "修改用户密码", operDesc = "修改用户密码")
|
||||
@ApiOperation(value = "修改用户密码", notes = "修改用户密码", httpMethod = "POST")
|
||||
@OperLog(operModul = "账号管理", operType = "", operDesc = "用户自己修改密码")
|
||||
@ApiOperation(value = "用户自己修改密码", notes = "用户自己修改密码", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "passWord", required = true, value = "新密码", paramType = "body"),
|
||||
})
|
||||
@ -482,4 +483,26 @@ public class SystemUserController {
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@OperLog(operModul = "账号管理", operType = "", operDesc = "通过用户id重置密码")
|
||||
@ApiOperation(value = "通过用户id重置密码", notes = "通过用户id重置密码", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "passWord", value = "新密码", required = true, paramType = "body"),
|
||||
@ApiImplicitParam(name = "userId", value = "用户id", required = true, paramType = "body"),
|
||||
})
|
||||
@PostMapping(value = "/resetPw")
|
||||
public Result resetPw(@RequestBody Map<String, Object> map) {
|
||||
String userId = MapUtils.getString(map, "userId");
|
||||
String passWord = MapUtils.getString(map, "passWord");
|
||||
SystemUser su = systemUserService.getById(userId);
|
||||
if (su == null) {
|
||||
throw new OpenAlertException("用户不存在");
|
||||
}
|
||||
systemUserService.update(null, new LambdaUpdateWrapper<SystemUser>()
|
||||
.set(SystemUser::getIsFirstLogin, 1)
|
||||
.set(SystemUser::getShowPassword, passWord)
|
||||
.set(SystemUser::getPassword, passwordEncoder.encode(passWord))
|
||||
.set(SystemUser::getPwUpdateTime, new Date())
|
||||
.eq(SystemUser::getUserId, userId));
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ public class Notice implements Serializable {
|
||||
// @ApiModelProperty(value = "类型,1考勤提醒,2人员报警,3车辆,4混凝土监测,5卸料平台,6配电箱,7扬尘,8视频,9标养室,10安全检查,11质量检查,12塔吊,13升降机," +
|
||||
// "14电表,15水表,16访客,17,防疫人员通知,18访客通知,19巡检点,20人员的资质证书即将到期,21人员的合同信息即将到期,22人员的保险信息即将到期," +
|
||||
// "23同步人员到海康isc,24同步车辆到海康isc,25同步组织到海康isc 30工作流审批通知,31大屏的安全和质量,32大屏的危大,33应急处置,34车辆不安全行为识别监测")
|
||||
@ApiModelProperty(value="1质量;2安全;3AI;4安全履职预警;5企业资质;6人员资质;10通知公告;11巡检点;")
|
||||
@ApiModelProperty(value = "1质量;2安全;3AI;4安全履职预警;5企业资质;6人员资质;10其他;11巡检点;12待办;")
|
||||
private java.lang.String type;
|
||||
/**
|
||||
* 消息内容
|
||||
|
||||
@ -324,7 +324,7 @@ public class FlowOrgRepositoryServiceImpl implements OrgRepositoryService {
|
||||
|
||||
@Override
|
||||
public void notifyCustom(NotifyDto notify, WflowModelHistorys model, com.alibaba.fastjson2.JSONObject notifySetUp) {
|
||||
noticeService.addUserNoticeAndApp(Long.valueOf(notify.getTarget()), notify.getTitle(), notify.getContent(), "10");
|
||||
noticeService.addUserNoticeAndApp(Long.valueOf(notify.getTarget()), notify.getTitle(), notify.getContent(), "12");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -19,9 +19,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.net.URLDecoder;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
@Slf4j
|
||||
public class EasyPoiUtil {
|
||||
@ -290,11 +288,18 @@ public class EasyPoiUtil {
|
||||
String outDir = pdfFile.getAbsolutePath().substring(0, pdfFile.getAbsolutePath().lastIndexOf(File.separator));
|
||||
|
||||
// 构建LibreOffice的命令行工具命令
|
||||
String command = "libreoffice --invisible --convert-to pdf --outdir " + outDir + " " + sourcePath;
|
||||
log.info(command);
|
||||
List<String> cmd = new ArrayList<>();
|
||||
cmd.add("libreoffice");
|
||||
cmd.add("--invisible");
|
||||
cmd.add("--convert-to");
|
||||
cmd.add("pdf");
|
||||
cmd.add("--outdir");
|
||||
cmd.add(outDir);
|
||||
cmd.add(sourcePath);
|
||||
log.info(cmd.toString());
|
||||
// 执行转换命令
|
||||
try {
|
||||
executeLinuxCmd(command);
|
||||
executeLinuxCmd(cmd);
|
||||
} catch (Exception e) {
|
||||
log.error("linuxWordToPdf linux环境word转换为pdf时出现异常:", e);
|
||||
}
|
||||
@ -306,9 +311,9 @@ public class EasyPoiUtil {
|
||||
* @param cmd 命令行
|
||||
* @return
|
||||
*/
|
||||
private static boolean executeLinuxCmd(String cmd) {
|
||||
private static boolean executeLinuxCmd(List<String> cmd) {
|
||||
try {
|
||||
Process process = Runtime.getRuntime().exec(cmd);
|
||||
Process process = Runtime.getRuntime().exec(cmd.toArray(new String[cmd.size()]));
|
||||
process.waitFor();
|
||||
} catch (InterruptedException e) {
|
||||
log.error("executeLinuxCmd 执行Linux命令异常:", e);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user