diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/AnnexFileController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/AnnexFileController.java new file mode 100644 index 0000000..3195b4a --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/AnnexFileController.java @@ -0,0 +1,192 @@ +package com.zhgd.xmgl.modules.basicdata.controller.admin; + +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.zhgd.annotation.OperLog; +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.jeecg.common.util.PageUtil; +import com.zhgd.xmgl.modules.basicdata.entity.AnnexFile; +import com.zhgd.xmgl.modules.basicdata.service.IAnnexFileService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.MapUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + + +/** + * @Title: Controller + * @Description: 附件 + * @author: pengj + * @date: 2023-12-04 + * @version: V1.0 + */ +@RestController +@RequestMapping("/xmgl/annexFile") +@Slf4j +@Api(tags = "附件管理") +public class AnnexFileController { + @Autowired + private IAnnexFileService annexFileService; + + /** + * 分页列表查询 + * + * @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"), + @ApiImplicitParam(name = "relevanceId", value = "关联id", paramType = "body", required = true), + @ApiImplicitParam(name = "fileType", value = "类型(1:工程附件;2:通知公告附件;3:政策法规附件;4:工程附件(单独))", paramType = "body", required = true) + }) + @PostMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestBody Map map) { + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(AnnexFile.class, map); + Page page = PageUtil.getPage(map); + IPage pageList = annexFileService.page(page, queryWrapper); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param annexFile + * @return + */ + @OperLog(operModul = "附件管理", operType = "列表查询", operDesc = "列表查询附件信息") + @ApiOperation(value = " 列表查询附件信息", notes = "列表查询附件信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "relevanceId", value = "关联id", paramType = "body", required = true), + @ApiImplicitParam(name = "fileType", value = "类型(1:工程附件;2:通知公告附件;3:政策法规附件;4:工程附件(单独))", paramType = "body", required = true) + }) + @PostMapping(value = "/list") + public Result> queryList(@ApiIgnore @RequestBody AnnexFile annexFile) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annexFile); + List list = annexFileService.list(queryWrapper); + return Result.success(list); + } + + + /** + * 添加 + * + * @param annexFile + * @return + */ + @OperLog(operModul = "附件管理", operType = "新增", operDesc = "添加附件信息") + @ApiOperation(value = " 添加附件信息", notes = "添加附件信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody AnnexFile annexFile) { + annexFileService.save(annexFile); + return Result.success("添加成功!"); + } + + /** + * 编辑 + * + * @param annexFile + * @return + */ + @OperLog(operModul = "附件管理", operType = "修改", operDesc = "编辑附件信息") + @ApiOperation(value = "编辑附件信息", notes = "编辑附件信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody AnnexFile annexFile) { + Result result = new Result(); + AnnexFile annexFileEntity = annexFileService.getById(annexFile.getFileId()); + if (annexFileEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = annexFileService.updateById(annexFile); + 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 delete(@RequestBody AnnexFile annexFile) { + Result result = new Result(); + AnnexFile annexFileEntity = annexFileService.getById(annexFile.getFileId()); + if (annexFileEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = annexFileService.removeById(annexFile.getFileId()); + 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 deleteBatch(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + String ids = MapUtils.getString(map, "ids"); + if (ids == null || "".equals(ids.trim())) { + result.error500("参数不识别!"); + } else { + this.annexFileService.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 queryById(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + AnnexFile annexFile = annexFileService.getById(MapUtils.getString(map, "id")); + if (annexFile == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(annexFile); + result.setSuccess(true); + } + return result; + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntEnterpriseController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntEnterpriseController.java index ee90a1f..e72483f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntEnterpriseController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntEnterpriseController.java @@ -9,13 +9,11 @@ import com.zhgd.xmgl.modules.basicdata.service.IEnterpriseService; import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService; import com.zhgd.xmgl.modules.basicdata.vo.EnterpriseVo; import com.zhgd.xmgl.util.CommonUtil; -import com.zhgd.xmgl.valid.AddGroup; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -50,7 +48,7 @@ public class EntEnterpriseController { @OperLog(operModul = "企业管理", operType = "新增", operDesc = "企业注册申请") @ApiOperation(value = " 企业注册申请", notes = "企业注册申请", httpMethod = "POST") @PostMapping(value = "/add") - public Result add(@RequestBody @Validated(AddGroup.class) EnterpriseVo enterpriseVo) { + public Result add(@RequestBody EnterpriseVo enterpriseVo) { Result result = new Result(); if (!CommonUtil.checkStrongPwd(enterpriseVo.getPassword())) { result.error500("密码必须包含数字、大小写字母、特殊符号且大于8位"); diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovEngineeringAnnexController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovEngineeringAnnexController.java new file mode 100644 index 0000000..8236628 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovEngineeringAnnexController.java @@ -0,0 +1,216 @@ +package com.zhgd.xmgl.modules.basicdata.controller.government; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhgd.annotation.OperLog; +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.jeecg.common.util.PageUtil; +import com.zhgd.xmgl.modules.basicdata.entity.AnnexFile; +import com.zhgd.xmgl.modules.basicdata.entity.EngineeringAnnex; +import com.zhgd.xmgl.modules.basicdata.service.IAnnexFileService; +import com.zhgd.xmgl.modules.basicdata.service.IEngineeringAnnexService; +import com.zhgd.xmgl.util.ParamEnum; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.MapUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + + +/** + * @Title: Controller + * @Description: 工程附件 + * @author: pengj + * @date: 2023-12-02 + * @version: V1.0 + */ +@RestController +@RequestMapping("/gov/engineeringAnnex") +@Slf4j +@Api(tags = "工程附件管理") +public class GovEngineeringAnnexController { + + @Autowired + private IEngineeringAnnexService engineeringAnnexService; + + @Autowired + private IAnnexFileService annexFileService; + + /** + * 分页列表查询 + * + * @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> queryPageList(@ApiIgnore @RequestBody Map map) { + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(EngineeringAnnex.class, map); + Page page = PageUtil.getPage(map); + IPage pageList = engineeringAnnexService.page(page, queryWrapper); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param engineeringAnnex + * @return + */ + @OperLog(operModul = "工程附件管理", operType = "列表查询", operDesc = "列表查询工程附件信息") + @ApiOperation(value = " 列表查询工程附件信息", notes = "列表查询工程附件信息", httpMethod = "POST") + @PostMapping(value = "/list") + public Result> queryList(@RequestBody EngineeringAnnex engineeringAnnex) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(engineeringAnnex); + List list = engineeringAnnexService.list(queryWrapper); + return Result.success(list); + } + + + /** + * 添加 + * + * @param engineeringAnnex + * @return + */ + @OperLog(operModul = "工程附件管理", operType = "新增", operDesc = "添加工程附件信息") + @ApiOperation(value = " 添加工程附件信息", notes = "添加工程附件信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody EngineeringAnnex engineeringAnnex) { + engineeringAnnexService.save(engineeringAnnex); + return Result.success("添加成功!"); + } + + /** + * 编辑 + * + * @param engineeringAnnex + * @return + */ + @OperLog(operModul = "工程附件管理", operType = "修改", operDesc = "编辑工程附件信息") + @ApiOperation(value = "编辑工程附件信息", notes = "编辑工程附件信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody EngineeringAnnex engineeringAnnex) { + Result result = new Result(); + EngineeringAnnex engineeringAnnexEntity = engineeringAnnexService.getById(engineeringAnnex.getId()); + if (engineeringAnnexEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = engineeringAnnexService.updateById(engineeringAnnex); + 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 delete(@RequestBody EngineeringAnnex engineeringAnnex) { + Result result = new Result(); + EngineeringAnnex engineeringAnnexEntity = engineeringAnnexService.getById(engineeringAnnex.getId()); + if (engineeringAnnexEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = engineeringAnnexService.removeById(engineeringAnnex.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 deleteBatch(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + String ids = MapUtils.getString(map, "ids"); + if (ids == null || "".equals(ids.trim())) { + result.error500("参数不识别!"); + } else { + this.engineeringAnnexService.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 queryById(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + EngineeringAnnex engineeringAnnex = engineeringAnnexService.getById(MapUtils.getString(map, "id")); + if (engineeringAnnex == null) { + result.error500("未找到对应实体"); + } else { + engineeringAnnex.setAnnexFileList(annexFileService.list(Wrappers.lambdaQuery() + .eq(AnnexFile::getRelevanceId, engineeringAnnex.getEngineeringSn()) + .eq(AnnexFile::getFileType, ParamEnum.AnnexFileType.ENGINEERING_ANNEX.getValue()))); + result.setResult(engineeringAnnex); + result.setSuccess(true); + } + return result; + } + + /** + * 文件列表更新 + * @return + */ + @OperLog(operModul = "工程附件管理", operType = "修改", operDesc = "文件列表更新") + @ApiOperation(value = " 文件列表更新", notes = "文件列表更新", httpMethod = "POST") + @PostMapping(value = "/batchUpdateFile") + public Result batchUpdateFile(@RequestBody EngineeringAnnex engineeringAnnex) { + annexFileService.remove(Wrappers.lambdaQuery() + .eq(AnnexFile::getRelevanceId, engineeringAnnex.getEngineeringSn()) + .eq(AnnexFile::getFileType, ParamEnum.AnnexFileType.ENGINEERING_ANNEX.getValue())); + for (AnnexFile annexFile : engineeringAnnex.getAnnexFileList()) { + annexFile.setRelevanceId(engineeringAnnex.getEngineeringSn()); + annexFile.setFileType(ParamEnum.AnnexFileType.ENGINEERING_ANNEX.getValue()); + } + annexFileService.saveBatch(engineeringAnnex.getAnnexFileList()); + return Result.success(true); + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovEnterpriseController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovEnterpriseController.java index 16a470c..2b17fd3 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovEnterpriseController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovEnterpriseController.java @@ -2,12 +2,15 @@ package com.zhgd.xmgl.modules.basicdata.controller.government; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.zhgd.annotation.OperLog; import com.zhgd.jeecg.common.api.vo.Result; import com.zhgd.jeecg.common.system.query.QueryGenerator; import com.zhgd.xmgl.modules.basicdata.entity.Enterprise; import com.zhgd.xmgl.modules.basicdata.entity.EnterpriseMain; +import com.zhgd.xmgl.modules.basicdata.entity.SystemUser; import com.zhgd.xmgl.modules.basicdata.service.IEnterpriseService; +import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService; import com.zhgd.xmgl.modules.basicdata.vo.EnterpriseVo; import com.zhgd.xmgl.security.SecurityUser; import com.zhgd.xmgl.security.SecurityUtil; @@ -43,6 +46,9 @@ public class GovEnterpriseController { @Autowired private IEnterpriseService enterpriseService; + @Autowired + private ISystemUserService systemUserService; + /** * 政务分页列表查询企业 * @return @@ -103,7 +109,7 @@ public class GovEnterpriseController { result.error500("未找到对应实体"); } else { Integer suggest = MapUtils.getInteger(map, "suggest"); - boolean ok = enterpriseService.updateInfo(enterpriseEntity, suggest); + boolean ok = enterpriseService.examine(enterpriseEntity, suggest); if (ok) { result.success("修改成功!"); } @@ -111,6 +117,32 @@ public class GovEnterpriseController { return result; } + @OperLog(operModul = "企业管理", operType = "修改", operDesc = "企业修改") + @ApiOperation(value = "企业修改", notes = "企业修改", httpMethod = "POST") + @PostMapping(value = "/update") + public Result update(@ApiIgnore @RequestBody EnterpriseVo enterpriseVo) { + Result result = new Result(); + Enterprise enterprise = enterpriseService.getById(enterpriseVo.getEnterpriseId()); + if (enterprise == null) { + result.error500("未找到对应实体"); + } else { + // 检验项目账号是否已存在 + SystemUser systemUser = systemUserService.getOne(Wrappers.lambdaQuery().eq(SystemUser::getAccount, enterpriseVo.getAccount()) + .ne(SystemUser::getSn, enterprise.getEnterpriseSn())); + if (systemUser != null) { + result.error500("该用户账号已被使用"); + return result; + } + enterpriseVo.setEnterpriseSn(enterprise.getEnterpriseSn()); + boolean ok = enterpriseService.updateById(enterpriseVo); + if (ok) { + result.success("修改成功!"); + } + } + return result; + } + + /** * 通过id查询 diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/EngineeringAnnex.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/EngineeringAnnex.java new file mode 100644 index 0000000..dd10300 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/EngineeringAnnex.java @@ -0,0 +1,52 @@ +package com.zhgd.xmgl.modules.basicdata.entity; + +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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.jeecgframework.poi.excel.annotation.Excel; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description: 工程附件 + * @author: pengj + * @date: 2023-12-02 + * @version: V1.0 + */ +@Data +@TableName("engineering_annex") +@ApiModel(value = "EngineeringAnnex实体类", description = "EngineeringAnnex") +public class EngineeringAnnex implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 验收申请附件信息ID + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "验收申请附件信息ID") + private Long id; + /** + * 附件名称 + */ + @Excel(name = "附件名称", width = 15) + @ApiModelProperty(value = "附件名称") + private String annexName; + /** + * 工程sn + */ + @Excel(name = "工程sn", width = 15) + @ApiModelProperty(value = "工程sn") + private String engineeringSn; + + /** + * 附件列表 + */ + @TableField(exist = false) + @ApiModelProperty(value = "附件列表") + private List annexFileList; +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/EngineeringAnnexMapper.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/EngineeringAnnexMapper.java new file mode 100644 index 0000000..4a5061a --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/EngineeringAnnexMapper.java @@ -0,0 +1,16 @@ +package com.zhgd.xmgl.modules.basicdata.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zhgd.xmgl.modules.basicdata.entity.EngineeringAnnex; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description: 工程附件 + * @author: pengj + * @date: 2023-12-02 + * @version: V1.0 + */ +@Mapper +public interface EngineeringAnnexMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/EngineeringAnnexMapper.xml b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/EngineeringAnnexMapper.xml new file mode 100644 index 0000000..5beb689 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/EngineeringAnnexMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/IEngineeringAnnexService.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/IEngineeringAnnexService.java new file mode 100644 index 0000000..93c15e6 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/IEngineeringAnnexService.java @@ -0,0 +1,14 @@ +package com.zhgd.xmgl.modules.basicdata.service; + +import com.zhgd.xmgl.modules.basicdata.entity.EngineeringAnnex; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 工程附件 + * @author: pengj + * @date: 2023-12-02 + * @version: V1.0 + */ +public interface IEngineeringAnnexService extends IService { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/IEnterpriseService.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/IEnterpriseService.java index b15287a..5ff998e 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/IEnterpriseService.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/IEnterpriseService.java @@ -23,7 +23,7 @@ public interface IEnterpriseService extends IService { boolean saveInfo(EnterpriseVo enterpriseVo); - boolean updateInfo(Enterprise enterprise, Integer suggest); + boolean examine(Enterprise enterprise, Integer suggest); EnterpriseVo getDetailById(Long enterpriseId); diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/EngineeringAnnexServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/EngineeringAnnexServiceImpl.java new file mode 100644 index 0000000..ec0b91f --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/EngineeringAnnexServiceImpl.java @@ -0,0 +1,19 @@ +package com.zhgd.xmgl.modules.basicdata.service.impl; + +import com.zhgd.xmgl.modules.basicdata.entity.EngineeringAnnex; +import com.zhgd.xmgl.modules.basicdata.mapper.EngineeringAnnexMapper; +import com.zhgd.xmgl.modules.basicdata.service.IEngineeringAnnexService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 工程附件 + * @author: pengj + * @date: 2023-12-02 + * @version: V1.0 + */ +@Service +public class EngineeringAnnexServiceImpl extends ServiceImpl implements IEngineeringAnnexService { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/EngineeringSingleServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/EngineeringSingleServiceImpl.java index b619707..1bae967 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/EngineeringSingleServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/EngineeringSingleServiceImpl.java @@ -83,7 +83,7 @@ public class EngineeringSingleServiceImpl extends ServiceImpllambdaQuery() .eq(EngineeringSingle::getEngineeringSn, engineeringSn)); annexFileService.remove(Wrappers.lambdaQuery() - .eq(AnnexFile::getRelevanceId, engineeringSn)); + .eq(AnnexFile::getRelevanceId, engineeringSn).eq(AnnexFile::getFileType, ParamEnum.AnnexFileType.ENGINEERING)); List engineeringMains = engineeringMainService.list(Wrappers.lambdaQuery() .eq(EngineeringMain::getEngineeringSn, engineeringSn)); List mainIds = engineeringMains.stream().map(m -> m.getId()).collect(Collectors.toList()); diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/EnterpriseServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/EnterpriseServiceImpl.java index 4bfdf73..5b90d06 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/EnterpriseServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/EnterpriseServiceImpl.java @@ -13,6 +13,7 @@ import com.zhgd.xmgl.modules.basicdata.mapper.ProjectMapper; import com.zhgd.xmgl.modules.basicdata.service.*; import com.zhgd.xmgl.modules.basicdata.vo.EnterpriseVo; import com.zhgd.xmgl.modules.basicdata.vo.SystemUserVo; +import com.zhgd.xmgl.security.SecurityUser; import com.zhgd.xmgl.security.SecurityUtil; import com.zhgd.xmgl.util.CommonUtil; import com.zhgd.xmgl.util.ParamEnum; @@ -75,8 +76,13 @@ public class EnterpriseServiceImpl extends ServiceImpl enterpriseWrapper = Wrappers.lambdaUpdate(); diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/entity/ProjectQuantity.java b/src/main/java/com/zhgd/xmgl/modules/safety/entity/ProjectQuantity.java index 394d769..dadf61e 100644 --- a/src/main/java/com/zhgd/xmgl/modules/safety/entity/ProjectQuantity.java +++ b/src/main/java/com/zhgd/xmgl/modules/safety/entity/ProjectQuantity.java @@ -9,7 +9,6 @@ import lombok.Data; import org.jeecgframework.poi.excel.annotation.Excel; import java.io.Serializable; -import java.math.BigDecimal; import java.util.Date; /** @@ -53,19 +52,19 @@ public class ProjectQuantity implements Serializable { */ @Excel(name = "数量", width = 15) @ApiModelProperty(value = "数量") - private Integer number; + private String number; /** * 单价 */ @Excel(name = "单价", width = 15) @ApiModelProperty(value = "单价") - private BigDecimal unitPrice; + private String unitPrice; /** * 总价 */ @Excel(name = "总价", width = 15) @ApiModelProperty(value = "总价") - private BigDecimal totalPrice; + private String totalPrice; /** * 创建时间 */ diff --git a/src/main/java/com/zhgd/xmgl/util/ParamEnum.java b/src/main/java/com/zhgd/xmgl/util/ParamEnum.java index a6ffc54..e8b47f6 100644 --- a/src/main/java/com/zhgd/xmgl/util/ParamEnum.java +++ b/src/main/java/com/zhgd/xmgl/util/ParamEnum.java @@ -11,7 +11,8 @@ public class ParamEnum { public enum AnnexFileType { ENGINEERING(1, "工程附件"), NOTICE(2, "工程附件"), - POLICY(3, "政策法规附件"); + POLICY(3, "政策法规附件"), + ENGINEERING_ANNEX(4, "工程单独附件"); private Integer value; private String desc; diff --git a/src/main/resources/jeecg/jeecg_database.properties b/src/main/resources/jeecg/jeecg_database.properties index 7eb6e0e..fdd0c36 100644 --- a/src/main/resources/jeecg/jeecg_database.properties +++ b/src/main/resources/jeecg/jeecg_database.properties @@ -1,10 +1,10 @@ #mysql diver_name=com.mysql.jdbc.Driver -url=jdbc:mysql://127.0.0.1:3306/wisdomsitezw_hzxmgl?useUnicode=true&characterEncoding=UTF-8&useSSL=false +url=jdbc:mysql://139.9.66.234:3306/wisdomsitezw_hzxmgl?useUnicode=true&characterEncoding=UTF-8&useSSL=false #url=jdbc:mysql://127.0.0.1:3306/itbgp_bank?useUnicode=true&characterEncoding=UTF-8 #url=jdbc:mysql://139.9.66.234:3306/dev_manage?useUnicode=true&characterEncoding=UTF-8 username=root -password=root +password=JXJ@admin database_name=wisdomsitezw_hzxmgl #database_name=dev_manage