质量整改新增

This commit is contained in:
pengjie 2024-11-23 10:29:28 +08:00
parent 3f2f00b8c7
commit 30587253b2
15 changed files with 830 additions and 2 deletions

View File

@ -0,0 +1,185 @@
package com.zhgd.xmgl.modules.jz.controller;
import com.zhgd.annotation.OperLog;
import com.zhgd.xmgl.security.util.SecurityUtils;
import com.zhgd.xmgl.util.PageUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.system.query.QueryGenerator;
import com.zhgd.jeecg.common.util.oConvertUtils;
import com.zhgd.xmgl.modules.jz.entity.JzQualityInspectionRecord;
import com.zhgd.xmgl.modules.jz.service.IJzQualityInspectionRecordService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.MapUtils;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import springfox.documentation.annotations.ApiIgnore;
/**
* @Title: Controller
* @Description: 质量检查整改
* @author pengj
* @date 2024-11-21
* @version V1.0
*/
@RestController
@RequestMapping("/xmgl/jzQualityInspectionRecord")
@Slf4j
@Api(tags = "质量检查整改管理")
public class JzQualityInspectionRecordController {
@Autowired
private IJzQualityInspectionRecordService jzQualityInspectionRecordService;
/**
* 分页列表查询
*
* @return
*/
@OperLog(operModul = "质量检查整改管理", operType = "分页查询", operDesc = "分页列表查询质量检查整改信息")
@ApiOperation(value = " 分页列表查询质量检查整改信息", notes = "分页列表查询质量检查整改信息", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
})
@PostMapping(value = "/page")
public Result<IPage<JzQualityInspectionRecord>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
QueryWrapper<JzQualityInspectionRecord> queryWrapper = QueryGenerator.initPageQueryWrapper(JzQualityInspectionRecord.class, map);
Page<JzQualityInspectionRecord> page = PageUtil.getPage(map);
queryWrapper.lambda().orderByDesc(JzQualityInspectionRecord::getInspectTime);
IPage<JzQualityInspectionRecord> pageList = jzQualityInspectionRecordService.pageList(page, queryWrapper);
return Result.success(pageList);
}
/**
* 列表查询
*
* @param jzQualityInspectionRecord
* @return
*/
@OperLog(operModul = "质量检查整改管理", operType = "列表查询", operDesc = "列表查询质量检查整改信息")
@ApiOperation(value = " 列表查询质量检查整改信息", notes = "列表查询质量检查整改信息", httpMethod = "POST")
@PostMapping(value = "/list")
public Result<List<JzQualityInspectionRecord>> queryList(@RequestBody JzQualityInspectionRecord jzQualityInspectionRecord) {
QueryWrapper<JzQualityInspectionRecord> queryWrapper = QueryGenerator.initQueryWrapper(jzQualityInspectionRecord);
List<JzQualityInspectionRecord> list = jzQualityInspectionRecordService.list(queryWrapper);
return Result.success(list);
}
/**
* 添加
*
* @param jzQualityInspectionRecord
* @return
*/
@OperLog(operModul = "质量检查整改管理", operType = "新增", operDesc = "添加质量检查整改信息")
@ApiOperation(value = " 添加质量检查整改信息", notes = "添加质量检查整改信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<Object> add(@RequestBody JzQualityInspectionRecord jzQualityInspectionRecord) {
jzQualityInspectionRecord.setInspectTime(new Date());
jzQualityInspectionRecord.setInspectManId(SecurityUtils.getUser().getUserId());
jzQualityInspectionRecordService.save(jzQualityInspectionRecord);
return Result.success("添加成功!");
}
/**
* 编辑
*
* @param jzQualityInspectionRecord
* @return
*/
@OperLog(operModul = "质量检查整改管理", operType = "修改", operDesc = "编辑质量检查整改信息")
@ApiOperation(value = "编辑质量检查整改信息", notes = "编辑质量检查整改信息", httpMethod = "POST")
@PostMapping(value = "/edit")
public Result<JzQualityInspectionRecord> edit(@RequestBody JzQualityInspectionRecord jzQualityInspectionRecord) {
Result<JzQualityInspectionRecord> result = new Result<JzQualityInspectionRecord>();
JzQualityInspectionRecord jzQualityInspectionRecordEntity = jzQualityInspectionRecordService.getById(jzQualityInspectionRecord.getId());
if (jzQualityInspectionRecordEntity == null) {
result.error500("未找到对应实体");
} else {
boolean ok = jzQualityInspectionRecordService.updateById(jzQualityInspectionRecord);
if (ok) {
result.success("修改成功!");
} else {
result.success("操作失败!");
}
}
return result;
}
/**
* 通过id删除
*
* @return
*/
@OperLog(operModul = "质量检查整改管理", operType = "删除", operDesc = "删除质量检查整改信息")
@ApiOperation(value = "删除质量检查整改信息", notes = "删除质量检查整改信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "质量检查整改ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/delete")
public Result<JzQualityInspectionRecord> delete(@ApiIgnore @RequestBody JzQualityInspectionRecord jzQualityInspectionRecord) {
Result<JzQualityInspectionRecord> result = new Result<JzQualityInspectionRecord>();
JzQualityInspectionRecord jzQualityInspectionRecordEntity = jzQualityInspectionRecordService.getById(jzQualityInspectionRecord.getId());
if (jzQualityInspectionRecordEntity == null) {
result.error500("未找到对应实体");
} else {
boolean ok = jzQualityInspectionRecordService.delInfo(jzQualityInspectionRecord.getId());
if (ok) {
result.success("删除成功!");
} else {
result.success("操作失败!");
}
}
return result;
}
/**
* 通过id查询
*
* @return
*/
@OperLog(operModul = "质量检查整改管理", operType = "查询", operDesc = "通过id查询质量检查整改信息")
@ApiOperation(value = "通过id查询质量检查整改信息", notes = "通过id查询质量检查整改信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "质量检查整改ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/queryById")
public Result<JzQualityInspectionRecord> queryById(@ApiIgnore @RequestBody JzQualityInspectionRecord jzQualityInspectionRecordVo) {
Result<JzQualityInspectionRecord> result = new Result<JzQualityInspectionRecord>();
JzQualityInspectionRecord jzQualityInspectionRecord = jzQualityInspectionRecordService.getById(jzQualityInspectionRecordVo.getId());
if (jzQualityInspectionRecord == null) {
result.error500("未找到对应实体");
} else {
result.setResult(jzQualityInspectionRecord);
result.setSuccess(true);
}
return result;
}
}

View File

@ -0,0 +1,201 @@
package com.zhgd.xmgl.modules.jz.controller;
import com.zhgd.annotation.OperLog;
import com.zhgd.xmgl.util.PageUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.system.query.QueryGenerator;
import com.zhgd.jeecg.common.util.oConvertUtils;
import com.zhgd.xmgl.modules.jz.entity.JzQualityRectifyRecord;
import com.zhgd.xmgl.modules.jz.service.IJzQualityRectifyRecordService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.MapUtils;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import springfox.documentation.annotations.ApiIgnore;
/**
* @Title: Controller
* @Description: 质量检查整改记录
* @author pengj
* @date 2024-11-21
* @version V1.0
*/
@RestController
@RequestMapping("/xmgl/jzQualityRectifyRecord")
@Slf4j
@Api(tags = "质量检查整改记录管理")
public class JzQualityRectifyRecordController {
@Autowired
private IJzQualityRectifyRecordService jzQualityRectifyRecordService;
/**
* 分页列表查询
*
* @return
*/
@OperLog(operModul = "质量检查整改记录管理", operType = "分页查询", operDesc = "分页列表查询质量检查整改记录信息")
@ApiOperation(value = " 分页列表查询质量检查整改记录信息", notes = "分页列表查询质量检查整改记录信息", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
})
@PostMapping(value = "/page")
public Result<IPage<JzQualityRectifyRecord>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
QueryWrapper<JzQualityRectifyRecord> queryWrapper = QueryGenerator.initPageQueryWrapper(JzQualityRectifyRecord.class, map);
Page<JzQualityRectifyRecord> page = PageUtil.getPage(map);
IPage<JzQualityRectifyRecord> pageList = jzQualityRectifyRecordService.page(page, queryWrapper);
return Result.success(pageList);
}
/**
* 列表查询
*
* @param jzQualityRectifyRecord
* @return
*/
@OperLog(operModul = "质量检查整改记录管理", operType = "列表查询", operDesc = "列表查询质量检查整改记录信息")
@ApiOperation(value = " 列表查询质量检查整改记录信息", notes = "列表查询质量检查整改记录信息", httpMethod = "POST")
@PostMapping(value = "/list")
public Result<List<JzQualityRectifyRecord>> queryList(@RequestBody JzQualityRectifyRecord jzQualityRectifyRecord) {
QueryWrapper<JzQualityRectifyRecord> queryWrapper = QueryGenerator.initQueryWrapper(jzQualityRectifyRecord);
List<JzQualityRectifyRecord> list = jzQualityRectifyRecordService.list(queryWrapper);
return Result.success(list);
}
/**
* 添加
*
* @param jzQualityRectifyRecord
* @return
*/
@OperLog(operModul = "质量检查整改记录管理", operType = "新增", operDesc = "添加质量检查整改记录信息")
@ApiOperation(value = " 添加质量检查整改记录信息", notes = "添加质量检查整改记录信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<Object> add(@RequestBody JzQualityRectifyRecord jzQualityRectifyRecord) {
jzQualityRectifyRecordService.saveInfo(jzQualityRectifyRecord);
return Result.success("添加成功!");
}
/**
* 编辑
*
* @param jzQualityRectifyRecord
* @return
*/
@OperLog(operModul = "质量检查整改记录管理", operType = "修改", operDesc = "编辑质量检查整改记录信息")
@ApiOperation(value = "编辑质量检查整改记录信息", notes = "编辑质量检查整改记录信息", httpMethod = "POST")
@PostMapping(value = "/edit")
public Result<JzQualityRectifyRecord> edit(@RequestBody JzQualityRectifyRecord jzQualityRectifyRecord) {
Result<JzQualityRectifyRecord> result = new Result<JzQualityRectifyRecord>();
JzQualityRectifyRecord jzQualityRectifyRecordEntity = jzQualityRectifyRecordService.getById(jzQualityRectifyRecord.getId());
if (jzQualityRectifyRecordEntity == null) {
result.error500("未找到对应实体");
} else {
boolean ok = jzQualityRectifyRecordService.updateInfo(jzQualityRectifyRecord);
if (ok) {
result.success("修改成功!");
} else {
result.success("操作失败!");
}
}
return result;
}
/**
* 通过id删除
*
* @return
*/
@OperLog(operModul = "质量检查整改记录管理", operType = "删除", operDesc = "删除质量检查整改记录信息")
@ApiOperation(value = "删除质量检查整改记录信息", notes = "删除质量检查整改记录信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "质量检查整改记录ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/delete")
public Result<JzQualityRectifyRecord> delete(@ApiIgnore @RequestBody JzQualityRectifyRecord jzQualityRectifyRecord) {
Result<JzQualityRectifyRecord> result = new Result<JzQualityRectifyRecord>();
JzQualityRectifyRecord jzQualityRectifyRecordEntity = jzQualityRectifyRecordService.getById(jzQualityRectifyRecord.getId());
if (jzQualityRectifyRecordEntity == null) {
result.error500("未找到对应实体");
} else {
boolean ok = jzQualityRectifyRecordService.removeById(jzQualityRectifyRecord.getId());
if (ok) {
result.success("删除成功!");
} else {
result.success("操作失败!");
}
}
return result;
}
/**
* 批量删除
*
* @return
*/
@OperLog(operModul = "质量检查整改记录管理", operType = "批量删除", operDesc = "批量删除质量检查整改记录信息")
@ApiOperation(value = "批量删除质量检查整改记录信息", notes = "批量删除质量检查整改记录信息", httpMethod = "POST")
@ApiImplicitParam(name = "ids", value = "质量检查整改记录ID字符串", paramType = "body", required = true, dataType = "String")
@PostMapping(value = "/deleteBatch")
public Result<JzQualityRectifyRecord> deleteBatch(@ApiIgnore @RequestBody Map<String, Object> map) {
Result<JzQualityRectifyRecord> result = new Result<JzQualityRectifyRecord>();
String ids = MapUtils.getString(map, "ids");
if (ids == null || "".equals(ids.trim())) {
result.error500("参数不识别!");
} else {
this.jzQualityRectifyRecordService.removeByIds(Arrays.asList(ids.split(",")));
result.success("删除成功!");
}
return result;
}
/**
* 通过id查询
*
* @return
*/
@OperLog(operModul = "质量检查整改记录管理", operType = "查询", operDesc = "通过id查询质量检查整改记录信息")
@ApiOperation(value = "通过id查询质量检查整改记录信息", notes = "通过id查询质量检查整改记录信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "质量检查整改记录ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/queryById")
public Result<JzQualityRectifyRecord> queryById(@ApiIgnore @RequestBody JzQualityRectifyRecord jzQualityRectifyRecordVo) {
Result<JzQualityRectifyRecord> result = new Result<JzQualityRectifyRecord>();
JzQualityRectifyRecord jzQualityRectifyRecord = jzQualityRectifyRecordService.getById(jzQualityRectifyRecordVo.getId());
if (jzQualityRectifyRecord == null) {
result.error500("未找到对应实体");
} else {
result.setResult(jzQualityRectifyRecord);
result.setSuccess(true);
}
return result;
}
}

View File

@ -0,0 +1,163 @@
package com.zhgd.xmgl.modules.jz.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;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* @Description: 质量检查整改
* @author pengj
* @date 2024-11-21
* @version V1.0
*/
@Data
@TableName("jz_quality_inspection_record")
@ApiModel(value = "JzQualityInspectionRecord实体类", description = "JzQualityInspectionRecord")
public class JzQualityInspectionRecord implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Long id;
/**
* 检查部位ID
*/
@Excel(name = "检查部位ID", width = 15)
@ApiModelProperty(value = "检查部位ID")
private Long regionId;
/**
* 检查部位名称
*/
@Excel(name = "检查部位名称", width = 15)
@ApiModelProperty(value = "检查部位名称")
private String regionName;
/**
* 整改要求
*/
@Excel(name = "整改要求", width = 15)
@ApiModelProperty(value = "整改要求")
private String remark;
/**
* 补充说明
*/
@Excel(name = "补充说明", width = 15)
@ApiModelProperty(value = "补充说明")
private String dangerDesc;
/**
* 问题分类描述
*/
@Excel(name = "问题分类描述", width = 15)
@ApiModelProperty(value = "问题分类描述")
private String dangerItemContent;
/**
* 问题子项ID
*/
@Excel(name = "问题子项ID", width = 15)
@ApiModelProperty(value = "问题子项ID")
private Long dangerItemId;
/**
* 问题所属大项ID
*/
@Excel(name = "问题所属大项ID", width = 15)
@ApiModelProperty(value = "问题所属大项ID")
private Long dangerTypeId;
/**
* 问题等级1一级2二级3三级4四级
*/
@Excel(name = "问题等级1一级2二级3三级4四级", width = 15)
@ApiModelProperty(value = "问题等级1一级2二级3三级4四级")
private Integer level;
/**
* 紧急程度1一般2严重3紧要
*/
@Excel(name = "紧急程度1一般2严重3紧要", width = 15)
@ApiModelProperty(value = "紧急程度1一般2严重3紧要")
private String urgentLevel;
/**
* 状态0待整改1待审核2已打回3合格4已撤回
*/
@Excel(name = "状态0待整改1待审核2已打回3合格4已撤回", width = 15)
@ApiModelProperty(value = "状态0待整改1待审核2已打回3合格4已撤回")
private Integer status;
/**
* 整改人
*/
@Excel(name = "整改人", width = 15)
@ApiModelProperty(value = "整改人")
private Long changeId;
/**
* 整改时限
*/
@Excel(name = "整改时限", width = 15)
@ApiModelProperty(value = "整改时限")
private String changeLimitTime;
/**
* 检查人id
*/
@Excel(name = "检查人id", width = 15)
@ApiModelProperty(value = "检查人id")
private Long inspectManId;
/**
* 检查时间
*/
@Excel(name = "检查时间", width = 15)
@ApiModelProperty(value = "检查时间")
private Date inspectTime;
/**
* 图片
*/
@Excel(name = "图片", width = 15)
@ApiModelProperty(value = "图片")
private String imageUrl;
/**
* 附件路径
*/
@Excel(name = "附件路径", width = 15)
@ApiModelProperty(value = "附件路径")
private String fileUrl;
/**
* 整改完成时间
*/
@Excel(name = "整改完成时间", width = 15)
@ApiModelProperty(value = "整改完成时间")
private String completeTime;
/**
* 项目唯一标识
*/
@Excel(name = "项目唯一标识", width = 15)
@ApiModelProperty(value = "项目唯一标识")
private String projectSn;
/**
* 问题补充描述
*/
@Excel(name = "问题补充描述", width = 15)
@ApiModelProperty(value = "问题补充描述")
private String addedDescription;
/**
* 检查人姓名
*/
@TableField(exist = false)
@ApiModelProperty(value = "检查人姓名")
private String inspectManName;
/**
* 整改人姓名
*/
@TableField(exist = false)
@ApiModelProperty(value = "整改人姓名")
private String changeName;
}

