From 6beedebf98e211de93d6b465fdcd6986665d9c83 Mon Sep 17 00:00:00 2001 From: du <1725534722@qq.com> Date: Wed, 3 Jul 2024 15:54:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=99=BA=E8=83=BD=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BmsTemplateInfoController.java | 2 +- .../BmsTemplateRecordController.java | 4 +- .../dto/BmsEnterpriseBasicInfoAddDto.java | 18 +- .../mapper/BmsDeclarationRecordsMapper.java | 8 + .../jjh/declaration/regular/TimeChange.java | 127 ++++++++++++++ .../IBmsDeclarationRecordsService.java | 8 +- .../impl/BmsBigStrongAwardServiceImpl.java | 4 +- .../impl/BmsBrandingAwardServiceImpl.java | 4 +- ...msCarrierConstructionAwardServiceImpl.java | 4 +- .../impl/BmsCreditManagementServiceImpl.java | 4 +- .../BmsDeclarationRecordsServiceImpl.java | 13 +- ...BmsIndustrialInternetAwardServiceImpl.java | 4 +- .../BmsIntegrationIndustriesServiceImpl.java | 4 +- ...sLogisticsDevelopmentAwardServiceImpl.java | 4 +- ...ManufacturingServicesAwardServiceImpl.java | 4 +- .../impl/BmsOutQuitProductsServiceImpl.java | 4 +- ...sPlatformConstructionAwardServiceImpl.java | 4 +- .../BmsProjectSettlementAwardServiceImpl.java | 4 +- .../impl/BmsSceneOpeningAwardServiceImpl.java | 4 +- .../controller/JSmartRemindersController.java | 160 +++++++++++++++--- .../jjh/ent/entity/HomeRequestSmart.java | 91 ++++++++++ .../com/ruoyi/jjh/ent/entity/JProject.java | 9 + .../jjh/ent/entity/JSmartDeclaration.java | 92 ++++++++++ .../ruoyi/jjh/ent/entity/JSmartReminders.java | 11 +- .../ent/entity/request/JSmartRemindersDq.java | 73 ++++++++ .../entity/request/JSmartRemindersNDq.java | 69 ++++++++ .../ent/mapper/JSmartDeclarationMapper.java | 32 ++++ .../jjh/ent/mapper/JSmartRemindersMapper.java | 4 + .../ent/service/JSmartDeclarationService.java | 32 ++++ .../ent/service/JSmartRemindersService.java | 32 +++- .../impl/JSmartDeclarationServiceImpl.java | 41 +++++ .../impl/JSmartRemindersServiceImpl.java | 117 +++++++++++-- .../src/main/resources/application-druid.yml | 1 + .../BmsDeclarationRecordsMapper.xml | 10 ++ .../jjh/ent/JSmartDeclarationMapper.xml | 60 +++++++ .../mapper/jjh/ent/JSmartRemindersMapper.xml | 3 + .../framework/config/SecurityConfig.java | 3 +- .../resources/mapper/system/SysUserMapper.xml | 3 + 38 files changed, 979 insertions(+), 92 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/HomeRequestSmart.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/JSmartDeclaration.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/request/JSmartRemindersDq.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/request/JSmartRemindersNDq.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/mapper/JSmartDeclarationMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/JSmartDeclarationService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/impl/JSmartDeclarationServiceImpl.java create mode 100644 ruoyi-admin/src/main/resources/mapper/jjh/ent/JSmartDeclarationMapper.xml diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsTemplateInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsTemplateInfoController.java index 9b82845..f702e4b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsTemplateInfoController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsTemplateInfoController.java @@ -87,7 +87,7 @@ public class BmsTemplateInfoController extends BaseController { /** * 获取申报模板信息详细信息 */ - @PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')") + @PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(bmsTemplateInfoService.selectBmsTemplateInfoById(id)); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsTemplateRecordController.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsTemplateRecordController.java index e5c8519..4600da0 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsTemplateRecordController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsTemplateRecordController.java @@ -90,7 +90,7 @@ public class BmsTemplateRecordController extends BaseController { * 获取在线模板详细信息 */ @ApiOperation(value = "获取在线模板详细信息") - @PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')") + @PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(bmsTemplateRecordService.selectBmsTemplateRecordById(id)); @@ -113,7 +113,7 @@ public class BmsTemplateRecordController extends BaseController { * 修改在线模板 */ @ApiOperation(value = "修改在线模板") - @PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')") + @PreAuthorize("@ss.hasAnyRoles('admin')") @Log(title = "在线模板", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody BmsTemplateRecordUpdateDto bmsTemplateRecordUpdateDto) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/dto/BmsEnterpriseBasicInfoAddDto.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/dto/BmsEnterpriseBasicInfoAddDto.java index 7b56909..06e37cd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/dto/BmsEnterpriseBasicInfoAddDto.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/dto/BmsEnterpriseBasicInfoAddDto.java @@ -20,23 +20,7 @@ public class BmsEnterpriseBasicInfoAddDto implements Serializable { @Excel(name = "企业统一信用代码") @ApiModelProperty(value = "企业统一信用代码") - private String creditCode; - - @Excel(name = "企业名称") - @ApiModelProperty(value = "企业名称") - private String enterpriseName; - - @Excel(name = "联系人") - @ApiModelProperty(value = "联系人") - private String contacts; - - @Excel(name = "联系人电话") - @ApiModelProperty(value = "联系人电话") - private String contactsNumber; - - @Excel(name = "企业地址") - @ApiModelProperty(value = "企业地址") - private String address; + private String tyshxydm; @ApiModelProperty(value = "在线申报模版id") private int templateRecordId; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/mapper/BmsDeclarationRecordsMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/mapper/BmsDeclarationRecordsMapper.java index c009515..c2048cf 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/mapper/BmsDeclarationRecordsMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/mapper/BmsDeclarationRecordsMapper.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.jjh.declaration.entity.BmsDeclarationRecords; import com.ruoyi.jjh.declaration.entity.dto.ApprovalDeclarationRecordsQueryDto; import com.ruoyi.jjh.declaration.entity.dto.BmsDeclarationRecordsDto; +import com.ruoyi.jjh.ent.entity.JSmartDeclaration; import com.ruoyi.jjh.declaration.entity.vo.ApprovalDeclarationRecordsQueryVo; import com.ruoyi.jjh.declaration.entity.vo.BmsDeclarationRecordsQueryVo; import com.ruoyi.jjh.declaration.entity.vo.BmsMunicipalBureauReviewQueryVo; @@ -90,4 +91,11 @@ public interface BmsDeclarationRecordsMapper extends BaseMapper selectET(@Param("templateId") Long templateId, @Param("list") List list); + + + /** + * 申报模板不限时并且未填报的 + * @return + */ + List allNoLimited(); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/regular/TimeChange.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/regular/TimeChange.java index 8c5acff..a65b884 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/regular/TimeChange.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/regular/TimeChange.java @@ -1,18 +1,29 @@ package com.ruoyi.jjh.declaration.regular; +import cn.hutool.core.bean.BeanUtil; import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpResponse; import cn.hutool.json.JSONArray; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; +import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.jjh.declaration.entity.BmsEnterpriseBasicInfo; import com.ruoyi.jjh.declaration.entity.BmsTemplateInfo; import com.ruoyi.jjh.declaration.entity.BmsTemplateRecord; +import com.ruoyi.jjh.declaration.service.IBmsDeclarationRecordsService; import com.ruoyi.jjh.declaration.service.IBmsEnterpriseBasicInfoService; import com.ruoyi.jjh.declaration.service.IBmsTemplateInfoService; import com.ruoyi.jjh.declaration.service.IBmsTemplateRecordService; import com.ruoyi.jjh.ent.entity.JContacts; +import com.ruoyi.jjh.ent.entity.JProject; +import com.ruoyi.jjh.ent.entity.JSmartDeclaration; +import com.ruoyi.jjh.ent.entity.JSmartReminders; import com.ruoyi.jjh.ent.service.JContactsService; +import com.ruoyi.jjh.ent.service.JProjectService; +import com.ruoyi.jjh.ent.service.JSmartDeclarationService; +import com.ruoyi.jjh.ent.service.JSmartRemindersService; +import com.ruoyi.system.mapper.SysUserMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; @@ -21,6 +32,7 @@ import org.springframework.scheduling.annotation.Scheduled; import javax.annotation.Resource; import java.time.LocalDate; +import java.time.LocalDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -65,6 +77,31 @@ public class TimeChange { @Autowired private IBmsEnterpriseBasicInfoService bmsEnterpriseBasicInfoService; + /** + * 智能提醒 + */ + @Resource + private JSmartRemindersService jSmartRemindersService; + + /** + * 智能提醒关联表 + */ + @Resource + private JSmartDeclarationService jSmartDeclarationService; + + /** + * 企业申报记录 + */ + @Resource + private IBmsDeclarationRecordsService bmsDeclarationRecordsService; + + + /** + * 人员 + */ + @Resource + private SysUserMapper sysUserMapper; + /** * 根据每天的日期修改模板的状态 */ @@ -84,6 +121,12 @@ public class TimeChange { bmsTemplateInfoService.updateBatchById(list); } + /** + * 项目表 + */ + @Resource + private JProjectService jProjectService; + public void getTime(BmsTemplateRecord items) { LocalDate currentDate = LocalDate.now(); LocalDate startDate = LocalDate.of(items.getStartTime().getYear(), items.getStartTime().getMonth(), items.getStartTime().getDayOfMonth()); @@ -189,4 +232,88 @@ public class TimeChange { } } } + + + /** + * 定时定期提醒 + */ + @Scheduled(cron = "0 20 1 * * *") + public void changeDq() { + //定时提醒 + List list = jSmartRemindersService.lambdaQuery().eq(JSmartReminders::getAlertManner, 1).list(); + List listAdd = new ArrayList<>(); + //删除不在今天的定时提醒 + list.removeIf(x -> !(LocalDate.now().equals(x.getAlertTime().toLocalDate()))); + list.forEach(y -> { + if (y.getAlertRecipients() == 1) { + bmsEnterpriseBasicInfoService.list().forEach(x -> { + JSmartDeclaration sd = new JSmartDeclaration(); + sd.setAlertTime(y.getAlertTime()); + sd.setIsRead(1); + sd.setSmartRemindersId(y.getId()); + sd.setTyshxydm(x.getTyshxydm()); + listAdd.add(sd); + }); + } else if (y.getAlertRecipients() == 2) { + SysUser user = new SysUser(); + user.setUserType("02"); + sysUserMapper.selectUserList(user).forEach(x -> { + JSmartDeclaration sd = new JSmartDeclaration(); + sd.setIsRead(1); + sd.setAlertTime(y.getAlertTime()); + sd.setSmartRemindersId(y.getId()); + sd.setProjectId(y.getProjectId()); + sd.setZwId(x.getUserId()); + listAdd.add(sd); + }); + } + }); + jSmartDeclarationService.saveBatch(listAdd); + } + + /** + * 定时不定期提醒 + */ + @Scheduled(cron = "0 40 1 * * *") + public void changeNdq() { + //前端已经去除修改在线模板,所以开始时间和结束时间不会进行更改,未作声明何种状态下删除该条不定期提醒,故不做 + //获取企业的不定时提醒 + JSmartReminders qy = jSmartRemindersService.getById(1); + //获取政务的不定时提醒 + JSmartReminders zw = jSmartRemindersService.getById(2); + //查询所有企业申报记录,对应的申报模板不是长期有效并且申报记录未填的, + List bmsDeclarationRecords = bmsDeclarationRecordsService.allNoLimited(); + //如果当前时间在该申报模板的结束时间前自定义的提前天数之前,就去掉 + bmsDeclarationRecords.removeIf(x -> + !(LocalDateTime.now().isAfter(x.getEndTime().minusDays(qy.getDaysAdvance())) + && LocalDateTime.now().isBefore(x.getEndTime()) + ) || !(LocalDate.now().equals(x.getEndTime().minusDays(qy.getDaysAdvance()).toLocalDate())) + ); + bmsDeclarationRecords.forEach(y -> { + y.setSmartRemindersId(1L); + y.setIsRead(1); + y.setAlertTime(y.getEndTime().minusDays(qy.getDaysAdvance())); + }); + + List jp = jProjectService.lambdaQuery().isNotNull(JProject::getProjectEndTime).list(); + jp.removeIf(x -> + !(LocalDateTime.now().isAfter(x.getProjectEndTime().minusDays(zw.getDaysAdvance())) + && LocalDateTime.now().isBefore(x.getProjectEndTime()) + ) || !(LocalDate.now().equals(x.getProjectEndTime().minusDays(zw.getDaysAdvance()).toLocalDate())) + ); + jp.forEach(x -> { + SysUser user = new SysUser(); + user.setUserType("02"); + sysUserMapper.selectUserList(user).forEach(o -> { + JSmartDeclaration y = new JSmartDeclaration(); + y.setSmartRemindersId(2L); + y.setIsRead(1); + y.setAlertTime(x.getProjectEndTime().minusDays(zw.getDaysAdvance())); + y.setProjectId(x.getId()); + y.setZwId(o.getUserId()); + bmsDeclarationRecords.add(y); + }); + }); + jSmartDeclarationService.saveBatch(bmsDeclarationRecords); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/IBmsDeclarationRecordsService.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/IBmsDeclarationRecordsService.java index b80f1dd..413030c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/IBmsDeclarationRecordsService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/IBmsDeclarationRecordsService.java @@ -2,8 +2,8 @@ package com.ruoyi.jjh.declaration.service; import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.jjh.declaration.entity.BmsDeclarationRecords; -import com.ruoyi.jjh.declaration.entity.BmsEnterpriseDirectory; import com.ruoyi.jjh.declaration.entity.dto.*; +import com.ruoyi.jjh.ent.entity.JSmartDeclaration; import com.ruoyi.jjh.declaration.entity.vo.ApprovalDeclarationRecordsQueryVo; import com.ruoyi.jjh.declaration.entity.vo.BmsDeclarationRecordsQueryVo; import com.ruoyi.jjh.declaration.entity.vo.BmsMunicipalBureauReviewQueryVo; @@ -102,4 +102,10 @@ public interface IBmsDeclarationRecordsService extends IService selectET(Long templateId,List list); + + /** + * 申报模板不限时并且未填报的 + * @return + */ + List allNoLimited(); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsBigStrongAwardServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsBigStrongAwardServiceImpl.java index 010911e..93d5672 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsBigStrongAwardServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsBigStrongAwardServiceImpl.java @@ -82,9 +82,9 @@ public class BmsBigStrongAwardServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("credit_code", creditCode); + queryWrapper.eq("tyshxydm", creditCode); BmsEnterpriseBasicInfo one = iBmsEnterpriseBasicInfoService.getOne(queryWrapper); declarationRecordsVo.setBmsEnterpriseBasicInfo(one); @@ -700,4 +701,14 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl selectET(Long templateId, List list) { return baseMapper.selectET(templateId,list); } + + + /** + * 申报模板不限时并且未填报的 + * @return + */ + @Override + public List allNoLimited() { + return baseMapper.allNoLimited(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsIndustrialInternetAwardServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsIndustrialInternetAwardServiceImpl.java index b9874ee..32d2994 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsIndustrialInternetAwardServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsIndustrialInternetAwardServiceImpl.java @@ -75,10 +75,10 @@ public class BmsIndustrialInternetAwardServiceImpl extends ServiceImpl page, JSmartReminders jSmartReminders) { return success(jSmartRemindersService.page(page, jSmartReminders)); @@ -47,44 +146,59 @@ public class JSmartRemindersController extends BaseController { /** - * 通过主键查询单条数据 + * 通过主键查询单条智能提醒规则数据 * * @param id 主键 * @return 单条数据 */ // @PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')") - @ApiOperation(value = "通过主键查询单条数据", response = JSmartReminders.class) + @ApiOperation(value = "通过主键查询单条智能提醒规则数据", response = JSmartReminders.class) @GetMapping("{id}") public AjaxResult selectOne(@PathVariable Serializable id) { return success(jSmartRemindersService.getById(id)); } /** - * 新增数据 + * 新增定期提醒数据(政务端和企业端) * - * @param jSmartReminders 实体对象 + * @param jSmartRemindersDq 实体对象 * @return 新增结果 */ -// @PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')") - @ApiOperation(value = "新增数据") + @PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent')") + @ApiOperation(value = "新增定期提醒数据(政务端和企业端)") @PostMapping - public AjaxResult insert(@RequestBody JSmartReminders jSmartReminders) { - return success(jSmartRemindersService.add(jSmartReminders)); + public AjaxResult insertDs(@RequestBody @Valid JSmartRemindersDq jSmartRemindersDq) { + return success(jSmartRemindersService.add(jSmartRemindersDq)); } + /** - * 修改数据 + * 修改定期提醒数据 * - * @param jSmartReminders 实体对象 + * @param dq 实体对象 * @return 修改结果 */ // @PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')") - @ApiOperation(value = "修改数据") - @PutMapping - public AjaxResult update(@RequestBody JSmartReminders jSmartReminders) { - return success(jSmartRemindersService.updateById(jSmartReminders)); + @ApiOperation(value = "修改定期提醒数据") + @PutMapping("/updateDq") + public AjaxResult updateDq(@RequestBody @Valid JSmartRemindersDq dq) { + return success(jSmartRemindersService.updateDq(dq)); } + /** + * 修改不定期提醒数据 + * + * @param ndq 实体对象 + * @return 修改结果 + */ +// @PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')") + @ApiOperation(value = "修改不定期提醒数据") + @PutMapping("/updateNdq") + public AjaxResult updateNdq(@RequestBody @Valid JSmartRemindersNDq ndq) { + return success(jSmartRemindersService.updateNdq(ndq)); + } + + /** * 删除数据 * @@ -95,6 +209,10 @@ public class JSmartRemindersController extends BaseController { @ApiOperation(value = "删除数据") @DeleteMapping public AjaxResult delete(@RequestParam("id") Long id) { + JSmartReminders js = jSmartRemindersService.getById(id); + if (js.getAlertManner() == 2) { + throw new ServiceException("不定期提醒不允许删除"); + } return success(jSmartRemindersService.removeById(id)); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/HomeRequestSmart.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/HomeRequestSmart.java new file mode 100644 index 0000000..0ea2e61 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/HomeRequestSmart.java @@ -0,0 +1,91 @@ +package com.ruoyi.jjh.ent.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +/** + * 首页智能提醒数据返回体 + * @author du + * @since 2024/7/1 19:29 + */ +@Data +@ApiModel("首页智能提醒数据返回体") +public class HomeRequestSmart { + + /** + * id + */ + @ApiModelProperty("id") + private Long id; + + /** + * 申报记录id + */ + @ApiModelProperty("申报记录id") + private Long declarationId; + + + /** + * 申报记录名称 + */ + @ApiModelProperty("申报记录名称") + private String declarationName; + + /** + * 是否已读 + */ + @ApiModelProperty("是否已读 1未读 2已读") + private Integer isRead; + + /** + * 统一社会信用代码 + */ + @ApiModelProperty("统一社会信用代码") + private String tyshxydm; + + /** + * 提醒对象 1.企业用户 2政务用户 + */ + @ApiModelProperty("提醒对象 1.企业用户 2政务用户") + private Integer alertRecipients; + + /** + * 提醒方式 1.定时提醒 2.不定时提醒 + */ + @ApiModelProperty("提醒方式 1.定期提醒 2.不定期提醒") + private Integer alertManner; + + /** + * 提醒时间 + */ + @ApiModelProperty("提醒时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime alertTime; + + /** + * 提前天数提醒 + */ + @ApiModelProperty("提前天数提醒") + private Integer daysAdvance; + + /** + * 提醒内容 + */ + @ApiModelProperty("提醒内容") + private String alertContent; + + /** + * 项目ID + */ + @ApiModelProperty("项目ID") + private String projectId; + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/JProject.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/JProject.java index 664a93f..dd66263 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/JProject.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/JProject.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; import java.util.Date; /** @@ -84,6 +85,14 @@ public class JProject{ @ApiModelProperty("状态") private Integer status; + /** + * 项目结束时间 + */ + @ApiModelProperty("项目结束时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime projectEndTime; + /** * 创建ID */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/JSmartDeclaration.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/JSmartDeclaration.java new file mode 100644 index 0000000..5b5d5f3 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/JSmartDeclaration.java @@ -0,0 +1,92 @@ +package com.ruoyi.jjh.ent.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +/** + * 企业端首页智能提醒数据返回体 + * @author du + * @since 2024/7/1 19:29 + */ +@Data +@ApiModel("企业端首页智能提醒返回体") +public class JSmartDeclaration { + + /** + * Id + */ + @TableId(value = "id", type = IdType.AUTO) + @ApiModelProperty("Id") + private Long id; + + + /** + * 申报记录id + */ + @ApiModelProperty("申报记录id") + private Long declarationId; + + /** + * 智能提醒id + */ + @ApiModelProperty("智能提醒id") + private Long smartRemindersId; + + /** + * 在线模板开始时间 + */ + @ApiModelProperty("在线模板开始时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime startTime; + + /** + * 在线模板结束时间 + */ + @ApiModelProperty("在线模板结束时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime endTime; + + /** + * 提醒时间 + */ + @ApiModelProperty("提醒时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime alertTime; + + + /** + * 是否已读 + */ + @ApiModelProperty("是否已读 1未读 2已读") + private Integer isRead; + + /** + * 统一社会信用代码 + */ + @ApiModelProperty("统一社会信用代码") + private String tyshxydm; + + /** + * 项目ID + */ + @ApiModelProperty("项目ID") + private Long projectId; + + + /** + * 政务用户id + */ + @ApiModelProperty("政务用户id") + private Long zwId; + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/JSmartReminders.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/JSmartReminders.java index abf6838..4846868 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/JSmartReminders.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/JSmartReminders.java @@ -8,7 +8,6 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; -import javax.validation.constraints.NotNull; import java.time.LocalDateTime; /** @@ -31,21 +30,18 @@ public class JSmartReminders extends BaseInfoEntity { /** * 规则名称 */ - @NotNull @ApiModelProperty("规则名称") private String rulesName; /** * 提醒对象 1.企业用户 2政务用户 */ - @NotNull @ApiModelProperty("提醒对象 1.企业用户 2政务用户") private Integer alertRecipients; /** * 提醒方式 1.定时提醒 2.不定时提醒 */ - @NotNull @ApiModelProperty("提醒方式 1.定期提醒 2.不定期提醒") private Integer alertManner; @@ -69,6 +65,13 @@ public class JSmartReminders extends BaseInfoEntity { @ApiModelProperty("提前天数提醒") private Integer daysAdvance; + /** + * 项目id + */ + @ApiModelProperty("项目id") + private Long projectId; + + /** * 提醒内容 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/request/JSmartRemindersDq.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/request/JSmartRemindersDq.java new file mode 100644 index 0000000..f491dc4 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/request/JSmartRemindersDq.java @@ -0,0 +1,73 @@ +package com.ruoyi.jjh.ent.entity.request; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.time.LocalDateTime; + +/** + * 定期提醒实体类 + * @author du + * @since 2024/7/1 15:56 + */ +@Data +@ApiModel("定期提醒") +public class JSmartRemindersDq { + + + /** + * Id + */ + @ApiModelProperty("Id") + private Long id; + + /** + * 规则名称 + */ + @NotBlank + @ApiModelProperty("规则名称") + private String rulesName; + + /** + * 提醒对象 1.企业用户 2政务用户 + */ + @NotNull + @ApiModelProperty("提醒对象 1.企业用户 2政务用户") + private Integer alertRecipients; + + /** + * 提醒方式 1.定时提醒 2.不定时提醒 + */ + @NotNull + @ApiModelProperty("提醒方式 1.定期提醒 2.不定期提醒") + private Integer alertManner; + + /** + * 提醒时间 yyyy-MM-dd HH:mm:ss + */ + @NotNull + @ApiModelProperty("提醒时间 yyyy-MM-dd HH:mm:ss") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime alertTime; + + /** + * 提醒内容 + */ + @NotBlank + @ApiModelProperty("提醒内容") + private String alertContent; + + /** + * 项目id 非必传 + */ + @ApiModelProperty("项目id 非必传") + private String projectId; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/request/JSmartRemindersNDq.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/request/JSmartRemindersNDq.java new file mode 100644 index 0000000..1e9bb8a --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/request/JSmartRemindersNDq.java @@ -0,0 +1,69 @@ +package com.ruoyi.jjh.ent.entity.request; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.time.LocalDateTime; + +/** + * 不定期提醒实体类 + * @author du + * @since 2024/7/1 15:56 + */ +@Data +@ApiModel("不定期提醒") +public class JSmartRemindersNDq { + + /** + * Id + */ + @ApiModelProperty("Id") + private Long id; + + /** + * 规则名称 + */ + @NotBlank + @ApiModelProperty("规则名称") + private String rulesName; + + /** + * 提醒对象 1.企业用户 2政务用户 + */ + @NotNull + @ApiModelProperty("提醒对象 1.企业用户 2政务用户") + private Integer alertRecipients; + + /** + * 提醒方式 1.定时提醒 2.不定时提醒 + */ + @NotNull + @ApiModelProperty("提醒方式 1.定期提醒 2.不定期提醒") + private Integer alertManner; + + /** + * 提醒分类 1.申报任务即将结束(企业) 2项目即将建设完成(政务) + */ + @NotNull + @ApiModelProperty("提醒分类 1.申报任务即将结束(企业) 2项目即将建设完成(政务)") + private Integer alertType; + + /** + * 提前天数提醒 + */ + @NotNull + @ApiModelProperty("提前天数提醒") + private Integer daysAdvance; + + /** + * 提醒内容 + */ + @NotBlank + @ApiModelProperty("提醒内容") + private String alertContent; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/mapper/JSmartDeclarationMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/mapper/JSmartDeclarationMapper.java new file mode 100644 index 0000000..d481dea --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/mapper/JSmartDeclarationMapper.java @@ -0,0 +1,32 @@ +package com.ruoyi.jjh.ent.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.jjh.ent.entity.HomeRequestSmart; +import com.ruoyi.jjh.ent.entity.JSmartDeclaration; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 智能提醒关联表(j_smart_declaration)表数据访问层 + * + * @author makejava + * @since 2024-03-25 11:49:34 + */ +public interface JSmartDeclarationMapper extends BaseMapper { + + /** + * 企业端首页智能提醒查询所有数据 + * + * @return 所有数据 + */ + List selectEnterpriseAllList(@Param("userName") String userName); + + /** + * 政务端首页智能提醒查询所有数据 + * + * @return 所有数据 + */ + List chiefAll(@Param("userId") Long userId,@Param("projectId") Long projectId); +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/mapper/JSmartRemindersMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/mapper/JSmartRemindersMapper.java index d269760..b4dd815 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/mapper/JSmartRemindersMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/mapper/JSmartRemindersMapper.java @@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.jjh.ent.entity.JSmartReminders; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 智能提醒(j_smart_reminders)表数据访问层 * @@ -21,5 +23,7 @@ public interface JSmartRemindersMapper extends BaseMapper { * @return 所有数据 */ Page page(Page page, @Param("req") JSmartReminders jSmartReminders); + + List selectWorkAll(); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/JSmartDeclarationService.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/JSmartDeclarationService.java new file mode 100644 index 0000000..74d0985 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/JSmartDeclarationService.java @@ -0,0 +1,32 @@ +package com.ruoyi.jjh.ent.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.jjh.ent.entity.HomeRequestSmart; +import com.ruoyi.jjh.ent.entity.JSmartDeclaration; + +import java.util.List; + + +/** + * 智能提醒关联表(j_smart_declaration)表业务层 + * @author du + * @since 2024/7/1 13:33 + */ +public interface JSmartDeclarationService extends IService { + + /** + * 企业端首页智能提醒查询所有数据 + * + * @return 所有数据 + */ + List selectEnterpriseAllList(String userName); + + + /** + * 政务端首页智能提醒查询所有数据 + * + * @return 所有数据 + */ + List chiefAll(Long userId,Long projectId); +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/JSmartRemindersService.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/JSmartRemindersService.java index 996b1b8..0c87014 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/JSmartRemindersService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/JSmartRemindersService.java @@ -3,6 +3,8 @@ package com.ruoyi.jjh.ent.service; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.jjh.ent.entity.JSmartReminders; +import com.ruoyi.jjh.ent.entity.request.JSmartRemindersDq; +import com.ruoyi.jjh.ent.entity.request.JSmartRemindersNDq; /** @@ -21,11 +23,35 @@ public interface JSmartRemindersService extends IService { Page page(Page page, JSmartReminders jSmartReminders); /** - * 新增数据 + * 新增定期提醒数据 * - * @param jSmartReminders 实体对象 + * @param jSmartRemindersDq 实体对象 * @return 新增结果 */ - int add(JSmartReminders jSmartReminders); + Long add(JSmartRemindersDq jSmartRemindersDq); + + /** + * 修改定期提醒数据 + * + * @param dq 实体对象 + * @return 修改结果 + */ + Long updateDq(JSmartRemindersDq dq); + + + /** + * 修改不定期提醒数据 + * + * @param ndq 实体对象 + * @return 修改结果 + */ + Long updateNdq(JSmartRemindersNDq ndq); + +// /** +// * 企业端首页智能提醒查询所有数据 +// * +// * @return 所有数据 +// */ +// List selectWorkAll(); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/impl/JSmartDeclarationServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/impl/JSmartDeclarationServiceImpl.java new file mode 100644 index 0000000..0d03402 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/impl/JSmartDeclarationServiceImpl.java @@ -0,0 +1,41 @@ +package com.ruoyi.jjh.ent.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.jjh.ent.entity.HomeRequestSmart; +import com.ruoyi.jjh.ent.entity.JSmartDeclaration; +import com.ruoyi.jjh.ent.mapper.JSmartDeclarationMapper; +import com.ruoyi.jjh.ent.service.JSmartDeclarationService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 智能提醒关联表(j_smart_declaration)表业务实现层 + * + * @author du + * @since 2024/7/1 13:33 + */ +@Service +public class JSmartDeclarationServiceImpl extends ServiceImpl implements JSmartDeclarationService { + + /** + * 企业端首页智能提醒查询所有数据 + * + * @return 所有数据 + */ + @Override + public List selectEnterpriseAllList(String userName) { + return baseMapper.selectEnterpriseAllList(userName); + } + + /** + * 政务端首页智能提醒查询所有数据 + * + * @return 所有数据 + */ + @Override + public List chiefAll(Long userId,Long projectId) { + return baseMapper.chiefAll(userId,projectId); + } +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/impl/JSmartRemindersServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/impl/JSmartRemindersServiceImpl.java index 675fab8..cb6583e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/impl/JSmartRemindersServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/impl/JSmartRemindersServiceImpl.java @@ -1,16 +1,19 @@ package com.ruoyi.jjh.ent.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import cn.hutool.core.bean.BeanUtil; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.common.exception.ServiceException; -import com.ruoyi.jjh.declaration.entity.BmsFundingDetail; +import com.ruoyi.jjh.declaration.service.IBmsDeclarationRecordsService; import com.ruoyi.jjh.ent.entity.JSmartReminders; +import com.ruoyi.jjh.ent.entity.request.JSmartRemindersDq; +import com.ruoyi.jjh.ent.entity.request.JSmartRemindersNDq; import com.ruoyi.jjh.ent.mapper.JSmartRemindersMapper; import com.ruoyi.jjh.ent.service.JSmartRemindersService; import org.springframework.stereotype.Service; -import java.util.List; +import javax.annotation.Resource; +import java.time.LocalDate; /** * 智能提醒(j_smart_reminders)表业务实现层 @@ -21,6 +24,10 @@ import java.util.List; @Service public class JSmartRemindersServiceImpl extends ServiceImpl implements JSmartRemindersService { + + + @Resource + private IBmsDeclarationRecordsService bmsDeclarationRecordsService; /** * 分页查询所有数据 * @@ -34,26 +41,102 @@ public class JSmartRemindersServiceImpl extends ServiceImpl list = lambdaQuery().eq(JSmartReminders::getAlertManner, 2).list(); - if (list.size() >= 2) { - throw new ServiceException("已有不定期提醒,不可新增!"); - } - if ((jSmartReminders.getAlertRecipients() == 1 && jSmartReminders.getAlertType() == 1) - || (jSmartReminders.getAlertRecipients() == 2 && jSmartReminders.getAlertType() == 2)) { - save(jSmartReminders); - } else { - throw new ServiceException("参数请求错误"); - } + throw new ServiceException("不可新增不定期提醒!"); } - return 0; + save(jSmartReminders); + return jSmartRemindersDq.getId(); } + + /** + * 修改定期提醒数据 + * + * @param jSmartRemindersDq 实体对象 + * @return 修改结果 + */ + @Override + public Long updateDq(JSmartRemindersDq jSmartRemindersDq) { + JSmartReminders jSmartReminders = new JSmartReminders(); + BeanUtil.copyProperties(jSmartRemindersDq, jSmartReminders); + if (LocalDate.now().isAfter(jSmartReminders.getAlertTime().toLocalDate()) + ||LocalDate.now().equals(jSmartReminders.getAlertTime().toLocalDate())) { + throw new ServiceException("提醒时间需设置为今天之后!"); + } + if (jSmartReminders.getAlertManner() == 2) { + throw new ServiceException("参数错误"); + } + updateById(jSmartReminders); + return jSmartRemindersDq.getId(); + } + + /** + * 修改不定期提醒数据 + * + * @param ndq 实体对象 + * @return 修改结果 + */ + @Override + public Long updateNdq(JSmartRemindersNDq ndq) { + JSmartReminders jSmartReminders = new JSmartReminders(); + BeanUtil.copyProperties(ndq, jSmartReminders); + if (jSmartReminders.getAlertManner() == 1) { + throw new ServiceException("参数错误"); + } + updateById(jSmartReminders); + return ndq.getId(); + } + +// /** +// * 企业端首页智能提醒查询所有数据 +// * +// * @return 所有数据 +// */ +// @Override +// public List selectWorkAll() { + + //获取企业的不定时提醒 +// 企业端 +// JSmartReminders qy = getById(1); +// String userName = null; +// try { +// userName = SecurityUtils.getUsername(); +// } catch (Exception ignored) { +// } + //查询当前企业申报记录,对应的申报模板不是长期有效并且申报记录未填的, +// List bmsDeclarationRecords = bmsDeclarationRecordsService.allNoLimited(userName); +// //如果当前时间在该申报模板的结束时间前自定义的提前天数之前,就去掉 +// bmsDeclarationRecords.removeIf(x -> LocalDateTime.now().isBefore(x.getEndTime().minusDays(qy.getDaysAdvance()))); +// bmsDeclarationRecords.forEach(y->{ +// y.setDaysAdvance(qy.getDaysAdvance()); +// y.setAlertTime(y.getEndTime().minusDays(qy.getDaysAdvance())); +// y.setAlertContent(qy.getAlertContent()); +// }); +// //获取企业的定时提醒 +// List list = lambdaQuery().eq(JSmartReminders::getAlertRecipients, 1).eq(JSmartReminders::getAlertManner, 1).list(); +// list.forEach(x->{ +// if(LocalDateTime.now().isAfter(x.getAlertTime())){ +// SmartGetDeclaration sd = new SmartGetDeclaration(); +// sd.setAlertContent(x.getAlertContent()); +// sd.setAlertTime(x.getAlertTime()); +// bmsDeclarationRecords.add(sd); +// } +// }); +// bmsDeclarationRecords.sort(Comparator.comparing(entity -> Math.abs(ChronoUnit.MINUTES.between(LocalDateTime.now(), entity.getAlertTime())))); +// return bmsDeclarationRecords; +// return null; +// } } diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 4297e45..c9cb3ca 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -63,5 +63,6 @@ spring: multi-statement-allow: true #自己客户端地址 returnUrl: http://39.101.188.84:9999/demo/JinJiHu +#returnUrl: http://192.168.0.114:80 #定时任务更新企业信息和联系人的开启 isTiming: false \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/jjh/declaration/BmsDeclarationRecordsMapper.xml b/ruoyi-admin/src/main/resources/mapper/jjh/declaration/BmsDeclarationRecordsMapper.xml index aaafcde..f1e58be 100644 --- a/ruoyi-admin/src/main/resources/mapper/jjh/declaration/BmsDeclarationRecordsMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/jjh/declaration/BmsDeclarationRecordsMapper.xml @@ -295,6 +295,16 @@ + + diff --git a/ruoyi-admin/src/main/resources/mapper/jjh/ent/JSmartDeclarationMapper.xml b/ruoyi-admin/src/main/resources/mapper/jjh/ent/JSmartDeclarationMapper.xml new file mode 100644 index 0000000..5a2ab69 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/jjh/ent/JSmartDeclarationMapper.xml @@ -0,0 +1,60 @@ + + + + + + diff --git a/ruoyi-admin/src/main/resources/mapper/jjh/ent/JSmartRemindersMapper.xml b/ruoyi-admin/src/main/resources/mapper/jjh/ent/JSmartRemindersMapper.xml index 1bf661d..e0b95cd 100644 --- a/ruoyi-admin/src/main/resources/mapper/jjh/ent/JSmartRemindersMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/jjh/ent/JSmartRemindersMapper.xml @@ -14,4 +14,7 @@ order by create_time desc + diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index 7b7da94..b78c5d9 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -118,7 +118,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter // .antMatchers("/common/**").permitAll() .antMatchers("/system/chief").permitAll() .antMatchers("/system/singlelogin/**").permitAll() - .antMatchers("/jjh/**").permitAll() +// .antMatchers("/jjh/**").permitAll() + diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index a938230..6be4a0f 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -105,6 +105,9 @@ AND u.status = #{status} + + AND u.user_type = #{userType} + AND u.phonenumber like concat('%', #{phonenumber}, '%')