diff --git a/src/main/java/com/zilber/boot/intelligencesite/controller/IConstructionReportController.java b/src/main/java/com/zilber/boot/intelligencesite/controller/IConstructionReportController.java new file mode 100644 index 0000000..33b8cf3 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/controller/IConstructionReportController.java @@ -0,0 +1,76 @@ +package com.zilber.boot.intelligencesite.controller; + + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.zilber.boot.intelligencesite.entity.IConstructionReport; +import com.zilber.boot.intelligencesite.service.IIConstructionReportService; +import com.zilber.boot.utils.AjaxResult; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 施工报告 前端控制器 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@RestController +@RequestMapping("/iconstructionreport") +@Api(tags = "施工报告") +public class IConstructionReportController { + + + @Resource + private IIConstructionReportService iiConstructionReportService; + + + @GetMapping("/list") + @ApiOperation(value="分页查询",notes="分页查询") + @ResponseBody + public AjaxResult queryList(IConstructionReport iConstructionReport, @RequestParam(defaultValue = "1") Integer pageNo, + @RequestParam(defaultValue = "10") Integer pageSize) { + PageHelper.startPage(pageNo, pageSize); + List iConstructionReports = iiConstructionReportService.queryList(iConstructionReport); + PageInfo page = new PageInfo<>(iConstructionReports); + return AjaxResult.success(page); + } + + /*** + * 查询单个 + */ + @GetMapping("/getById") + @ApiOperation("查询单个") + public AjaxResult getById(Integer id) { + return AjaxResult.success(iiConstructionReportService.getById(id)); + } + + + @PostMapping("/add") + @ApiOperation("增加") + public AjaxResult add(@RequestBody IConstructionReport iConstructionReport) { + return AjaxResult.success(iiConstructionReportService.save(iConstructionReport)); + } + + + @PutMapping("/update") + @ApiOperation("修改") + public AjaxResult update(@RequestBody @Validated IConstructionReport iConstructionReport) { + iiConstructionReportService.updateById(iConstructionReport); + return AjaxResult.success(); + } + + @DeleteMapping("/delete") + @ApiOperation("删除") + public AjaxResult delete(Integer id) { + return AjaxResult.success(iiConstructionReportService.removeById(id)); + } + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/controller/IEngineerLogController.java b/src/main/java/com/zilber/boot/intelligencesite/controller/IEngineerLogController.java new file mode 100644 index 0000000..c1ebcb7 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/controller/IEngineerLogController.java @@ -0,0 +1,78 @@ +package com.zilber.boot.intelligencesite.controller; + + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.zilber.boot.intelligencesite.entity.IConstructionReport; +import com.zilber.boot.intelligencesite.entity.IEngineerLog; +import com.zilber.boot.intelligencesite.service.IIConstructionReportService; +import com.zilber.boot.intelligencesite.service.IIEngineerLogService; +import com.zilber.boot.utils.AjaxResult; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 工程日志 前端控制器 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@RestController +@RequestMapping("/iengineerlog") +@Api(tags = "工程日志") +public class IEngineerLogController { + + @Resource + private IIEngineerLogService iiEngineerLogService; + + + @GetMapping("/list") + @ApiOperation(value="分页查询",notes="分页查询") + @ResponseBody + public AjaxResult queryList(IEngineerLog iEngineerLog, @RequestParam(defaultValue = "1") Integer pageNo, + @RequestParam(defaultValue = "10") Integer pageSize) { + PageHelper.startPage(pageNo, pageSize); + List iEngineerLogs = iiEngineerLogService.queryList(iEngineerLog); + PageInfo page = new PageInfo<>(iEngineerLogs); + return AjaxResult.success(page); + } + + /*** + * 查询单个 + */ + @GetMapping("/getById") + @ApiOperation("查询单个") + public AjaxResult getById(Integer id) { + return AjaxResult.success(iiEngineerLogService.getById(id)); + } + + + @PostMapping("/add") + @ApiOperation("增加") + public AjaxResult add(@RequestBody IEngineerLog iEngineerLog) { + return AjaxResult.success(iiEngineerLogService.save(iEngineerLog)); + } + + + @PutMapping("/update") + @ApiOperation("修改") + public AjaxResult update(@RequestBody @Validated IEngineerLog iEngineerLog) { + iiEngineerLogService.updateById(iEngineerLog); + return AjaxResult.success(); + } + + @DeleteMapping("/delete") + @ApiOperation("删除") + public AjaxResult delete(Integer id) { + return AjaxResult.success(iiEngineerLogService.removeById(id)); + } + + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/controller/IManpowerController.java b/src/main/java/com/zilber/boot/intelligencesite/controller/IManpowerController.java new file mode 100644 index 0000000..344b803 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/controller/IManpowerController.java @@ -0,0 +1,77 @@ +package com.zilber.boot.intelligencesite.controller; + + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.zilber.boot.intelligencesite.entity.IEngineerLog; +import com.zilber.boot.intelligencesite.entity.IManpower; +import com.zilber.boot.intelligencesite.service.IIEngineerLogService; +import com.zilber.boot.intelligencesite.service.IIManpowerService; +import com.zilber.boot.utils.AjaxResult; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 人力信息表 前端控制器 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@RestController +@RequestMapping("/imanpower") +@Api(tags = "人力信息") +public class IManpowerController { + + @Resource + private IIManpowerService iiManpowerService; + + @GetMapping("/list") + @ApiOperation(value="分页查询",notes="分页查询") + @ResponseBody + public AjaxResult queryList(IManpower iManpower, @RequestParam(defaultValue = "1") Integer pageNo, + @RequestParam(defaultValue = "10") Integer pageSize) { + PageHelper.startPage(pageNo, pageSize); + List iManpowers = iiManpowerService.queryList(iManpower); + PageInfo page = new PageInfo<>(iManpowers); + return AjaxResult.success(page); + } + + /*** + * 查询单个 + */ + @GetMapping("/getById") + @ApiOperation("查询单个") + public AjaxResult getById(Integer id) { + return AjaxResult.success(iiManpowerService.getById(id)); + } + + + @PostMapping("/add") + @ApiOperation("增加") + public AjaxResult add(@RequestBody IManpower iManpower) { + return AjaxResult.success(iiManpowerService.save(iManpower)); + } + + + @PutMapping("/update") + @ApiOperation("修改") + public AjaxResult update(@RequestBody @Validated IManpower iManpower) { + iiManpowerService.updateById(iManpower); + return AjaxResult.success(); + } + + @DeleteMapping("/delete") + @ApiOperation("删除") + public AjaxResult delete(Integer id) { + return AjaxResult.success(iiManpowerService.removeById(id)); + } + + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/controller/IMaterialsController.java b/src/main/java/com/zilber/boot/intelligencesite/controller/IMaterialsController.java new file mode 100644 index 0000000..24ae664 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/controller/IMaterialsController.java @@ -0,0 +1,76 @@ +package com.zilber.boot.intelligencesite.controller; + + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.zilber.boot.intelligencesite.entity.IManpower; +import com.zilber.boot.intelligencesite.entity.IMaterials; +import com.zilber.boot.intelligencesite.service.IIManpowerService; +import com.zilber.boot.intelligencesite.service.IIMaterialsService; +import com.zilber.boot.utils.AjaxResult; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 材料信息表 前端控制器 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@RestController +@RequestMapping("/imaterials") +@Api(tags = "材料信息") +public class IMaterialsController { + + @Resource + private IIMaterialsService iiMaterialsService; + + @GetMapping("/list") + @ApiOperation(value="分页查询",notes="分页查询") + @ResponseBody + public AjaxResult queryList(IMaterials iMaterials, @RequestParam(defaultValue = "1") Integer pageNo, + @RequestParam(defaultValue = "10") Integer pageSize) { + PageHelper.startPage(pageNo, pageSize); + List iMaterials1 = iiMaterialsService.queryList(iMaterials); + PageInfo page = new PageInfo<>(iMaterials1); + return AjaxResult.success(page); + } + + /*** + * 查询单个 + */ + @GetMapping("/getById") + @ApiOperation("查询单个") + public AjaxResult getById(Integer id) { + return AjaxResult.success(iiMaterialsService.getById(id)); + } + + + @PostMapping("/add") + @ApiOperation("增加") + public AjaxResult add(@RequestBody IMaterials iMaterials) { + return AjaxResult.success(iiMaterialsService.save(iMaterials)); + } + + + @PutMapping("/update") + @ApiOperation("修改") + public AjaxResult update(@RequestBody @Validated IMaterials iMaterials) { + iiMaterialsService.updateById(iMaterials); + return AjaxResult.success(); + } + + @DeleteMapping("/delete") + @ApiOperation("删除") + public AjaxResult delete(Integer id) { + return AjaxResult.success(iiMaterialsService.removeById(id)); + } + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/controller/IProductionPlanController.java b/src/main/java/com/zilber/boot/intelligencesite/controller/IProductionPlanController.java new file mode 100644 index 0000000..70986ad --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/controller/IProductionPlanController.java @@ -0,0 +1,90 @@ +package com.zilber.boot.intelligencesite.controller; + + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.zilber.boot.intelligencesite.entity.IMaterials; +import com.zilber.boot.intelligencesite.entity.IProductionPlan; +import com.zilber.boot.intelligencesite.service.IIMaterialsService; +import com.zilber.boot.intelligencesite.service.IIProductionPlanService; +import com.zilber.boot.utils.AjaxResult; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 生产计划表 前端控制器 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@RestController +@RequestMapping("/iproductionplan") +@Api(tags = "生产计划") +public class IProductionPlanController { + + @Resource + private IIProductionPlanService iiProductionPlanService; + + + @GetMapping("/list") + @ApiOperation(value="分页查询",notes="分页查询") + @ResponseBody + public AjaxResult queryList(IProductionPlan iProductionPlan, @RequestParam(defaultValue = "1") Integer pageNo, + @RequestParam(defaultValue = "10") Integer pageSize) { + PageHelper.startPage(pageNo, pageSize); + List iProductionPlans = iiProductionPlanService.queryList(iProductionPlan); + PageInfo page = new PageInfo<>(iProductionPlans); + return AjaxResult.success(page); + } + + /*** + * 查询单个 + */ + @GetMapping("/getById") + @ApiOperation("查询单个") + public AjaxResult getById(Integer id) { + return AjaxResult.success(iiProductionPlanService.getById(id)); + } + + + @PostMapping("/add") + @ApiOperation("增加") + public AjaxResult add(@RequestBody IProductionPlan iProductionPlan) { + return AjaxResult.success(iiProductionPlanService.save(iProductionPlan)); + } + + + @PutMapping("/update") + @ApiOperation("修改") + public AjaxResult update(@RequestBody @Validated IProductionPlan iProductionPlan) { + iiProductionPlanService.updateById(iProductionPlan); + return AjaxResult.success(); + } + + @DeleteMapping("/delete") + @ApiOperation("删除") + public AjaxResult delete(Integer id) { + return AjaxResult.success(iiProductionPlanService.removeById(id)); + } + + + @GetMapping("/statistics") + @ApiOperation("自动统计计划进度与实际进度") + public AjaxResult statistics() { + return AjaxResult.success(iiProductionPlanService.statistics()); + } + + @GetMapping("/querywarn") + @ApiOperation("预警提示") + public AjaxResult querywarn(Integer day) { + return AjaxResult.success(iiProductionPlanService.querywarn(day)); + } + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/controller/IProgressController.java b/src/main/java/com/zilber/boot/intelligencesite/controller/IProgressController.java new file mode 100644 index 0000000..53dd5ba --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/controller/IProgressController.java @@ -0,0 +1,75 @@ +package com.zilber.boot.intelligencesite.controller; + + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.zilber.boot.intelligencesite.entity.IProgress; +import com.zilber.boot.intelligencesite.service.IIProgressService; +import com.zilber.boot.utils.AjaxResult; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 进度跟踪表 前端控制器 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@RestController +@RequestMapping("/iprogress") +@Api(tags = "进度跟踪") +public class IProgressController { + + @Resource + private IIProgressService iiProgressService; + + + @GetMapping("/list") + @ApiOperation(value="分页查询",notes="分页查询") + @ResponseBody + public AjaxResult queryList(IProgress iProgress, @RequestParam(defaultValue = "1") Integer pageNo, + @RequestParam(defaultValue = "10") Integer pageSize) { + PageHelper.startPage(pageNo, pageSize); + List iProgresses = iiProgressService.queryList(iProgress); + PageInfo page = new PageInfo<>(iProgresses); + return AjaxResult.success(page); + } + + /*** + * 查询单个 + */ + @GetMapping("/getById") + @ApiOperation("查询单个") + public AjaxResult getById(Integer id) { + return AjaxResult.success(iiProgressService.getById(id)); + } + + + @PostMapping("/add") + @ApiOperation("增加") + public AjaxResult add(@RequestBody IProgress iProgress) { + return AjaxResult.success(iiProgressService.add(iProgress)); + } + + + @PutMapping("/update") + @ApiOperation("修改") + public AjaxResult update(@RequestBody @Validated IProgress iProgress) { + iiProgressService.updateById(iProgress); + return AjaxResult.success(); + } + + @DeleteMapping("/delete") + @ApiOperation("删除") + public AjaxResult delete(Integer id) { + return AjaxResult.success(iiProgressService.removeById(id)); + } + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/controller/IResourceScheduleController.java b/src/main/java/com/zilber/boot/intelligencesite/controller/IResourceScheduleController.java new file mode 100644 index 0000000..458a746 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/controller/IResourceScheduleController.java @@ -0,0 +1,74 @@ +package com.zilber.boot.intelligencesite.controller; + + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.zilber.boot.intelligencesite.entity.IResourceSchedule; +import com.zilber.boot.intelligencesite.service.IIResourceScheduleService; +import com.zilber.boot.utils.AjaxResult; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 资源调度表 前端控制器 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@RestController +@RequestMapping("/iresourceschedule") +@Api(tags = "资源调度") +public class IResourceScheduleController { + @Resource + private IIResourceScheduleService iiResourceScheduleService; + + + @GetMapping("/list") + @ApiOperation(value="分页查询",notes="分页查询") + @ResponseBody + public AjaxResult queryList(IResourceSchedule iResourceSchedule, @RequestParam(defaultValue = "1") Integer pageNo, + @RequestParam(defaultValue = "10") Integer pageSize) { + PageHelper.startPage(pageNo, pageSize); + List iResourceSchedules = iiResourceScheduleService.queryList(iResourceSchedule); + PageInfo page = new PageInfo<>(iResourceSchedules); + return AjaxResult.success(page); + } + + /*** + * 查询单个 + */ + @GetMapping("/getById") + @ApiOperation("查询单个") + public AjaxResult getById(Integer id) { + return AjaxResult.success(iiResourceScheduleService.getById(id)); + } + + + @PostMapping("/add") + @ApiOperation("增加") + public AjaxResult add(@RequestBody IResourceSchedule iResourceSchedule) { + return AjaxResult.success(iiResourceScheduleService.save(iResourceSchedule)); + } + + + @PutMapping("/update") + @ApiOperation("修改") + public AjaxResult update(@RequestBody @Validated IResourceSchedule iResourceSchedule) { + iiResourceScheduleService.updateById(iResourceSchedule); + return AjaxResult.success(); + } + + @DeleteMapping("/delete") + @ApiOperation("删除") + public AjaxResult delete(Integer id) { + return AjaxResult.success(iiResourceScheduleService.removeById(id)); + } + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/controller/ISafeController.java b/src/main/java/com/zilber/boot/intelligencesite/controller/ISafeController.java new file mode 100644 index 0000000..ae69326 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/controller/ISafeController.java @@ -0,0 +1,77 @@ +package com.zilber.boot.intelligencesite.controller; + + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.zilber.boot.intelligencesite.entity.IResourceSchedule; +import com.zilber.boot.intelligencesite.entity.ISafe; +import com.zilber.boot.intelligencesite.service.IIResourceScheduleService; +import com.zilber.boot.intelligencesite.service.IISafeService; +import com.zilber.boot.utils.AjaxResult; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 安全教育 前端控制器 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@RestController +@RequestMapping("/isafe") +@Api(tags = "安全教育") +public class ISafeController { + + @Resource + private IISafeService IISafeService; + + + @GetMapping("/list") + @ApiOperation(value="分页查询",notes="分页查询") + @ResponseBody + public AjaxResult queryList(ISafe iSafe, @RequestParam(defaultValue = "1") Integer pageNo, + @RequestParam(defaultValue = "10") Integer pageSize) { + PageHelper.startPage(pageNo, pageSize); + List iSafes = IISafeService.queryList(iSafe); + PageInfo page = new PageInfo<>(iSafes); + return AjaxResult.success(page); + } + + /*** + * 查询单个 + */ + @GetMapping("/getById") + @ApiOperation("查询单个") + public AjaxResult getById(Integer id) { + return AjaxResult.success(IISafeService.getById(id)); + } + + + @PostMapping("/add") + @ApiOperation("增加") + public AjaxResult add(@RequestBody ISafe iSafe) { + return AjaxResult.success(IISafeService.save(iSafe)); + } + + + @PutMapping("/update") + @ApiOperation("修改") + public AjaxResult update(@RequestBody @Validated ISafe iSafe) { + IISafeService.updateById(iSafe); + return AjaxResult.success(); + } + + @DeleteMapping("/delete") + @ApiOperation("删除") + public AjaxResult delete(Integer id) { + return AjaxResult.success(IISafeService.removeById(id)); + } + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/controller/IUserController.java b/src/main/java/com/zilber/boot/intelligencesite/controller/IUserController.java new file mode 100644 index 0000000..06ae267 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/controller/IUserController.java @@ -0,0 +1,77 @@ +package com.zilber.boot.intelligencesite.controller; + + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.zilber.boot.intelligencesite.entity.ISafe; +import com.zilber.boot.intelligencesite.entity.IUser; +import com.zilber.boot.intelligencesite.service.IISafeService; +import com.zilber.boot.intelligencesite.service.IIUserService; +import com.zilber.boot.utils.AjaxResult; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 实名制与信息管理 前端控制器 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@RestController +@RequestMapping("/iuser") +@Api(tags = "实名制与信息管理") +public class IUserController { + + @Resource + private IIUserService iiUserService; + + + @GetMapping("/list") + @ApiOperation(value="分页查询",notes="分页查询") + @ResponseBody + public AjaxResult queryList(IUser iUser, @RequestParam(defaultValue = "1") Integer pageNo, + @RequestParam(defaultValue = "10") Integer pageSize) { + PageHelper.startPage(pageNo, pageSize); + List iUsers = iiUserService.queryList(iUser); + PageInfo page = new PageInfo<>(iUsers); + return AjaxResult.success(page); + } + + /*** + * 查询单个 + */ + @GetMapping("/getById") + @ApiOperation("查询单个") + public AjaxResult getById(Integer id) { + return AjaxResult.success(iiUserService.getById(id)); + } + + + @PostMapping("/add") + @ApiOperation("增加") + public AjaxResult add(@RequestBody IUser iUser) { + return AjaxResult.success(iiUserService.save(iUser)); + } + + + @PutMapping("/update") + @ApiOperation("修改") + public AjaxResult update(@RequestBody @Validated IUser iUser) { + iiUserService.updateById(iUser); + return AjaxResult.success(); + } + + @DeleteMapping("/delete") + @ApiOperation("删除") + public AjaxResult delete(Integer id) { + return AjaxResult.success(iiUserService.removeById(id)); + } + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/controller/IWarnController.java b/src/main/java/com/zilber/boot/intelligencesite/controller/IWarnController.java new file mode 100644 index 0000000..1ef1080 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/controller/IWarnController.java @@ -0,0 +1,78 @@ +package com.zilber.boot.intelligencesite.controller; + + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.zilber.boot.intelligencesite.entity.IUser; +import com.zilber.boot.intelligencesite.entity.IWarn; +import com.zilber.boot.intelligencesite.service.IIUserService; +import com.zilber.boot.intelligencesite.service.IIWarnService; +import com.zilber.boot.utils.AjaxResult; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 预警表 前端控制器 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@RestController +@RequestMapping("/iwarn") +@Api(tags = "预警") +public class IWarnController { + + @Resource + private IIWarnService iiWarnService; + + + @GetMapping("/list") + @ApiOperation(value="分页查询",notes="分页查询") + @ResponseBody + public AjaxResult queryList(IWarn iWarn, @RequestParam(defaultValue = "1") Integer pageNo, + @RequestParam(defaultValue = "10") Integer pageSize) { + PageHelper.startPage(pageNo, pageSize); + List iWarns = iiWarnService.queryList(iWarn); + PageInfo page = new PageInfo<>(iWarns); + return AjaxResult.success(page); + } + + /*** + * 查询单个 + */ + @GetMapping("/getById") + @ApiOperation("查询单个") + public AjaxResult getById(Integer id) { + return AjaxResult.success(iiWarnService.getById(id)); + } + + + @PostMapping("/add") + @ApiOperation("增加") + public AjaxResult add(@RequestBody IWarn iWarn) { + return AjaxResult.success(iiWarnService.save(iWarn)); + } + + + @PutMapping("/update") + @ApiOperation("修改") + public AjaxResult update(@RequestBody @Validated IWarn iWarn) { + iiWarnService.updateById(iWarn); + return AjaxResult.success(); + } + + @DeleteMapping("/delete") + @ApiOperation("删除") + public AjaxResult delete(Integer id) { + return AjaxResult.success(iiWarnService.removeById(id)); + } + + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/entity/IConstructionReport.java b/src/main/java/com/zilber/boot/intelligencesite/entity/IConstructionReport.java new file mode 100644 index 0000000..2d15f63 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/entity/IConstructionReport.java @@ -0,0 +1,78 @@ +package com.zilber.boot.intelligencesite.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import java.time.LocalDateTime; +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.springframework.format.annotation.DateTimeFormat; + +/** + *

+ * 施工报告 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("i_construction_report") +@ApiModel(value="IConstructionReport对象", description="施工报告") +public class IConstructionReport implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + @ApiModelProperty(value = "报告日期") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime date; + + @ApiModelProperty(value = "报告周期") + private String cycle; + + @ApiModelProperty(value = "计划id") + private Long planId; + + @ApiModelProperty(value = "计划名称") + private String planName; + + @ApiModelProperty(value = "总体进度") + private String totalProgress; + + @ApiModelProperty(value = "人力投入") + private String manpower; + + @ApiModelProperty(value = "材料使用") + private String materialsUse; + + @ApiModelProperty(value = "机械设备运行") + private String equipmentOperation; + + @ApiModelProperty(value = "质量安全") + private String qs; + + @ApiModelProperty(value = "建议") + private String advise; + + @ApiModelProperty(value = "创建时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime createTime; + + @ApiModelProperty(value = "创建人") + private String creator; + + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/entity/IEngineerLog.java b/src/main/java/com/zilber/boot/intelligencesite/entity/IEngineerLog.java new file mode 100644 index 0000000..6a882f4 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/entity/IEngineerLog.java @@ -0,0 +1,75 @@ +package com.zilber.boot.intelligencesite.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import java.time.LocalDateTime; +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.springframework.format.annotation.DateTimeFormat; + +/** + *

+ * 工程日志 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("i_engineer_log") +@ApiModel(value="IEngineerLog对象", description="工程日志") +public class IEngineerLog implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + @ApiModelProperty(value = "日期") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime date; + + @ApiModelProperty(value = "天气") + private String weather; + + + @ApiModelProperty(value = "温度") + private String temperature; + + @ApiModelProperty(value = "风力") + private String wind; + + @ApiModelProperty(value = "现场负责人姓名") + private String principalName; + + + @ApiModelProperty(value = "现场负责人联系方式") + private String principalTel; + + + @ApiModelProperty(value = "施工情况") + private String constructionSituation; + + @ApiModelProperty(value = "其他事项") + private String otherBusiness; + + @ApiModelProperty(value = "创建时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime createTime; + + @ApiModelProperty(value = "创建人") + private String creator; + + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/entity/IManpower.java b/src/main/java/com/zilber/boot/intelligencesite/entity/IManpower.java new file mode 100644 index 0000000..c3ec382 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/entity/IManpower.java @@ -0,0 +1,67 @@ +package com.zilber.boot.intelligencesite.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import java.time.LocalDateTime; +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.springframework.format.annotation.DateTimeFormat; + +/** + *

+ * 人力信息表 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("i_manpower") +@ApiModel(value="IManpower对象", description="人力信息表") +public class IManpower implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + @ApiModelProperty(value = "姓名") + private String name; + + @ApiModelProperty(value = "工种") + private String workType; + + @ApiModelProperty(value = "数量") + private Integer quantity; + + + @ApiModelProperty(value = "计划投入时间") + private Integer planDevoteTime; + + @ApiModelProperty(value = "实际投入时间") + private Integer actualDevoteTime; + + @ApiModelProperty(value = "预计离场时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime leaveTime; + + @ApiModelProperty(value = "创建时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime createTime; + + @ApiModelProperty(value = "创建人") + private String creator; + + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/entity/IMaterials.java b/src/main/java/com/zilber/boot/intelligencesite/entity/IMaterials.java new file mode 100644 index 0000000..2c1d6cb --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/entity/IMaterials.java @@ -0,0 +1,77 @@ +package com.zilber.boot.intelligencesite.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import java.time.LocalDateTime; +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.springframework.format.annotation.DateTimeFormat; + +/** + *

+ * 材料信息表 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("i_materials") +@ApiModel(value="IMaterials对象", description="材料信息表") +public class IMaterials implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + @ApiModelProperty(value = "材料名称") + private String name; + + @ApiModelProperty(value = "规格型号") + private String specification; + + @ApiModelProperty(value = "单位") + private String unit; + + @ApiModelProperty(value = "计划需求量") + private Integer planNeed; + + @ApiModelProperty(value = "实际进厂量") + private Integer actualIn; + + @ApiModelProperty(value = "剩余量") + private Integer surplus; + + @ApiModelProperty(value = "供应商名称") + private String supplierName; + + @ApiModelProperty(value = "采购时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime purchaseTime; + + @ApiModelProperty(value = "预计使用时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime planUseTime; + + @ApiModelProperty(value = "创建时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime createTime; + + @ApiModelProperty(value = "创建人") + private String creator; + + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/entity/IProductionPlan.java b/src/main/java/com/zilber/boot/intelligencesite/entity/IProductionPlan.java new file mode 100644 index 0000000..42abb85 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/entity/IProductionPlan.java @@ -0,0 +1,77 @@ +package com.zilber.boot.intelligencesite.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import java.time.LocalDateTime; +import java.io.Serializable; +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.springframework.format.annotation.DateTimeFormat; + +/** + *

+ * 生产计划表 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("i_production_plan") +@ApiModel(value="IProductionPlan对象", description="生产计划表") +public class IProductionPlan implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + @ApiModelProperty(value = "计划名称") + private String planName; + + @ApiModelProperty(value = "所属项目阶段") + private String projectStage; + + @ApiModelProperty(value = "计划描述") + private String description; + + @ApiModelProperty(value = "计划开始时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date startTime; + + @ApiModelProperty(value = "计划结束时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date endTime; + + @ApiModelProperty(value = "创建时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date createTime; + + @ApiModelProperty(value = "创建人") + private String creator; + + @ApiModelProperty(value = "总工期天数") + private Integer duration; + + @ApiModelProperty(value = "关键节点时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime keystageTime; + + @ApiModelProperty(value = "计划负责人") + private String principal; + + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/entity/IProgress.java b/src/main/java/com/zilber/boot/intelligencesite/entity/IProgress.java new file mode 100644 index 0000000..32938b3 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/entity/IProgress.java @@ -0,0 +1,58 @@ +package com.zilber.boot.intelligencesite.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import java.time.LocalDateTime; +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.springframework.format.annotation.DateTimeFormat; + +/** + *

+ * 进度跟踪表 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("i_progress") +@ApiModel(value="IProgress对象", description="进度跟踪表") +public class IProgress implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + @ApiModelProperty(value = "计划id") + private Long planId; + + @ApiModelProperty(value = "计划名称") + private String planName; + + @ApiModelProperty(value = "当日完成进度") + private Integer dayProgress; + + @ApiModelProperty(value = "累计完成进度") + private Integer accumulativeProgress; + + @ApiModelProperty(value = "创建时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime createTime; + + @ApiModelProperty(value = "创建人") + private String creator; + + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/entity/IResourceSchedule.java b/src/main/java/com/zilber/boot/intelligencesite/entity/IResourceSchedule.java new file mode 100644 index 0000000..88f5294 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/entity/IResourceSchedule.java @@ -0,0 +1,68 @@ +package com.zilber.boot.intelligencesite.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import java.time.LocalDateTime; +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.springframework.format.annotation.DateTimeFormat; + +/** + *

+ * 资源调度表 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("i_resource_schedule") +@ApiModel(value="IResourceSchedule对象", description="资源调度表") +public class IResourceSchedule implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + @ApiModelProperty(value = "计划id") + private Long planId; + + @ApiModelProperty(value = "计划名称") + private String planName; + + @ApiModelProperty(value = "计划开始时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime startTime; + + @ApiModelProperty(value = "计划结束时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime endTime; + + @ApiModelProperty(value = "创建时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime createTime; + + @ApiModelProperty(value = "创建人") + private String creator; + + @ApiModelProperty(value = "当前进度") + private Integer currentProgress; + + @ApiModelProperty(value = "建议") + private String advise; + + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/entity/ISafe.java b/src/main/java/com/zilber/boot/intelligencesite/entity/ISafe.java new file mode 100644 index 0000000..e7def42 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/entity/ISafe.java @@ -0,0 +1,54 @@ +package com.zilber.boot.intelligencesite.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.TableId; +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.springframework.format.annotation.DateTimeFormat; + +/** + *

+ * 安全教育 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("i_safe") +@ApiModel(value="ISafe对象", description="安全教育") +public class ISafe implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + @ApiModelProperty(value = "姓名") + private String name; + + @ApiModelProperty(value = "进项安全教育啥时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime date; + + @ApiModelProperty(value = "创建时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime createTime; + + @ApiModelProperty(value = "创建人") + private String creator; + + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/entity/IUser.java b/src/main/java/com/zilber/boot/intelligencesite/entity/IUser.java new file mode 100644 index 0000000..5e41f41 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/entity/IUser.java @@ -0,0 +1,58 @@ +package com.zilber.boot.intelligencesite.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import java.time.LocalDateTime; +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.springframework.format.annotation.DateTimeFormat; + +/** + *

+ * 实名制与信息管理 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("i_user") +@ApiModel(value="IUser对象", description="实名制与信息管理") +public class IUser implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + @ApiModelProperty(value = "姓名") + private String name; + + @ApiModelProperty(value = "联系方式") + private String tel; + + @ApiModelProperty(value = "身份证") + private String idCard; + + @ApiModelProperty(value = "工种") + private String workType; + + @ApiModelProperty(value = "创建时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime createTime; + + @ApiModelProperty(value = "创建人") + private String creator; + + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/entity/IWarn.java b/src/main/java/com/zilber/boot/intelligencesite/entity/IWarn.java new file mode 100644 index 0000000..a9fe2f5 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/entity/IWarn.java @@ -0,0 +1,61 @@ +package com.zilber.boot.intelligencesite.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import java.time.LocalDateTime; +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.springframework.format.annotation.DateTimeFormat; + +/** + *

+ * 预警表 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("i_warn") +@ApiModel(value="IWarn对象", description="预警表") +public class IWarn implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + @ApiModelProperty(value = "计划id") + private Long planId; + + @ApiModelProperty(value = "计划名称") + private String planName; + + @ApiModelProperty(value = "偏差类型1提前2滞后") + private Integer deviationType; + + @ApiModelProperty(value = "偏差天数") + private Integer deviationDays; + + @ApiModelProperty(value = "预警信息") + private String warnInfo; + + @ApiModelProperty(value = "创建时间") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime createTime; + + @ApiModelProperty(value = "创建人") + private String creator; + + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/mapper/IConstructionReportMapper.java b/src/main/java/com/zilber/boot/intelligencesite/mapper/IConstructionReportMapper.java new file mode 100644 index 0000000..a08b10d --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/mapper/IConstructionReportMapper.java @@ -0,0 +1,20 @@ +package com.zilber.boot.intelligencesite.mapper; + +import com.zilber.boot.intelligencesite.entity.IConstructionReport; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import java.util.List; + +/** + *

+ * 施工报告 Mapper 接口 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IConstructionReportMapper extends BaseMapper { + + List queryList(IConstructionReport iConstructionReport); + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/mapper/IEngineerLogMapper.java b/src/main/java/com/zilber/boot/intelligencesite/mapper/IEngineerLogMapper.java new file mode 100644 index 0000000..e42f8ec --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/mapper/IEngineerLogMapper.java @@ -0,0 +1,19 @@ +package com.zilber.boot.intelligencesite.mapper; + +import com.zilber.boot.intelligencesite.entity.IEngineerLog; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import java.util.List; + +/** + *

+ * 工程日志 Mapper 接口 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IEngineerLogMapper extends BaseMapper { + + List queryList(IEngineerLog iEngineerLog); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/mapper/IManpowerMapper.java b/src/main/java/com/zilber/boot/intelligencesite/mapper/IManpowerMapper.java new file mode 100644 index 0000000..5afca6e --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/mapper/IManpowerMapper.java @@ -0,0 +1,19 @@ +package com.zilber.boot.intelligencesite.mapper; + +import com.zilber.boot.intelligencesite.entity.IManpower; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import java.util.List; + +/** + *

+ * 人力信息表 Mapper 接口 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IManpowerMapper extends BaseMapper { + + List queryList(IManpower iManpower); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/mapper/IMaterialsMapper.java b/src/main/java/com/zilber/boot/intelligencesite/mapper/IMaterialsMapper.java new file mode 100644 index 0000000..dd78329 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/mapper/IMaterialsMapper.java @@ -0,0 +1,19 @@ +package com.zilber.boot.intelligencesite.mapper; + +import com.zilber.boot.intelligencesite.entity.IMaterials; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import java.util.List; + +/** + *

+ * 材料信息表 Mapper 接口 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IMaterialsMapper extends BaseMapper { + + List queryList(IMaterials iMaterials); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/mapper/IProductionPlanMapper.java b/src/main/java/com/zilber/boot/intelligencesite/mapper/IProductionPlanMapper.java new file mode 100644 index 0000000..1f28793 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/mapper/IProductionPlanMapper.java @@ -0,0 +1,19 @@ +package com.zilber.boot.intelligencesite.mapper; + +import com.zilber.boot.intelligencesite.entity.IProductionPlan; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import java.util.List; + +/** + *

+ * 生产计划表 Mapper 接口 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IProductionPlanMapper extends BaseMapper { + + List queryList(IProductionPlan iProductionPlan); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/mapper/IProgressMapper.java b/src/main/java/com/zilber/boot/intelligencesite/mapper/IProgressMapper.java new file mode 100644 index 0000000..be7554c --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/mapper/IProgressMapper.java @@ -0,0 +1,19 @@ +package com.zilber.boot.intelligencesite.mapper; + +import com.zilber.boot.intelligencesite.entity.IProgress; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import java.util.List; + +/** + *

+ * 进度跟踪表 Mapper 接口 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IProgressMapper extends BaseMapper { + + List queryList(IProgress iProgress); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/mapper/IResourceScheduleMapper.java b/src/main/java/com/zilber/boot/intelligencesite/mapper/IResourceScheduleMapper.java new file mode 100644 index 0000000..e74bef7 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/mapper/IResourceScheduleMapper.java @@ -0,0 +1,19 @@ +package com.zilber.boot.intelligencesite.mapper; + +import com.zilber.boot.intelligencesite.entity.IResourceSchedule; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import java.util.List; + +/** + *

+ * 资源调度表 Mapper 接口 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IResourceScheduleMapper extends BaseMapper { + + List queryList(IResourceSchedule iResourceSchedule); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/mapper/ISafeMapper.java b/src/main/java/com/zilber/boot/intelligencesite/mapper/ISafeMapper.java new file mode 100644 index 0000000..e75d7d4 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/mapper/ISafeMapper.java @@ -0,0 +1,19 @@ +package com.zilber.boot.intelligencesite.mapper; + +import com.zilber.boot.intelligencesite.entity.ISafe; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import java.util.List; + +/** + *

+ * 安全教育 Mapper 接口 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface ISafeMapper extends BaseMapper { + + List queryList(ISafe iSafe); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/mapper/IUserMapper.java b/src/main/java/com/zilber/boot/intelligencesite/mapper/IUserMapper.java new file mode 100644 index 0000000..54ad3fd --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/mapper/IUserMapper.java @@ -0,0 +1,19 @@ +package com.zilber.boot.intelligencesite.mapper; + +import com.zilber.boot.intelligencesite.entity.IUser; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import java.util.List; + +/** + *

+ * 实名制与信息管理 Mapper 接口 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IUserMapper extends BaseMapper { + + List queryList(IUser iUser); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/mapper/IWarnMapper.java b/src/main/java/com/zilber/boot/intelligencesite/mapper/IWarnMapper.java new file mode 100644 index 0000000..1f1f2a3 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/mapper/IWarnMapper.java @@ -0,0 +1,19 @@ +package com.zilber.boot.intelligencesite.mapper; + +import com.zilber.boot.intelligencesite.entity.IWarn; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import java.util.List; + +/** + *

+ * 预警表 Mapper 接口 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IWarnMapper extends BaseMapper { + + List queryList(IWarn iWarn); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/IIConstructionReportService.java b/src/main/java/com/zilber/boot/intelligencesite/service/IIConstructionReportService.java new file mode 100644 index 0000000..7884184 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/IIConstructionReportService.java @@ -0,0 +1,22 @@ +package com.zilber.boot.intelligencesite.service; + +import com.zilber.boot.intelligencesite.entity.IConstructionReport; +import com.baomidou.mybatisplus.extension.service.IService; +import com.zilber.boot.utils.AjaxResult; +import com.zilber.boot.utils.page.PageUtils; + +import java.util.List; + +/** + *

+ * 施工报告 服务类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IIConstructionReportService extends IService { + + List queryList(IConstructionReport iConstructionReport); + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/IIEngineerLogService.java b/src/main/java/com/zilber/boot/intelligencesite/service/IIEngineerLogService.java new file mode 100644 index 0000000..96ff049 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/IIEngineerLogService.java @@ -0,0 +1,19 @@ +package com.zilber.boot.intelligencesite.service; + +import com.zilber.boot.intelligencesite.entity.IEngineerLog; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + *

+ * 工程日志 服务类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IIEngineerLogService extends IService { + + List queryList(IEngineerLog iEngineerLog); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/IIManpowerService.java b/src/main/java/com/zilber/boot/intelligencesite/service/IIManpowerService.java new file mode 100644 index 0000000..5e72443 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/IIManpowerService.java @@ -0,0 +1,19 @@ +package com.zilber.boot.intelligencesite.service; + +import com.zilber.boot.intelligencesite.entity.IManpower; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + *

+ * 人力信息表 服务类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IIManpowerService extends IService { + + List queryList(IManpower iManpower); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/IIMaterialsService.java b/src/main/java/com/zilber/boot/intelligencesite/service/IIMaterialsService.java new file mode 100644 index 0000000..a829eab --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/IIMaterialsService.java @@ -0,0 +1,19 @@ +package com.zilber.boot.intelligencesite.service; + +import com.zilber.boot.intelligencesite.entity.IMaterials; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + *

+ * 材料信息表 服务类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IIMaterialsService extends IService { + + List queryList(IMaterials iMaterials); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/IIProductionPlanService.java b/src/main/java/com/zilber/boot/intelligencesite/service/IIProductionPlanService.java new file mode 100644 index 0000000..3318669 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/IIProductionPlanService.java @@ -0,0 +1,24 @@ +package com.zilber.boot.intelligencesite.service; + +import com.zilber.boot.intelligencesite.entity.IProductionPlan; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; +import java.util.Map; + +/** + *

+ * 生产计划表 服务类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IIProductionPlanService extends IService { + + List queryList(IProductionPlan iProductionPlan); + + Map statistics(); + + List querywarn(Integer day); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/IIProgressService.java b/src/main/java/com/zilber/boot/intelligencesite/service/IIProgressService.java new file mode 100644 index 0000000..469714f --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/IIProgressService.java @@ -0,0 +1,22 @@ +package com.zilber.boot.intelligencesite.service; + +import com.zilber.boot.intelligencesite.entity.IProgress; +import com.baomidou.mybatisplus.extension.service.IService; +import com.zilber.boot.utils.AjaxResult; + +import java.util.List; + +/** + *

+ * 进度跟踪表 服务类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IIProgressService extends IService { + + List queryList(IProgress iProgress); + + AjaxResult add(IProgress iProgress); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/IIResourceScheduleService.java b/src/main/java/com/zilber/boot/intelligencesite/service/IIResourceScheduleService.java new file mode 100644 index 0000000..6e1f384 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/IIResourceScheduleService.java @@ -0,0 +1,19 @@ +package com.zilber.boot.intelligencesite.service; + +import com.zilber.boot.intelligencesite.entity.IResourceSchedule; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + *

+ * 资源调度表 服务类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IIResourceScheduleService extends IService { + + List queryList(IResourceSchedule iResourceSchedule); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/IISafeService.java b/src/main/java/com/zilber/boot/intelligencesite/service/IISafeService.java new file mode 100644 index 0000000..00cf7d4 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/IISafeService.java @@ -0,0 +1,19 @@ +package com.zilber.boot.intelligencesite.service; + +import com.zilber.boot.intelligencesite.entity.ISafe; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + *

+ * 安全教育 服务类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IISafeService extends IService { + + List queryList(ISafe iSafe); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/IIUserService.java b/src/main/java/com/zilber/boot/intelligencesite/service/IIUserService.java new file mode 100644 index 0000000..5598bcc --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/IIUserService.java @@ -0,0 +1,19 @@ +package com.zilber.boot.intelligencesite.service; + +import com.zilber.boot.intelligencesite.entity.IUser; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + *

+ * 实名制与信息管理 服务类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IIUserService extends IService { + + List queryList(IUser iUser); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/IIWarnService.java b/src/main/java/com/zilber/boot/intelligencesite/service/IIWarnService.java new file mode 100644 index 0000000..a6bd510 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/IIWarnService.java @@ -0,0 +1,19 @@ +package com.zilber.boot.intelligencesite.service; + +import com.zilber.boot.intelligencesite.entity.IWarn; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + *

+ * 预警表 服务类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +public interface IIWarnService extends IService { + + List queryList(IWarn iWarn); +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/impl/IConstructionReportServiceImpl.java b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IConstructionReportServiceImpl.java new file mode 100644 index 0000000..a904d5c --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IConstructionReportServiceImpl.java @@ -0,0 +1,32 @@ +package com.zilber.boot.intelligencesite.service.impl; + +import com.zilber.boot.intelligencesite.entity.IConstructionReport; +import com.zilber.boot.intelligencesite.mapper.IConstructionReportMapper; +import com.zilber.boot.intelligencesite.service.IIConstructionReportService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 施工报告 服务实现类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Service +public class IConstructionReportServiceImpl extends ServiceImpl implements IIConstructionReportService { + + @Resource + private IConstructionReportMapper iConstructionReportMapper; + + + @Override + public List queryList(IConstructionReport iConstructionReport) { + return iConstructionReportMapper.queryList(iConstructionReport); + } + +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/impl/IEngineerLogServiceImpl.java b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IEngineerLogServiceImpl.java new file mode 100644 index 0000000..98f1c51 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IEngineerLogServiceImpl.java @@ -0,0 +1,31 @@ +package com.zilber.boot.intelligencesite.service.impl; + +import com.zilber.boot.intelligencesite.entity.IEngineerLog; +import com.zilber.boot.intelligencesite.mapper.IConstructionReportMapper; +import com.zilber.boot.intelligencesite.mapper.IEngineerLogMapper; +import com.zilber.boot.intelligencesite.service.IIEngineerLogService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 工程日志 服务实现类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Service +public class IEngineerLogServiceImpl extends ServiceImpl implements IIEngineerLogService { + + @Resource + private IEngineerLogMapper iEngineerLogMapper; + + @Override + public List queryList(IEngineerLog iEngineerLog) { + return iEngineerLogMapper.queryList(iEngineerLog); + } +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/impl/IManpowerServiceImpl.java b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IManpowerServiceImpl.java new file mode 100644 index 0000000..2483d82 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IManpowerServiceImpl.java @@ -0,0 +1,33 @@ +package com.zilber.boot.intelligencesite.service.impl; + +import com.zilber.boot.intelligencesite.entity.IEngineerLog; +import com.zilber.boot.intelligencesite.entity.IManpower; +import com.zilber.boot.intelligencesite.mapper.IEngineerLogMapper; +import com.zilber.boot.intelligencesite.mapper.IManpowerMapper; +import com.zilber.boot.intelligencesite.service.IIManpowerService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 人力信息表 服务实现类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Service +public class IManpowerServiceImpl extends ServiceImpl implements IIManpowerService { + + @Resource + private IManpowerMapper iManpowerMapper; + + + @Override + public List queryList(IManpower iManpower) { + return iManpowerMapper.queryList(iManpower); + } +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/impl/IMaterialsServiceImpl.java b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IMaterialsServiceImpl.java new file mode 100644 index 0000000..8d14764 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IMaterialsServiceImpl.java @@ -0,0 +1,33 @@ +package com.zilber.boot.intelligencesite.service.impl; + +import com.zilber.boot.intelligencesite.entity.IEngineerLog; +import com.zilber.boot.intelligencesite.entity.IMaterials; +import com.zilber.boot.intelligencesite.mapper.IEngineerLogMapper; +import com.zilber.boot.intelligencesite.mapper.IMaterialsMapper; +import com.zilber.boot.intelligencesite.service.IIMaterialsService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 材料信息表 服务实现类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Service +public class IMaterialsServiceImpl extends ServiceImpl implements IIMaterialsService { + + @Resource + private IMaterialsMapper iMaterialsMapper; + + + @Override + public List queryList(IMaterials iMaterials) { + return iMaterialsMapper.queryList(iMaterials); + } +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/impl/IProductionPlanServiceImpl.java b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IProductionPlanServiceImpl.java new file mode 100644 index 0000000..9696939 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IProductionPlanServiceImpl.java @@ -0,0 +1,83 @@ +package com.zilber.boot.intelligencesite.service.impl; + +import com.zilber.boot.intelligencesite.entity.IEngineerLog; +import com.zilber.boot.intelligencesite.entity.IProductionPlan; +import com.zilber.boot.intelligencesite.entity.IProgress; +import com.zilber.boot.intelligencesite.mapper.IEngineerLogMapper; +import com.zilber.boot.intelligencesite.mapper.IProductionPlanMapper; +import com.zilber.boot.intelligencesite.mapper.IProgressMapper; +import com.zilber.boot.intelligencesite.service.IIProductionPlanService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zilber.boot.utils.DateUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.time.temporal.ChronoUnit; +import java.util.*; + +/** + *

+ * 生产计划表 服务实现类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Service +public class IProductionPlanServiceImpl extends ServiceImpl implements IIProductionPlanService { + + @Resource + private IProductionPlanMapper iProductionPlanMapper; + @Resource + private IProgressMapper iProgressMapper; + + + + @Override + public List queryList(IProductionPlan iProductionPlan) { + return iProductionPlanMapper.queryList(iProductionPlan); + } + + @Override + public Map statistics() { + List iProductionPlans = iProductionPlanMapper.queryList(null); + List namelist=new ArrayList<>(); + List planlist=new ArrayList<>(); + List actuallist=new ArrayList<>(); + for (IProductionPlan iProductionPlan : iProductionPlans) { + //获取每个计划时间差(结束时间-开始时间) + //long datePoorByDay = DateUtils.getDatePoorByDay(iProductionPlan.getEndTime(), iProductionPlan.getStartTime()); + //获取每个计划每天应完成的百分比 + BigDecimal daypercent = new BigDecimal(1).divide(new BigDecimal(iProductionPlan.getDuration()),2,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)); + //获取当前日期,减去开始日期,乘以每个计划每天应完成的百分比,算出截止今天应该完成的百分比 + BigDecimal currentpercent = BigDecimal.valueOf(DateUtils.getDatePoorByDay(new Date(), iProductionPlan.getStartTime())).multiply(daypercent); + if (DateUtils.getDatePoorByDay(new Date(), iProductionPlan.getEndTime()) > 0) { + currentpercent = BigDecimal.valueOf(100); + } + planlist.add(currentpercent); + namelist.add(iProductionPlan.getPlanName()); + //查询计划实际填报情况 + List progresseslist = iProgressMapper.queryList(new IProgress().setPlanId(iProductionPlan.getId())); + long total = progresseslist.stream().mapToLong(IProgress::getDayProgress).sum(); + actuallist.add(total); + } + Map result = new HashMap<>(); + result.put("namelist",namelist); + result.put("planlist",planlist); + result.put("actuallist",actuallist); + return result; + } + + @Override + public List querywarn(Integer day) { + List iProductionPlans = iProductionPlanMapper.queryList(null); + List newiProductionPlans=new ArrayList<>(); + for (IProductionPlan iProductionPlan : iProductionPlans) { + if (DateUtils.getDatePoorByDay(new Date(), iProductionPlan.getEndTime()) > day) { + newiProductionPlans.add(iProductionPlan); + } + } + return newiProductionPlans; + } +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/impl/IProgressServiceImpl.java b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IProgressServiceImpl.java new file mode 100644 index 0000000..e0ba5e6 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IProgressServiceImpl.java @@ -0,0 +1,43 @@ +package com.zilber.boot.intelligencesite.service.impl; + +import com.zilber.boot.intelligencesite.entity.IEngineerLog; +import com.zilber.boot.intelligencesite.entity.IProgress; +import com.zilber.boot.intelligencesite.mapper.IEngineerLogMapper; +import com.zilber.boot.intelligencesite.mapper.IProgressMapper; +import com.zilber.boot.intelligencesite.service.IIProgressService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zilber.boot.utils.AjaxResult; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 进度跟踪表 服务实现类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Service +public class IProgressServiceImpl extends ServiceImpl implements IIProgressService { + + @Resource + private IProgressMapper iProgressMapper; + + @Override + public List queryList(IProgress iProgress) { + return iProgressMapper.queryList(iProgress); + } + + @Override + public AjaxResult add(IProgress iProgress) { + List list=iProgressMapper.queryList(new IProgress().setPlanId(iProgress.getPlanId())); + long total = list.stream().mapToLong(IProgress::getDayProgress).sum(); + if(iProgress.getDayProgress()+total>100){ + return AjaxResult.error("已超出最大值,最大值应为"+ (100 - total)); + } + return AjaxResult.success(iProgressMapper.insert(iProgress)); + } +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/impl/IResourceScheduleServiceImpl.java b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IResourceScheduleServiceImpl.java new file mode 100644 index 0000000..031325f --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IResourceScheduleServiceImpl.java @@ -0,0 +1,34 @@ +package com.zilber.boot.intelligencesite.service.impl; + +import com.zilber.boot.intelligencesite.entity.IEngineerLog; +import com.zilber.boot.intelligencesite.entity.IResourceSchedule; +import com.zilber.boot.intelligencesite.mapper.IEngineerLogMapper; +import com.zilber.boot.intelligencesite.mapper.IResourceScheduleMapper; +import com.zilber.boot.intelligencesite.service.IIResourceScheduleService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 资源调度表 服务实现类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Service +public class IResourceScheduleServiceImpl extends ServiceImpl implements IIResourceScheduleService { + + @Resource + private IResourceScheduleMapper iResourceScheduleMapper; + + + + @Override + public List queryList(IResourceSchedule iResourceSchedule) { + return iResourceScheduleMapper.queryList(iResourceSchedule); + } +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/impl/ISafeServiceImpl.java b/src/main/java/com/zilber/boot/intelligencesite/service/impl/ISafeServiceImpl.java new file mode 100644 index 0000000..a8d0c2b --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/impl/ISafeServiceImpl.java @@ -0,0 +1,32 @@ +package com.zilber.boot.intelligencesite.service.impl; + +import com.zilber.boot.intelligencesite.entity.IEngineerLog; +import com.zilber.boot.intelligencesite.entity.ISafe; +import com.zilber.boot.intelligencesite.mapper.IEngineerLogMapper; +import com.zilber.boot.intelligencesite.mapper.ISafeMapper; +import com.zilber.boot.intelligencesite.service.IISafeService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 安全教育 服务实现类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Service +public class ISafeServiceImpl extends ServiceImpl implements IISafeService { + + @Resource + private ISafeMapper iSafeMapper; + + @Override + public List queryList(ISafe iSafe) { + return iSafeMapper.queryList(iSafe); + } +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/impl/IUserServiceImpl.java b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IUserServiceImpl.java new file mode 100644 index 0000000..dce1e7d --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IUserServiceImpl.java @@ -0,0 +1,32 @@ +package com.zilber.boot.intelligencesite.service.impl; + +import com.zilber.boot.intelligencesite.entity.IEngineerLog; +import com.zilber.boot.intelligencesite.entity.IUser; +import com.zilber.boot.intelligencesite.mapper.IEngineerLogMapper; +import com.zilber.boot.intelligencesite.mapper.IUserMapper; +import com.zilber.boot.intelligencesite.service.IIUserService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 实名制与信息管理 服务实现类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Service +public class IUserServiceImpl extends ServiceImpl implements IIUserService { + + @Resource + private IUserMapper iUserMapper; + + @Override + public List queryList(IUser iUser) { + return iUserMapper.queryList(iUser); + } +} diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/impl/IWarnServiceImpl.java b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IWarnServiceImpl.java new file mode 100644 index 0000000..ff86714 --- /dev/null +++ b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IWarnServiceImpl.java @@ -0,0 +1,32 @@ +package com.zilber.boot.intelligencesite.service.impl; + +import com.zilber.boot.intelligencesite.entity.IEngineerLog; +import com.zilber.boot.intelligencesite.entity.IWarn; +import com.zilber.boot.intelligencesite.mapper.IEngineerLogMapper; +import com.zilber.boot.intelligencesite.mapper.IWarnMapper; +import com.zilber.boot.intelligencesite.service.IIWarnService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + *

+ * 预警表 服务实现类 + *

+ * + * @author lsc + * @since 2025-05-06 + */ +@Service +public class IWarnServiceImpl extends ServiceImpl implements IIWarnService { + + @Resource + private IWarnMapper iWarnMapper; + + @Override + public List queryList(IWarn iWarn) { + return iWarnMapper.queryList(iWarn); + } +} diff --git a/src/main/java/com/zilber/boot/system/controller/SysDictionaryController.java b/src/main/java/com/zilber/boot/system/controller/SysDictionaryController.java new file mode 100644 index 0000000..3ae5b72 --- /dev/null +++ b/src/main/java/com/zilber/boot/system/controller/SysDictionaryController.java @@ -0,0 +1,78 @@ +package com.zilber.boot.system.controller; + +import com.zilber.boot.annotation.Anonymous; +import com.zilber.boot.system.pojo.SysDictionary; +import com.zilber.boot.system.service.ISysDictionaryService; +import com.zilber.boot.utils.AjaxResult; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 数据字典Controller + */ +@RestController +@RequestMapping("/system/dictionary") +@Api(tags = "数据字典管理") +@Anonymous +public class SysDictionaryController { + @Autowired + private ISysDictionaryService sysDictionaryService; + + /** + * 获取数据字典列表(分页查询) + * @param sysDictionary + * @return + */ + //@PreAuthorize("@ss.hasPermi('system:dictionary:list')") + @ApiOperation(value="获取数据字典列表",notes="获取数据字典列表") + @GetMapping("/list") + public AjaxResult list(SysDictionary sysDictionary) { + /* PageHelper pageHelper = new PageHelper(); + pageHelper.startPage(pageNo, pageSize);*/ + if(sysDictionary.getParentId() == null){ + sysDictionary.setParentId(0L); + } + List list = sysDictionaryService.getList(sysDictionary); + return AjaxResult.success(list); + } + + + @ApiOperation("新增数据字典数据") + @PostMapping + public AjaxResult add(@RequestBody SysDictionary sysDictionary){ + try { + if(sysDictionaryService.addDict(sysDictionary)){ + return AjaxResult.success(); + }else { + return AjaxResult.error(); + } + }catch (Exception e){ + e.printStackTrace(); + return AjaxResult.error(e.getMessage()); + } + } + + @ApiOperation("修改数据字典数据") + @PutMapping + public AjaxResult update(@RequestBody SysDictionary sysDictionary){ + return AjaxResult.success(sysDictionaryService.updateById(sysDictionary)); + } + + @ApiOperation("删除数据字典数据") + @DeleteMapping("/{id}") + public AjaxResult delete(@PathVariable Long id){ + return AjaxResult.success(sysDictionaryService.delDict(id)); + } + + @ApiOperation("根据id获取字典数据") + @GetMapping("/{id}") + public AjaxResult getById(@PathVariable Long id){ + return AjaxResult.success(sysDictionaryService.getById(id)); + } + + +} diff --git a/src/main/java/com/zilber/boot/system/dao/SysDictionaryMapper.java b/src/main/java/com/zilber/boot/system/dao/SysDictionaryMapper.java new file mode 100644 index 0000000..315658d --- /dev/null +++ b/src/main/java/com/zilber/boot/system/dao/SysDictionaryMapper.java @@ -0,0 +1,15 @@ +package com.zilber.boot.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zilber.boot.system.pojo.SysDictionary; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface SysDictionaryMapper extends BaseMapper { + + List getList(SysDictionary sysDictionary); + + +} diff --git a/src/main/java/com/zilber/boot/system/pojo/SysDictionary.java b/src/main/java/com/zilber/boot/system/pojo/SysDictionary.java new file mode 100644 index 0000000..66c1e9c --- /dev/null +++ b/src/main/java/com/zilber/boot/system/pojo/SysDictionary.java @@ -0,0 +1,75 @@ +package com.zilber.boot.system.pojo; + +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 java.util.List; + +@ApiModel(value = "系统数据字典",description = "包含系统分类管理") +@TableName("sys_dictionary") +@Data +public class SysDictionary { + + @ApiModelProperty(name = "自增ID",notes = "") + @TableId(type = IdType.AUTO) + private Long id ; + + /** 字典编码 */ + @ApiModelProperty(name = "字典编码",notes = "") + private String code ; + + /** 字典名称 */ + @ApiModelProperty(name = "字典名称",notes = "") + private String name ; + + /** 字典值 */ + @ApiModelProperty(name = "字典值",notes = "") + private String value ; + + /** 字典描述 */ + @ApiModelProperty(name = "字典描述",notes = "") + private String remark ; + + /** 字典级别 */ + @ApiModelProperty(name = "字典级别",notes = "") + private Integer level ; + + /** 多层级字典路径 */ + @ApiModelProperty(name = "多层级字典路径",notes = "") + private String path ; + + /** 父级节点ID */ + @ApiModelProperty(name = "父级节点ID",notes = "") + private Long parentId ; + + /** 关联业务编码 */ + @ApiModelProperty(name = "关联业务编码",notes = "") + private String contactCode ; + + /** 删除标识 0=删除;1=生效 */ + @ApiModelProperty(name = "删除标识 0=删除;1=生效",notes = "") + private Integer isDel = 1; + + /** 排序 */ + @ApiModelProperty(name = "排序",notes = "") + private Integer sort ; + + @ApiModelProperty(name = "子节点",notes = "") + @TableField(exist = false) + private List subSysDictionaryList; + + @ApiModelProperty(name = "父节点",notes = "") + @TableField(exist = false) + private SysDictionary parentSysDictionary; + + @ApiModelProperty(name = "导入附件-ID", notes = "") + @TableField(exist = false) + private Long fileId; + + +} diff --git a/src/main/java/com/zilber/boot/system/service/ISysDictionaryService.java b/src/main/java/com/zilber/boot/system/service/ISysDictionaryService.java new file mode 100644 index 0000000..c115104 --- /dev/null +++ b/src/main/java/com/zilber/boot/system/service/ISysDictionaryService.java @@ -0,0 +1,17 @@ +package com.zilber.boot.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.zilber.boot.system.pojo.SysDictionary; + +import java.util.List; + +public interface ISysDictionaryService extends IService { + + boolean addDict(SysDictionary sysDictionary) throws Exception; + + int delDict(Long id); + + List getList(SysDictionary sysDictionary); + + +} diff --git a/src/main/java/com/zilber/boot/system/service/impl/SysDictionaryServiceImpl.java b/src/main/java/com/zilber/boot/system/service/impl/SysDictionaryServiceImpl.java new file mode 100644 index 0000000..af15397 --- /dev/null +++ b/src/main/java/com/zilber/boot/system/service/impl/SysDictionaryServiceImpl.java @@ -0,0 +1,61 @@ +package com.zilber.boot.system.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zilber.boot.file.dao.FileDao; +import com.zilber.boot.system.dao.SysDictionaryMapper; +import com.zilber.boot.system.pojo.SysDictionary; +import com.zilber.boot.system.service.ISysDictionaryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +@Service +public class SysDictionaryServiceImpl extends ServiceImpl implements ISysDictionaryService { + @Autowired + private SysDictionaryMapper sysDictionaryMapper; + + @Value("${zilberboot.profile}") + private String localtion; + + @Autowired + private FileDao fileDao; + + + @Override + @Transactional(rollbackFor = Exception.class) + public boolean addDict(SysDictionary sysDictionary) { + sysDictionaryMapper.insert(sysDictionary); + + Long parentId = sysDictionary.getParentId(); + if(parentId != null && parentId > 0L){ + SysDictionary parentDict = getById(parentId); + if(parentDict != null){ + sysDictionary.setLevel(parentDict.getLevel() + 1); + sysDictionary.setPath(parentDict.getPath() + sysDictionary.getId()+","); + } + }else{ + sysDictionary.setParentId(0L); + sysDictionary.setLevel(1); + sysDictionary.setPath(",0,"+sysDictionary.getId()+","); + } + return updateById(sysDictionary); + } + + @Override + public int delDict(Long id) { + SysDictionary sysDictionary = new SysDictionary(); + sysDictionary.setIsDel(0); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(SysDictionary::getId, id); + return sysDictionaryMapper.update(sysDictionary, queryWrapper); + } + + @Override + public List getList(SysDictionary sysDictionary) { + return sysDictionaryMapper.getList(sysDictionary); + } +} diff --git a/src/main/java/com/zilber/boot/utils/DateUtils.java b/src/main/java/com/zilber/boot/utils/DateUtils.java index eb39b04..4533e38 100644 --- a/src/main/java/com/zilber/boot/utils/DateUtils.java +++ b/src/main/java/com/zilber/boot/utils/DateUtils.java @@ -181,4 +181,17 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault()); return Date.from(zdt.toInstant()); } + + /** + * 计算两个时间差 + */ + public static long getDatePoorByDay(Date endDate, Date nowDate) + { + long nd = 1000 * 24 * 60 * 60; + // long ns = 1000; + // 获得两个时间的毫秒时间差异 + long diff = endDate.getTime() - nowDate.getTime(); + // 计算差多少天 + return diff / nd; + } } diff --git a/src/main/resources/mappers/IConstructionReportMapper.xml b/src/main/resources/mappers/IConstructionReportMapper.xml new file mode 100644 index 0000000..36f55d1 --- /dev/null +++ b/src/main/resources/mappers/IConstructionReportMapper.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + select +id, date, cycle, plan_id, plan_name, total_progress, manpower, materials_use, equipment_operation, qs, advise, create_time, creator from i_construction_report + + + + + + + + + diff --git a/src/main/resources/mappers/IEngineerLogMapper.xml b/src/main/resources/mappers/IEngineerLogMapper.xml new file mode 100644 index 0000000..baf0ae6 --- /dev/null +++ b/src/main/resources/mappers/IEngineerLogMapper.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + select +id, date, +weather, temperature, wind, +principal_name, +principal_tel, construction_situation, other_business, create_time, creator from i_engineer_log + + + + + + diff --git a/src/main/resources/mappers/IManpowerMapper.xml b/src/main/resources/mappers/IManpowerMapper.xml new file mode 100644 index 0000000..b40628b --- /dev/null +++ b/src/main/resources/mappers/IManpowerMapper.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + select +id, name, work_type, +quantity, plan_devote_time, actual_devote_time, leave_time, create_time, creator from i_manpower + + + + + + + + + + + diff --git a/src/main/resources/mappers/IMaterialsMapper.xml b/src/main/resources/mappers/IMaterialsMapper.xml new file mode 100644 index 0000000..a30b91b --- /dev/null +++ b/src/main/resources/mappers/IMaterialsMapper.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + select +id, name, specification, unit, plan_need, actual_in, surplus, supplier_name, purchase_time, plan_use_time, create_time, creator from i_materials + + + + + + + + diff --git a/src/main/resources/mappers/IProductionPlanMapper.xml b/src/main/resources/mappers/IProductionPlanMapper.xml new file mode 100644 index 0000000..6dc8f61 --- /dev/null +++ b/src/main/resources/mappers/IProductionPlanMapper.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + select +id, plan_name, project_stage, description, start_time, end_time, create_time, creator, duration, keystage_time, principal from i_production_plan + + + + + + + + + + diff --git a/src/main/resources/mappers/IProgressMapper.xml b/src/main/resources/mappers/IProgressMapper.xml new file mode 100644 index 0000000..94de22b --- /dev/null +++ b/src/main/resources/mappers/IProgressMapper.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + select +id, plan_id, plan_name, day_progress, accumulative_progress, create_time, creator from i_progress + + + + + + + + + + + diff --git a/src/main/resources/mappers/IResourceScheduleMapper.xml b/src/main/resources/mappers/IResourceScheduleMapper.xml new file mode 100644 index 0000000..a78d37e --- /dev/null +++ b/src/main/resources/mappers/IResourceScheduleMapper.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + select +id, plan_id, plan_name, start_time, end_time, create_time, creator, current_progress, advise from i_resource_schedule + + + + + + + diff --git a/src/main/resources/mappers/ISafeMapper.xml b/src/main/resources/mappers/ISafeMapper.xml new file mode 100644 index 0000000..3875dd5 --- /dev/null +++ b/src/main/resources/mappers/ISafeMapper.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + select +id, name, date, create_time, creator from i_safe + + + + + + + + diff --git a/src/main/resources/mappers/IUserMapper.xml b/src/main/resources/mappers/IUserMapper.xml new file mode 100644 index 0000000..8353d5e --- /dev/null +++ b/src/main/resources/mappers/IUserMapper.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + select +id, name, tel, id_card, work_type, create_time, creator from i_user + + + + + + + + + diff --git a/src/main/resources/mappers/IWarnMapper.xml b/src/main/resources/mappers/IWarnMapper.xml new file mode 100644 index 0000000..510cd0c --- /dev/null +++ b/src/main/resources/mappers/IWarnMapper.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + select +id, plan_id, plan_name, deviation_type, deviation_days, warn_info, create_time, creator from i_warn + + + + + + + +