View File

@ -0,0 +1,83 @@
package com.zhgd.xmgl.modules.jz.entity;
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 lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* @Description: 质量检查整改记录
* @author pengj
* @date 2024-11-21
* @version V1.0
*/
@Data
@TableName("jz_quality_rectify_record")
@ApiModel(value = "JzQualityRectifyRecord实体类", description = "JzQualityRectifyRecord")
public class JzQualityRectifyRecord implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Long id;
/**
* 质量检查记录ID
*/
@Excel(name = "质量检查记录ID", width = 15)
@ApiModelProperty(value = "质量检查记录ID")
private Long qualityId;
/**
* 结果1待核验 2核验不合格3核验合格
*/
@Excel(name = "结果1待核验 2核验不合格3核验合格", width = 15)
@ApiModelProperty(value = "结果1待核验 2核验不合格3核验合格")
private Integer status;
/**
* 整改时间
*/
@Excel(name = "整改时间", width = 15)
@ApiModelProperty(value = "整改时间")
private String rectifyTime;
/**
* 附件
*/
@Excel(name = "附件", width = 15)
@ApiModelProperty(value = "附件")
private String fileUrl;
/**
* 补充说明
*/
@Excel(name = "补充说明", width = 15)
@ApiModelProperty(value = "补充说明")
private String additionalRemarks;
/**
* 创建时间
*/
@Excel(name = "创建时间", width = 15)
@ApiModelProperty(value = "创建时间")
private String createTime;
/**
* 创建人
*/
@Excel(name = "创建人", width = 15)
@ApiModelProperty(value = "创建人")
private Long createUser;
/**
* 审核回复
*/
@Excel(name = "审核回复", width = 15)
@ApiModelProperty(value = "审核回复")
private String suggest;
}

View File

@ -0,0 +1,24 @@
package com.zhgd.xmgl.modules.jz.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.xmgl.modules.jz.entity.JzQualityRectifyRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.zhgd.xmgl.modules.jz.entity.JzQualityInspectionRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 质量检查整改
* @author pengj
* @date 2024-11-21
* @version V1.0
*/
@Mapper
public interface JzQualityInspectionRecordMapper extends BaseMapper<JzQualityInspectionRecord> {
Page<JzQualityInspectionRecord> pageList(Page page, @Param(Constants.WRAPPER) Wrapper<JzQualityInspectionRecord> wrapper);
}

View File

@ -0,0 +1,19 @@
package com.zhgd.xmgl.modules.jz.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.zhgd.xmgl.modules.jz.entity.JzQualityRectifyRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 质量检查整改记录
* @author pengj
* @date 2024-11-21
* @version V1.0
*/
@Mapper
public interface JzQualityRectifyRecordMapper extends BaseMapper<JzQualityRectifyRecord> {
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zhgd.xmgl.modules.jz.mapper.JzQualityInspectionRecordMapper">
<select id="pageList" resultType="com.zhgd.xmgl.modules.jz.entity.JzQualityInspectionRecord">
SELECT j.*, u1.real_name changeName, u2.real_name inspectManName FROM jz_quality_inspection_record j
LEFT JOIN system_user u1 on j.change_id = u1.user_id
LEFT JOIN system_user u2 on j.inspect_man_id = u2.user_id
${ew.customSqlSegment}
</select>
</mapper>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zhgd.xmgl.modules.jz.mapper.JzQualityRectifyRecordMapper">
</mapper>

View File

@ -0,0 +1,20 @@
package com.zhgd.xmgl.modules.jz.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.xmgl.modules.jz.entity.JzQualityInspectionRecord;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhgd.xmgl.modules.jz.entity.JzQualityRectifyRecord;
/**
* @Description: 质量检查整改
* @author pengj
* @date 2024-11-21
* @version V1.0
*/
public interface IJzQualityInspectionRecordService extends IService<JzQualityInspectionRecord> {
Page<JzQualityInspectionRecord> pageList(Page page, Wrapper<JzQualityInspectionRecord> wrapper);
boolean delInfo(Long id);
}

View File

@ -0,0 +1,17 @@
package com.zhgd.xmgl.modules.jz.service;
import com.zhgd.xmgl.modules.jz.entity.JzQualityRectifyRecord;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 质量检查整改记录
* @author pengj
* @date 2024-11-21
* @version V1.0
*/
public interface IJzQualityRectifyRecordService extends IService<JzQualityRectifyRecord> {
boolean saveInfo(JzQualityRectifyRecord jzQualityRectifyRecord);
boolean updateInfo(JzQualityRectifyRecord jzQualityRectifyRecord);
}

View File

@ -53,6 +53,7 @@ public class JzProjectServiceImpl extends ServiceImpl<JzProjectMapper, JzProject
public boolean saveInfo(JzProject jzProject) { public boolean saveInfo(JzProject jzProject) {
String uuid = UUID.randomUUID().toString().replace("-", "").toUpperCase(); String uuid = UUID.randomUUID().toString().replace("-", "").toUpperCase();
jzProject.setProjectSn(uuid); jzProject.setProjectSn(uuid);
jzProject.setStatus(1);
return this.save(jzProject); return this.save(jzProject);
} }
} }

View File

@ -0,0 +1,41 @@
package com.zhgd.xmgl.modules.jz.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.xmgl.modules.jz.entity.JzQualityInspectionRecord;
import com.zhgd.xmgl.modules.jz.entity.JzQualityRectifyRecord;
import com.zhgd.xmgl.modules.jz.mapper.JzQualityInspectionRecordMapper;
import com.zhgd.xmgl.modules.jz.service.IJzQualityInspectionRecordService;
import com.zhgd.xmgl.modules.jz.service.IJzQualityRectifyRecordService;
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;
/**
* @Description: 质量检查整改
* @author pengj
* @date 2024-11-21
* @version V1.0
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class JzQualityInspectionRecordServiceImpl extends ServiceImpl<JzQualityInspectionRecordMapper, JzQualityInspectionRecord> implements IJzQualityInspectionRecordService {
@Autowired
private IJzQualityRectifyRecordService jzQualityRectifyRecordService;
@Override
public Page<JzQualityInspectionRecord> pageList(Page page, Wrapper<JzQualityInspectionRecord> wrapper) {
return baseMapper.pageList(page, wrapper);
}
@Override
public boolean delInfo(Long id) {
jzQualityRectifyRecordService.remove(Wrappers.<JzQualityRectifyRecord>lambdaQuery()
.eq(JzQualityRectifyRecord::getQualityId, id));
return this.removeById(id);
}
}

View File

@ -0,0 +1,56 @@
package com.zhgd.xmgl.modules.jz.service.impl;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zhgd.xmgl.modules.jz.entity.JzQualityInspectionRecord;
import com.zhgd.xmgl.modules.jz.entity.JzQualityRectifyRecord;
import com.zhgd.xmgl.modules.jz.mapper.JzQualityRectifyRecordMapper;
import com.zhgd.xmgl.modules.jz.service.IJzQualityInspectionRecordService;
import com.zhgd.xmgl.modules.jz.service.IJzQualityRectifyRecordService;
import com.zhgd.xmgl.security.util.SecurityUtils;
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;
import java.util.Date;
/**
* @Description: 质量检查整改记录
* @author pengj
* @date 2024-11-21
* @version V1.0
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class JzQualityRectifyRecordServiceImpl extends ServiceImpl<JzQualityRectifyRecordMapper, JzQualityRectifyRecord> implements IJzQualityRectifyRecordService {
@Autowired
private IJzQualityInspectionRecordService jzQualityInspectionRecordService;
@Override
public boolean saveInfo(JzQualityRectifyRecord jzQualityRectifyRecord) {
LambdaUpdateWrapper<JzQualityInspectionRecord> wrapper = Wrappers.<JzQualityInspectionRecord>lambdaUpdate();
wrapper.set(JzQualityInspectionRecord::getStatus, 1);
wrapper.eq(JzQualityInspectionRecord::getId, jzQualityRectifyRecord.getQualityId());
jzQualityInspectionRecordService.update(wrapper);
jzQualityRectifyRecord.setRectifyTime(DateUtil.formatDateTime(new Date()));
jzQualityRectifyRecord.setCreateTime(DateUtil.formatDateTime(new Date()));
jzQualityRectifyRecord.setCreateUser(SecurityUtils.getUser().getUserId());
return this.save(jzQualityRectifyRecord);
}
@Override
public boolean updateInfo(JzQualityRectifyRecord jzQualityRectifyRecord) {
LambdaUpdateWrapper<JzQualityInspectionRecord> wrapper = Wrappers.<JzQualityInspectionRecord>lambdaUpdate();
wrapper.set(JzQualityInspectionRecord::getStatus, jzQualityRectifyRecord.getStatus());
if (jzQualityRectifyRecord.getStatus() == 3) {
wrapper.set(JzQualityInspectionRecord::getCompleteTime, jzQualityRectifyRecord.getRectifyTime());
}
wrapper.eq(JzQualityInspectionRecord::getId, jzQualityRectifyRecord.getQualityId());
jzQualityInspectionRecordService.update(wrapper);
return this.updateById(jzQualityRectifyRecord);
}
}

View File

@ -123,7 +123,9 @@ public class ProgressPanoramaNodePlanController {
QueryWrapper<ProgressPanoramaNodePlan> queryWrapper = QueryGenerator.initQueryWrapper(progressPanoramaNodePlan); QueryWrapper<ProgressPanoramaNodePlan> queryWrapper = QueryGenerator.initQueryWrapper(progressPanoramaNodePlan);
if (progressPanoramaNodePlan.getNature() != null) { if (progressPanoramaNodePlan.getNature() != null) {
List<Project> projectList = projectService.list(Wrappers.<Project>lambdaQuery().eq(Project::getNature, progressPanoramaNodePlan.getNature())); List<Project> projectList = projectService.list(Wrappers.<Project>lambdaQuery().eq(Project::getNature, progressPanoramaNodePlan.getNature()));
queryWrapper.lambda().in(ProgressPanoramaNodePlan::getProjectSn, projectList.stream().map(p -> p.getProjectSn()).collect(Collectors.toList())); List<String> stringList = projectList.stream().map(p -> p.getProjectSn()).collect(Collectors.toList());
stringList.add("0");
queryWrapper.lambda().in(ProgressPanoramaNodePlan::getProjectSn, stringList);
} }
return Result.success(progressPanoramaNodePlanService.list(queryWrapper)); return Result.success(progressPanoramaNodePlanService.list(queryWrapper));
} }

View File

@ -4,7 +4,7 @@ spring.datasource.db1.jdbc-url=jdbc:mysql://192.168.34.155:3306/wisdomsite_jiuzh
spring.datasource.db1.driver-class-name=com.mysql.jdbc.Driver spring.datasource.db1.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.db1.username=ENC(XR4C/hvTYCUqudS49Wh/jA==) spring.datasource.db1.username=ENC(XR4C/hvTYCUqudS49Wh/jA==)
spring.datasource.db1.password=ENC(LsKaVL2ycDu+uUNoPndYLA==) spring.datasource.db1.password=ENC(LsKaVL2ycDu+uUNoPndYLA==)
server.port=19112 server.port=19111
#server.port=30246 #server.port=30246
basePath=C:/jxj/prod/backEnd/itbgpImage/ basePath=C:/jxj/prod/backEnd/itbgpImage/
server.tomcat.basedir=C:/jxj/prod/backEnd/tempImage/ server.tomcat.basedir=C:/jxj/prod/backEnd/tempImage/