Compare commits

...

33 Commits

Author SHA1 Message Date
杜函宇 e49b39e327 脱敏
2 months ago
杜函宇 8ccf1934aa 增加字段
2 months ago
杜函宇 19a667c43a 正式环境取消短信发送
2 months ago
杜函宇 9e29e2b043 数据大屏统计修改
2 months ago
杜函宇 5ebaee19a5 登录密码加密和登录日志
2 months ago
杜函宇 8850edfb21 增加游客权限
2 months ago
杜函宇 82fdd34ddd bugfix
2 months ago
杜函宇 9d1c0c75cc 增加游客权限
2 months ago
杜函宇 fa26e862d8 正式环境正常的用户才会收到短信
2 months ago
杜函宇 442e9873c7 项目库导出
2 months ago
杜函宇 bcee7405c2 修改新增用户
2 months ago
杜函宇 c57205254f 项目拨付资金增加字段
2 months ago
杜函宇 332aa7eaaf 审核列表修改
2 months ago
杜函宇 b86adcbf72 测试bug修改
2 months ago
杜函宇 112d7ac85b 作业台新增接口
2 months ago
杜函宇 71a772091f 修改小数点
3 months ago
杜函宇 2f8565b262 bugfix
3 months ago
杜函宇 ab6b365e51 bugfix
3 months ago
杜函宇 87a3c8bf88 脱敏数据库bugfix
3 months ago
杜函宇 ac9701509b 脱敏数据库bugfix
3 months ago
杜函宇 235603393a bugfix
3 months ago
杜函宇 b16bda3544 数据大屏数据更新
3 months ago
杜函宇 148ef346b6 bugfix
3 months ago
杜函宇 d5dc052624 严格模式
3 months ago
杜函宇 de23667e4e 修改数据大屏
3 months ago
杜函宇 392485c8d7 修改权限
3 months ago
杜函宇 dcc136434c 修改权限
3 months ago
杜函宇 1471a2695c 大屏小数点后一位
3 months ago
杜函宇 6ebcb18c74 bugfix
3 months ago
杜函宇 bf9920ed04 bugfix
3 months ago
杜函宇 53a6c8de95 Merge branch 'wushunjie' of http://39.101.188.84:7000/suzhou-jichuang-lanhai/JinJiHuJava into duhanyu
3 months ago
杜函宇 aeb869bae7 Merge branch 'duhanyu' of http://39.101.188.84:7000/suzhou-jichuang-lanhai/JinJiHuJava into duhanyu
3 months ago
杜函宇 a747c8ba5c 服务业发展报告导出
3 months ago

@ -205,6 +205,7 @@
<module>ruoyi-quartz</module>
<module>ruoyi-generator</module>
<module>ruoyi-common</module>
<module>ruoyi-flowable</module>
</modules>
<packaging>pom</packaging>

@ -16,6 +16,16 @@
</description>
<dependencies>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.17.2</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.23</version>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>

@ -107,27 +107,29 @@ public class TimingRemindImpl implements TimingRemindService {
//添加用户进表的时候手机号已经经过处理
SysUser user = new SysUser();
user.setUserType("02");
sysUserMapper.selectUserList(user).forEach(x -> {
JSmartDeclaration sd = new JSmartDeclaration();
sd.setIsRead(1);
sd.setAlertTime(LocalDateTime.parse(t));
sd.setSmartRemindersId(id);
if ("null".equals(pid)) {
sd.setProjectId(null);
} else {
sd.setProjectId(Long.valueOf(pid));
}
sd.setZwId(x.getUserId());
if (isTiming) {
if (sd.getProjectId() != null & !x.getPhonenumber().isEmpty()) {
smsAlertsService.enterSms("政府人员-" + x.getNickName(), "您有1个项目自定义通知,请前往工作台查看", x.getPhonenumber());
for (SysUser x : sysUserMapper.selectUserList(user)) {
if("0".equals(x.getDelFlag()) & "0".equals(x.getStatus())){
JSmartDeclaration sd = new JSmartDeclaration();
sd.setIsRead(1);
sd.setAlertTime(LocalDateTime.parse(t));
sd.setSmartRemindersId(id);
if ("null".equals(pid)) {
sd.setProjectId(null);
} else {
sd.setProjectId(Long.valueOf(pid));
}
if (!x.getPhonenumber().isEmpty() & sd.getProjectId() == null) {
smsAlertsService.enterSms("政府人员-" + x.getNickName(), "您有1个全局自定义通知,请前往工作台查看", x.getPhonenumber());
sd.setZwId(x.getUserId());
if (isTiming) {
if (sd.getProjectId() != null & !x.getPhonenumber().isEmpty()) {
smsAlertsService.enterSms("政府人员-" + x.getNickName(), "您有1个项目自定义通知,请前往工作台查看", x.getPhonenumber());
}
if (!x.getPhonenumber().isEmpty() & sd.getProjectId() == null) {
smsAlertsService.enterSms("政府人员-" + x.getNickName(), "您有1个全局自定义通知,请前往工作台查看", x.getPhonenumber());
}
}
listAdd.add(sd);
}
listAdd.add(sd);
});
}
jSmartDeclarationService.saveBatch(listAdd);
}
}

@ -124,7 +124,7 @@ public class BmsDeclarationRecordsController extends BaseController {
String fatherFile = fileAddress + "/" + "项目压缩文件";
FileUtil.mkdir(fatherFile);
for (BmsDeclarationRecordsQueryVo item : rd) {
String itemsFileName = fatherFile + "/" + item.getProjectName() + item.getEnterpriseName();
String itemsFileName = fatherFile + "/" +item.getEnterpriseName()+ item.getProjectName();
FileUtil.mkdir(itemsFileName);
List<String> splitList = bmsDeclarationRecordsService.getAllFile(item.getTemplateJson());
for (String s : splitList) {
@ -160,6 +160,7 @@ public class BmsDeclarationRecordsController extends BaseController {
/**
* 线-
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
@GetMapping("/listRecords")
public TableDataInfo listRecords(BmsDeclarationRecordsDto bmsDeclarationRecordsDto) {
startPage();

@ -15,6 +15,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
@ -45,7 +46,7 @@ public class BmsEnterpriseBasicInfoController extends BaseController {
/**
*
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,sightseer')")
@ApiOperation(value = "查询企业基础信息列表", response = BmsEnterpriseBasicInfo.class)
@GetMapping("/list")
public AjaxResult list(Page<BmsEnterpriseBasicInfo> page, BmsEnterpriseBasicInfo bmsEnterpriseBasicInfo) {
@ -65,7 +66,7 @@ public class BmsEnterpriseBasicInfoController extends BaseController {
/**
*
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,sightseer')")
@ApiOperation(value = "导出企业基础信息列表")
@Log(title = "企业基础信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ -78,7 +79,8 @@ public class BmsEnterpriseBasicInfoController extends BaseController {
/**
*
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@Transactional(rollbackFor = Exception.class)
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
@ApiOperation(value = "导入企业基础信息列表")
@Log(title = "导入企业基础信息列表", businessType = BusinessType.IMPORT)
@PostMapping(value = "/importEnterprise", consumes = "multipart/form-data")
@ -90,7 +92,13 @@ public class BmsEnterpriseBasicInfoController extends BaseController {
if (proList == null || proList.isEmpty()) {
throw new ServiceException("企业导入数据不能为空");
} else {
proList.removeIf(entityA -> allList.stream().anyMatch(entityB -> entityB.getTyshxydm().equals(entityA.getTyshxydm())));
proList.forEach(entityA ->{
entityA.setType(2);
boolean b = allList.stream().anyMatch(entityB -> entityB.getTyshxydm().equals(entityA.getTyshxydm()));
if(b){
throw new ServiceException(entityA.getQymc()+"在企业库已重复,无法新增!");
}
});
bmsEnterpriseBasicInfoService.saveBatch(proList);
successMsg.append("导入成功");
}
@ -101,7 +109,7 @@ public class BmsEnterpriseBasicInfoController extends BaseController {
* id
*/
@ApiOperation(value = "根据信用代码获取该企业id", response = BmsEnterpriseBasicInfo.class)
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent,sightseer')")
@GetMapping(value = "/getCreditCode")
public AjaxResult getCreditCode(@RequestParam String getCreditCode) {
// 获取当前登录用户是否是企业端
@ -124,7 +132,7 @@ public class BmsEnterpriseBasicInfoController extends BaseController {
*
*/
@ApiOperation(value = "获取企业基础信息详细信息", response = BmsEnterpriseBasicInfo.class)
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent,sightseer')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(bmsEnterpriseBasicInfoService.getById(id));

@ -40,9 +40,7 @@ public class BmsEnterpriseFillController extends BaseController {
return toAjax(iBmsEnterpriseFillService.add(enterpriseFillResquest));
}
//企业填报之后要新增一条审批记录
//政务端审批之后也要新增一条
//被驳回之后也要新增一条审批记录
/**
*

@ -56,7 +56,7 @@ public class BmsTemplateInfoController extends BaseController {
/**
*
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
@GetMapping("/allList")
@ApiOperation(value = "新增项目时查询所有模板信息", response = BmsTemplateInfo.class)
public AjaxResult allList(BmsTemplateInfo bmsTemplateInfo) {
@ -101,7 +101,7 @@ public class BmsTemplateInfoController extends BaseController {
/**
*
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
@Log(title = "新增申报模板信息", businessType = BusinessType.INSERT)
@ApiOperation(value = "新增申报模板信息")
@PostMapping
@ -112,7 +112,7 @@ public class BmsTemplateInfoController extends BaseController {
/**
*
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
@Log(title = "修改申报模板信息", businessType = BusinessType.UPDATE)
@ApiOperation(value = "修改申报模板信息")
@PostMapping("/edit")
@ -128,7 +128,7 @@ public class BmsTemplateInfoController extends BaseController {
/**
*
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
@Log(title = "申报模板信息", businessType = BusinessType.DELETE)
@ApiOperation(value = "删除申报模板信息")
@PostMapping("/{ids}")

@ -68,7 +68,7 @@ public class BmsTemplateRecordController extends BaseController {
* @param bmsTemplateRecordUpdateDto
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
@ApiOperation(value = "补录")
@PostMapping("/supplementation")
public AjaxResult supplementation(@RequestBody BmsTemplateRecordUpdateDto bmsTemplateRecordUpdateDto) {
@ -125,7 +125,7 @@ public class BmsTemplateRecordController extends BaseController {
* 线
*/
@ApiOperation(value = "删除在线模板")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
@Log(title = "在线模板", businessType = BusinessType.DELETE)
@PostMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {

@ -4,6 +4,8 @@ import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.ExcelEnumFormat;
import com.ruoyi.common.annotation.Excels;
import com.ruoyi.jjh.common.entity.BaseInfoEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -36,7 +38,7 @@ public class BmsEnterpriseBasicInfo extends BaseInfoEntity {
private Integer multiple;
/**
* 1. 2
* 1. 2
*/
@ApiModelProperty("分类 1.规上服务业 2其他")
@JSONField(serialize = false)
@ -49,7 +51,6 @@ public class BmsEnterpriseBasicInfo extends BaseInfoEntity {
*/
@ApiModelProperty("源主键")
@JSONField(name = "源主键")
@Excel(name = "源主键")
private String ywid;
/**
@ -57,7 +58,6 @@ public class BmsEnterpriseBasicInfo extends BaseInfoEntity {
*/
@ApiModelProperty("源表org")
@JSONField(name = "源表org")
@Excel(name = "源表org")
private String org;
/**
@ -65,7 +65,7 @@ public class BmsEnterpriseBasicInfo extends BaseInfoEntity {
*/
@ApiModelProperty("企业名称")
@JSONField(name = "企业名称")
@Excel(name = "企业名称")
@Excel(name = "企业名称*",required = true)
private String qymc;
/**
@ -81,7 +81,7 @@ public class BmsEnterpriseBasicInfo extends BaseInfoEntity {
*/
@ApiModelProperty("统一社会信用代码")
@JSONField(name = "统一社会信用代码")
@Excel(name = "统一社会信用代码")
@Excel(name = "统一社会信用代码*",required = true)
private String tyshxydm;
/**
@ -369,7 +369,6 @@ public class BmsEnterpriseBasicInfo extends BaseInfoEntity {
*/
@ApiModelProperty("代理键")
@JSONField(name = "代理键")
@Excel(name = "代理键")
private String dwAgencykey;
/**
@ -377,7 +376,6 @@ public class BmsEnterpriseBasicInfo extends BaseInfoEntity {
*/
@ApiModelProperty("来源机构")
@JSONField(name = "来源机构")
@Excel(name = "来源机构")
private String dwLyjg;
/**
@ -385,7 +383,6 @@ public class BmsEnterpriseBasicInfo extends BaseInfoEntity {
*/
@ApiModelProperty("来源表名")
@JSONField(name = "来源表名")
@Excel(name = "来源表名")
private String dwLyb;
/**
@ -393,7 +390,6 @@ public class BmsEnterpriseBasicInfo extends BaseInfoEntity {
*/
@ApiModelProperty("是否删除0未删除1已删除")
@JSONField(serialize = false)
@Excel(name = "是否删除", readConverterExp = "0=未删除,1=已删除")
private Long isDeleted;

@ -64,12 +64,11 @@ public class BmsTemplateRecord extends BaseInfoEntity {
@Excel(name = "申报途径 0:系统申报1:补录")
private Long road;
// /**
// * 说明
// */
// @Excel(name = "说明")
// @Size(max = 200, message = "说明的长度要小于 200")
// private String notes;
/**
*
*/
@Excel(name = "说明")
private String notes;
/**
* 0= 1= 2= 3

@ -59,4 +59,7 @@ public class BmsDeclarationRecordsDto extends BmsDeclarationRecords {
@ApiModelProperty(value = "0=未填报,1=已填报")
private Integer statusChange;
@ApiModelProperty(value = "0=按时间排序,1=不按时间排序")
private Integer orderChange;
}

@ -59,8 +59,8 @@ public class BmsTemplateRecordQueryVo implements Serializable {
@Excel(name = "开放结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endTime;
// @Excel(name = "说明")
// private String notes;
@Excel(name = "说明")
private String notes;
@ApiModelProperty(value = "责任单位 0经发委:1规建委:2行审局:3市监局")
@Excel(name = "责任单位", readConverterExp = "0=经发委,1=规建委,2=行审局,3=市监局")

@ -47,7 +47,9 @@ public class SmsEnterChange {
List<SysUser> list1 = sysUserMapper.selectUserList(user);
list1.removeIf(x -> x.getPhonenumber().isEmpty());
for (SysUser items : list1) {
smsAlertsService.enterSms("政府人员-" + items.getNickName(), "您有" + count + "个新的申报审核任务[待初审]", items.getPhonenumber());
if("0".equals(items.getDelFlag()) & "0".equals(items.getStatus())) {
smsAlertsService.enterSms("政府人员-" + items.getNickName(), "您有" + count + "个新的申报审核任务[待初审]", items.getPhonenumber());
}
}
}
//查询复审的所有用户
@ -58,7 +60,9 @@ public class SmsEnterChange {
List<SysUser> list2 = sysUserMapper.selectUserList(user1);
list2.removeIf(x -> x.getPhonenumber().isEmpty());
for (SysUser items : list2) {
smsAlertsService.enterSms("政府人员-" + items.getNickName(), "您有" + count1 + "个新的申报审核任务[待复审]", items.getPhonenumber());
if("0".equals(items.getDelFlag()) & "0".equals(items.getStatus())) {
smsAlertsService.enterSms("政府人员-" + items.getNickName(), "您有" + count1 + "个新的申报审核任务[待复审]", items.getPhonenumber());
}
}
}
//查询终审的所有用户
@ -69,7 +73,9 @@ public class SmsEnterChange {
List<SysUser> list3 = sysUserMapper.selectUserList(user2);
list3.removeIf(x -> x.getPhonenumber().isEmpty());
for (SysUser items : list3) {
smsAlertsService.enterSms("政府人员-" + items.getNickName(), "您有" + count2 + "个新的申报审核任务[待终审]", items.getPhonenumber());
if("0".equals(items.getDelFlag()) & "0".equals(items.getStatus())) {
smsAlertsService.enterSms("政府人员-" + items.getNickName(), "您有" + count2 + "个新的申报审核任务[待终审]", items.getPhonenumber());
}
}
}
}

@ -53,6 +53,9 @@ public class TimeChange {
@Value("${isTiming}")
private Boolean isTiming;
@Value("${updateEnterprise}")
private Boolean updateEnterprise;
@Autowired
private ISysJobService jobService;
/**
@ -170,7 +173,7 @@ public class TimeChange {
*/
@Scheduled(cron = "0 0 2 * * *")
public void changeEnterpriseInfo() {
if (isTiming) {
if (updateEnterprise) {
List<BmsEnterpriseBasicInfo> list = bmsEnterpriseBasicInfoService.list();
List<BmsEnterpriseBasicInfo> allList = new ArrayList<>();
for (BmsEnterpriseBasicInfo items : list) {
@ -194,6 +197,9 @@ public class TimeChange {
if (total > 0) {
// 直接转换第一个元素为BmsEnterpriseBasicInfo对象
BmsEnterpriseBasicInfo res = JSONUtil.toBean(arr.getJSONObject(0).toString(), BmsEnterpriseBasicInfo.class);
if(items.getType() != 1){
res.setQygm("其他");
}
res.setId(items.getId());
res.setMultiple(total);
allList.add(res);
@ -210,7 +216,7 @@ public class TimeChange {
*/
@Scheduled(cron = "0 0 3 * * *")
public void changeContacts() {
if (isTiming) {
if (updateEnterprise) {
List<BmsEnterpriseBasicInfo> list = bmsEnterpriseBasicInfoService.list();
for (BmsEnterpriseBasicInfo items : list) {
String contacts = enterpriseUrl + "/645383/qyllrytyshxydm";
@ -278,18 +284,20 @@ public class TimeChange {
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);
if (isTiming) {
smsAlertsService.enterSms("政府人员-" + o.getNickName(), "您有1个项目即将建设完成,请前往工作台查看。", o.getPhonenumber());
for (SysUser o : sysUserMapper.selectUserList(user)) {
if("0".equals(o.getDelFlag()) & "0".equals(o.getStatus())) {
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);
if (isTiming) {
smsAlertsService.enterSms("政府人员-" + o.getNickName(), "您有1个项目即将建设完成,请前往工作台查看。", o.getPhonenumber());
}
}
});
}
});
jSmartDeclarationService.saveBatch(bmsDeclarationRecords);
}

@ -1,5 +1,6 @@
package com.ruoyi.jjh.declaration.service.impl;
import cn.hutool.core.date.DateTime;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -149,18 +150,19 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
public int updateApprovalInfo(BmsApprovalInfoUpdateDto bmsApprovalInfoUpdateDto) {
// 审批记录
List<BmsApprovalInfo> list = iBmsApprovalInfoService.lambdaQuery().eq(BmsApprovalInfo::getDeclarationRecordsId, bmsApprovalInfoUpdateDto.getDeclarationRecordsId()).orderByDesc(BmsApprovalInfo::getSort).list();
//最新一条审批记录
BmsApprovalInfo ba = list.get(0);
// 如果当前的deptId和最新一条的审批记录一样的话
if (ba.getApprovalStatus() != 0 || !Objects.equals(ba.getApprovalDept(), SecurityUtils.getDeptId())) {
throw new ServiceException("无法审批!");
} else {
ba.setId(null);
ba.setId(ba.getId());
ba.setApprovalById(SecurityUtils.getUserId());
ba.setApprovalStatus(bmsApprovalInfoUpdateDto.getApprovalStatus());
ba.setApprovalOpinions(bmsApprovalInfoUpdateDto.getApprovalOpinions());
ba.setApprovalAttachment(bmsApprovalInfoUpdateDto.getApprovalAttachment());
ba.setSort(list.size() + 1);
iBmsApprovalInfoService.save(ba);
ba.setApprovalTime(DateTime.now());
iBmsApprovalInfoService.updateById(ba);
}
int num = approval(bmsApprovalInfoUpdateDto, ba.getProcessId(), list.size() + 1);
return num;
@ -198,6 +200,8 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
timingRemindImpl.getContact(one.getTyshxydm(), "您有1个申报任务[初审不通过]");
}
if (bmsApprovalInfoUpdateDto.getApprovalStatus() == 3) {
//生成审批
iCommonService.insertAuditRecord(bmsApprovalInfoUpdateDto.getDeclarationRecordsId(), 0);
jp.setStatus(10);
bmsDeclarationRecords.setStatus(10L);
timingRemindImpl.getContact(one.getTyshxydm(), "您有1个申报任务[初审退回],待重新填报");

@ -5,18 +5,10 @@ import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.jjh.declaration.entity.BmsDeclarationRecords;
import com.ruoyi.jjh.declaration.entity.BmsEnterpriseBasicInfo;
import com.ruoyi.jjh.declaration.entity.BmsEnterpriseDirectory;
import com.ruoyi.jjh.declaration.entity.BmsTemplateRecord;
import com.ruoyi.jjh.declaration.entity.*;
import com.ruoyi.jjh.declaration.entity.request.EnterpriseFileResquest;
import com.ruoyi.jjh.declaration.entity.request.EnterpriseFillResquest;
import com.ruoyi.jjh.declaration.service.IBmsDeclarationRecordsService;
import com.ruoyi.jjh.declaration.service.IBmsEnterpriseBasicInfoService;
import com.ruoyi.jjh.declaration.service.IBmsEnterpriseDirectoryService;
import com.ruoyi.jjh.declaration.service.IBmsEnterpriseFillService;
import com.ruoyi.jjh.declaration.service.IBmsTemplateRecordService;
import com.ruoyi.jjh.declaration.service.ICommonService;
import com.ruoyi.jjh.declaration.service.*;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.service.JProjectService;
import org.springframework.beans.factory.annotation.Autowired;
@ -25,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
@ -33,7 +26,8 @@ import java.util.Map;
*/
@Service
public class BmsEnterpriseFillServiceImpl implements IBmsEnterpriseFillService {
@Autowired
private IBmsApprovalInfoService iBmsApprovalInfoService;
@Resource
private IBmsDeclarationRecordsService iBmsDeclarationRecordsService;
@ -180,8 +174,6 @@ public class BmsEnterpriseFillServiceImpl implements IBmsEnterpriseFillService {
addProject.setOtherJson(sm.get("str"));
addProject.setFileJson(sm.get("fileStr"));
jProjectService.updateById(addProject);
// 修改审批状态
iCommonService.insertAuditRecord(enterpriseFillResquest.getDeclarationId(), 0);
}
/**

@ -227,8 +227,10 @@ public class BmsTemplateRecordServiceImpl extends ServiceImpl<BmsTemplateRecordM
//如果前端部分企业名录集合为空
if (null != enterpriseDirectoryList && enterpriseDirectoryList.size() > 0) {
enterpriseDirectoryList.forEach(x -> {
getDeclarationRecordsList(bmsTemplateRecordAddDto, drlist, x.getCreditCode(), tp.getTemplateJson());
getDeclarationRecordsList(bmsTemplateRecordAddDto, drlist, x.getCreditCode().trim(), tp.getTemplateJson());
x.setTemplateRecordId(bmsTemplateRecordAddDto.getId());
x.setCreditCode(x.getCreditCode().trim());
x.setEnterpriseName(x.getEnterpriseName().trim());
});
enterpriseDirectoryService.saveBatch(enterpriseDirectoryList);
} else {

@ -64,8 +64,8 @@ public class SingleLoginServiceImpl implements SingleLoginService {
roles[0] = 101L;
} else if ("02".equals(userType)) {
//在这里可以判断具体要给什么权限 要给dept部门id
roles[0] = 102L;
user.setDeptId(100L);
roles[0] = 103L;
user.setDeptId(null);
user.setZwuser(userName);
}
user.setRoleIds(roles);
@ -76,11 +76,11 @@ public class SingleLoginServiceImpl implements SingleLoginService {
if (userService.checkUserNameUnique(user)) {
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
userService.insertUser(user);
if ("02".equals(userType) & isTiming) {
if (user.getPhonenumber() != null) {
smsAlertsService.addSsmPhone(user.getPhonenumber());
}
}
// if ("02".equals(userType) & isTiming) {
// if (user.getPhonenumber() != null) {
// smsAlertsService.addSsmPhone(user.getPhonenumber());
// }
// }
}
//新增user账号密码
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(userName, "admin123");

@ -0,0 +1,96 @@
package com.ruoyi.jjh.ent.controller;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.jjh.ent.entity.JMemorandum;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.JProjectFund;
import com.ruoyi.jjh.ent.entity.request.JTop5FundRequest;
import com.ruoyi.jjh.ent.entity.response.JServicesDevelopResponse;
import com.ruoyi.jjh.ent.entity.response.ThreeYearsFundResponse;
import com.ruoyi.jjh.ent.service.JChiefWorkService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
*
* @author du
* @since 2024/8/28 10:36
*/
@RestController
@RequestMapping("/jjh/chiefWork")
@Api(tags = "政务端工作台 8.28")
public class JChiefWorkController extends BaseController {
@Resource
private JChiefWorkService jChiefWorkService;
/**
* -
* ( 11)
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "政务端-工作台 服务业发展总览", response = JServicesDevelopResponse.class)
@GetMapping("/servicesDevelop")
public AjaxResult getServicesDevelop() {
return success(jChiefWorkService.servicesDevelop());
}
/**
* -
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "政务端-工作台 近三年资金拨付情况",response = ThreeYearsFundResponse.class)
@GetMapping("/threeYearsFund/{years}")
public AjaxResult getThreeYearsFund(@PathVariable String years) {
return success(jChiefWorkService.getThreeYearsFund(years));
}
/**
* - TOP5
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "政务端-工作台 企业获得资金拨付排名TOP5",response = JProjectFund.class)
@GetMapping("/top5Fund")
public AjaxResult getTop5Fund(JTop5FundRequest a) {
return success(jChiefWorkService.getTop5Fund(a));
}
/**
* -
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "政务端-工作台 当年已申报完成的项目",response = JProject.class)
@GetMapping("/currentYearFinish")
public AjaxResult currentYearFinish() {
return success(jChiefWorkService.currentYearFinish());
}
/**
* -
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "政务端-工作台 项目追踪情况",response = JProject.class)
@GetMapping("/projectTrace")
public AjaxResult projectTrace() {
return success(jChiefWorkService.projectTrace());
}
/**
* -
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "政务端-工作台 备忘录更新情况", response = JMemorandum.class)
@GetMapping("/memorandum")
public AjaxResult memorandum() {
return success(jChiefWorkService.memorandum());
}
}

@ -37,7 +37,7 @@ public class JContactsController extends BaseController {
* @param jContacts
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent,sightseer')")
@ApiOperation(value = "分页查询联络人数据", response = JContacts.class)
@GetMapping
public AjaxResult selectAll(JContactsRequest jContacts) {
@ -64,7 +64,7 @@ public class JContactsController extends BaseController {
* @param id
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent,sightseer')")
@ApiOperation(value = "通过主键查询单条数据", response = JContacts.class)
@GetMapping("{id}")
public AjaxResult selectOne(@PathVariable Serializable id) {

@ -3,7 +3,6 @@ package com.ruoyi.jjh.ent.controller;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.jjh.ent.entity.response.HonorResponse;
import com.ruoyi.jjh.ent.entity.response.ProjectTrackingResponse;
import com.ruoyi.jjh.ent.service.JDataScreenService;
import com.ruoyi.jjh.ent.service.SmsAlertsService;
import io.swagger.annotations.Api;
@ -39,7 +38,7 @@ public class JDataScreenController extends BaseController {
*
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,sightseer')")
@ApiOperation(value = "荣誉情况")
@GetMapping("/honor")
public AjaxResult getHonor(HonorResponse a) {
@ -51,10 +50,10 @@ public class JDataScreenController extends BaseController {
*
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,sightseer')")
@ApiOperation(value = "项目追踪情况")
@GetMapping("/projectTracking")
public AjaxResult getProjectTracking(ProjectTrackingResponse a) {
public AjaxResult getProjectTracking() {
return success(jDataScreenService.getProjectTracking());
}
@ -63,7 +62,7 @@ public class JDataScreenController extends BaseController {
*
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,sightseer')")
@ApiOperation(value = "服务业发展总览")
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "年份1 季度2", required = true),
@ -80,7 +79,7 @@ public class JDataScreenController extends BaseController {
*
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,sightseer')")
@ApiOperation(value = "行业纵深情况")
@GetMapping("/getIndustryDepth")
public AjaxResult getIndustryDepth() {
@ -92,12 +91,10 @@ public class JDataScreenController extends BaseController {
*
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,sightseer')")
@ApiOperation(value = "所有分行业汇总")
@GetMapping("/getAllIndustry")
public AjaxResult getAllIndustry() {
return success(jDataScreenService.getAllIndustry());
}
}

@ -1,20 +1,39 @@
package com.ruoyi.jjh.ent.controller;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.io.resource.ClassPathResource;
import cn.hutool.poi.word.Word07Writer;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.jjh.ent.entity.JDevelopmentReport;
import com.ruoyi.jjh.ent.entity.response.JTemplateMetricsResponse;
import com.ruoyi.jjh.ent.service.JDevelopmentReportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.Resource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.awt.*;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
/**
* j_template_metrics
@ -28,18 +47,51 @@ import javax.annotation.Resource;
public class JDevelopmentReportController extends BaseController {
@Resource
@Value("${ruoyi.profile}")
private String fileAddress;
@Autowired
private JDevelopmentReportService jDevelopmentReportService;
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "获取当前用户的模板", response = JDevelopmentReport.class)
@PostMapping("/getId")
public AjaxResult getId() {
Long userId = null;
try {
userId = SecurityUtils.getUserId();
} catch (Exception ignored) {
throw new ServiceException("获取当前用户失败!");
}
List<JDevelopmentReport> list = jDevelopmentReportService.lambdaQuery().eq(JDevelopmentReport::getCreateId, userId).list();
if(!list.isEmpty()){
return success(list.get(0));
}else {
return success();
}
}
/**
*
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "新增服务业发展报告", response = JDevelopmentReport.class)
@ApiOperation(value = "新增或者修改服务业发展报告", response = JDevelopmentReport.class)
@PostMapping
public AjaxResult add(@RequestBody JDevelopmentReport jDevelopmentReport) {
return toAjax(jDevelopmentReportService.save(jDevelopmentReport));
Long userId = null;
try {
userId = SecurityUtils.getUserId();
} catch (Exception ignored) {
throw new ServiceException("获取当前用户失败!");
}
List<JDevelopmentReport> list = jDevelopmentReportService.lambdaQuery().eq(JDevelopmentReport::getCreateId, userId).list();
if(!list.isEmpty()){
return toAjax(jDevelopmentReportService.updateById(jDevelopmentReport));
}else {
return toAjax(jDevelopmentReportService.save(jDevelopmentReport));
}
}
/**
@ -47,8 +99,52 @@ public class JDevelopmentReportController extends BaseController {
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "模板指标自定义选择", response = JTemplateMetricsResponse.class)
@GetMapping("/templateMetrics")
public AjaxResult getTemplateMetrics(String year) {
@GetMapping("/templateMetrics/{year}")
public AjaxResult getTemplateMetrics(@PathVariable("year") String year) {
return success(jDevelopmentReportService.getTemplateMetrics(year));
}
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "下载发展模板")
@PostMapping("/downloadTemplate")
public ResponseEntity<Resource> downloadTemplate(@RequestBody JDevelopmentReport s) {
// 创建父文件目录
String fatherFile = fileAddress + "/" + "moban.docx";
// 创建文件
File touch = FileUtil.touch(fatherFile);
// 创建 Word07Writer 实例
Word07Writer writer = new Word07Writer();
try {
// 添加段落(标题)
writer.addText(ParagraphAlignment.CENTER,new Font("宋体", Font.PLAIN, 18), s.getTitle());
// 添加副标题
writer.addText(ParagraphAlignment.CENTER,new Font("宋体", Font.PLAIN, 14), s.getSubheading());
// 使用 Jsoup 解析页面内容
Document doc = Jsoup.parse(s.getContent(), "UTF-8");
// 获取页面内容中的段落
Elements paragraphs = doc.select("p");
for (Element paragraph : paragraphs) {
writer.addText(new Font("仿宋", Font.PLAIN, 12), paragraph.text());
}
// 写出到文件
writer.flush(touch);
// 设置响应头
HttpHeaders headers = new HttpHeaders();
headers.add(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=moban.docx");
headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM_VALUE);
// 封装为 ResponseEntity
FileSystemResource resource = new FileSystemResource(touch);
return ResponseEntity.ok()
.headers(headers)
.body(resource);
} catch (Exception e) {
// 处理异常情况,例如日志记录或者其他错误处理
e.printStackTrace();
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build();
} finally {
// 关闭资源
writer.close();
}
}
}

@ -51,7 +51,7 @@ public class JEnterpriseContactController extends BaseController {
* @param jEnterpriseContactRequest
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent,sightseer')")
@ApiOperation(value = "分页查询所有数据", response = JEnterpriseContact.class)
@GetMapping
public AjaxResult selectAll(Page<JEnterpriseContact> page, JEnterpriseContactRequest jEnterpriseContactRequest) {
@ -66,7 +66,6 @@ public class JEnterpriseContactController extends BaseController {
} catch (Exception ignored) {
}
if (!admin && b) {
jEnterpriseContactRequest.setEnterpriseName(str.getNickName());
jEnterpriseContactRequest.setEnterpriseCode(str.getUserName());
}
if (page.getCurrent() >= 1 & page.getSize() >= 1) {
@ -83,7 +82,7 @@ public class JEnterpriseContactController extends BaseController {
* @param id
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent,sightseer')")
@ApiOperation(value = "通过主键查询单条数据", response = JEnterpriseContact.class)
@GetMapping("{id}")
public AjaxResult selectOne(@PathVariable Serializable id) {
@ -96,7 +95,7 @@ public class JEnterpriseContactController extends BaseController {
* @param jEnterpriseContact
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,ent')")
@ApiOperation(value = "新增数据")
@PostMapping
public AjaxResult insert(@RequestBody JEnterpriseContact jEnterpriseContact) {
@ -112,7 +111,7 @@ public class JEnterpriseContactController extends BaseController {
* @param jEnterpriseContact
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,ent')")
@ApiOperation(value = "修改数据")
@PostMapping("/edit")
public AjaxResult update(@RequestBody JEnterpriseContact jEnterpriseContact) {
@ -128,7 +127,7 @@ public class JEnterpriseContactController extends BaseController {
* @param ids
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,ent')")
@ApiOperation(value = "删除数据")
@PostMapping("/{ids}")
public AjaxResult delete(@PathVariable Long[] ids) {

@ -39,7 +39,7 @@ public class JHeadQuartersRevenueController {
* @param js
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,sightseer')")
@ApiOperation(value = "分页查询总部企业", response = JHeadQuartersRevenue.class)
@GetMapping
public AjaxResult page(Page<JHeadQuartersRevenue> page, JHeadQuartersRevenueRequest js) {
@ -49,7 +49,7 @@ public class JHeadQuartersRevenueController {
/**
*
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,sightseer')")
@ApiOperation(value = "查询总部企业数量", response = JHqCountResponse.class)
@GetMapping("/selectZbCount")
public AjaxResult selectZbCount() {

@ -14,6 +14,7 @@ import com.ruoyi.jjh.ent.entity.request.JMemorandumRequest;
import com.ruoyi.jjh.ent.service.JMemorandumService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
@ -52,12 +53,13 @@ public class JMemorandumController extends BaseController {
* @param jMemorandumRequest
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent,sightseer')")
@ApiOperation(value = "分页查询所有数据", response = JMemorandum.class)
@GetMapping
public AjaxResult selectAll(Page<JMemorandum> page, JMemorandumRequest jMemorandumRequest) {
return success(jMemorandumService.page(page, jMemorandumRequest));
}
@PreAuthorize("@ss.hasAnyRoles('admin')")
@ApiOperation(value = "定时更新法人库-法人基本信息(统一社会信用代码)")
@GetMapping("/getEnterpriseInfo")
public AjaxResult selectAll2() {
@ -65,6 +67,7 @@ public class JMemorandumController extends BaseController {
return success();
}
@PreAuthorize("@ss.hasAnyRoles('admin')")
@ApiOperation(value = "定时更新法人库-企业联络人员(统一社会信用代码)")
@GetMapping("/getChangeContacts")
public AjaxResult selectAll1() {
@ -79,6 +82,7 @@ public class JMemorandumController extends BaseController {
* @param jMemorandumRequest
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,sightseer')")
@ApiOperation(value = "根据关联项目库ID查询该ID下的备忘录", response = JMemorandum.class)
@GetMapping("/getIdToList")
public AjaxResult selectIdToAll(JMemorandumRequest jMemorandumRequest) {
@ -109,6 +113,7 @@ public class JMemorandumController extends BaseController {
* @param jMemorandum
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "新增数据")
@PostMapping
public AjaxResult insert(@RequestBody JMemorandum jMemorandum) {
@ -118,6 +123,7 @@ public class JMemorandumController extends BaseController {
/**
*
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,sightseer')")
@ApiOperation(value = "导出备忘录表")
@Log(title = "导出备忘录表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ -133,6 +139,7 @@ public class JMemorandumController extends BaseController {
* @param jMemorandum
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "修改数据")
@PostMapping("/edit")
public AjaxResult update(@RequestBody JMemorandum jMemorandum) {
@ -145,6 +152,7 @@ public class JMemorandumController extends BaseController {
* @param id
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "删除数据")
@PostMapping("/{id}")
public AjaxResult delete(@PathVariable Long id) {

@ -70,7 +70,7 @@ public class JPolicyFileController extends BaseController {
*/
@ApiOperation(value = "新增数据")
@PostMapping
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
public AjaxResult insert(@RequestBody JPolicyFile jPolicyFile) {
return success(jPolicyFileService.save(jPolicyFile));
}
@ -81,7 +81,7 @@ public class JPolicyFileController extends BaseController {
* @param jPolicyFile
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
@ApiOperation(value = "修改数据")
@PostMapping("/edit")
public AjaxResult update(@RequestBody JPolicyFile jPolicyFile) {
@ -94,7 +94,7 @@ public class JPolicyFileController extends BaseController {
* @param id
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
@ApiOperation(value = "删除数据")
@PostMapping("/{id}")
public AjaxResult delete(@PathVariable Long id) {

@ -12,20 +12,14 @@ import com.ruoyi.common.utils.poi.ProjectValueUtil;
import com.ruoyi.jjh.declaration.entity.vo.BmsApprovalInfoQueryVo;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.request.JProjectExcel;
import com.ruoyi.jjh.ent.mapper.JProjectMapper;
import com.ruoyi.jjh.ent.service.JProjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
@ -49,6 +43,9 @@ public class JProjectController extends BaseController {
@Resource
private JProjectService jProjectService;
@Resource
private JProjectMapper jProjectMapper;
// /**
// * 改变没有信用代码的项目
// * @return
@ -77,7 +74,7 @@ public class JProjectController extends BaseController {
* @param jProject
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent,sightseer')")
@ApiOperation(value = "分页查询项目", response = JProject.class)
@GetMapping
public AjaxResult selectPage(Page<JProject> page, JProject jProject) {
@ -97,6 +94,32 @@ public class JProjectController extends BaseController {
return success(jProjectService.page(page, jProject));
}
/**
*
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent,sightseer')")
@ApiOperation(value = "导出项目")
@PostMapping("/exportProject")
public void exportProject(HttpServletResponse response, JProject jProject) {
boolean b = false;
boolean admin = false;
String str = null;
try {
admin = SecurityUtils.isAdmin(SecurityUtils.getUserId());
b = SecurityUtils.hasRole("ent");
str = SecurityUtils.getUsername();
} catch (Exception ignored) {
}
if (!admin & b) {
jProject.setCreditCode(str);
}
List<JProject> list = jProjectMapper.page(jProject);
ExcelUtil<JProject> util = new ExcelUtil<>(JProject.class);
util.exportExcel(response, list, "项目记录");
}
/**
* ()
*
@ -168,7 +191,7 @@ public class JProjectController extends BaseController {
* @param id
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
@ApiOperation(value = "删除项目")
@PostMapping("/{id}")
public AjaxResult delete(@PathVariable Long id) {
@ -178,7 +201,7 @@ public class JProjectController extends BaseController {
/**
* excel
*/
@PreAuthorize("@ss.hasAnyRoles('admin,gov,other-gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
@ApiOperation(value = "导入已有的excel项目数据")
@PostMapping(value = "/export", consumes = "multipart/form-data")
public AjaxResult export(@RequestPart("file") MultipartFile file) throws Exception {
@ -197,7 +220,7 @@ public class JProjectController extends BaseController {
/**
* excel
*/
// @PreAuthorize("@ss.hasAnyRoles('admin,gov,other-gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
@ApiOperation(value = "导入下载的excel模板和参数项目数据")
@PostMapping(value = "/importTemplateProject", consumes = "multipart/form-data")
@ApiImplicitParams({

@ -0,0 +1,98 @@
package com.ruoyi.jjh.ent.controller;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.JProjectFund;
import com.ruoyi.jjh.ent.entity.response.FundStatisticsResponse;
import com.ruoyi.jjh.ent.entity.response.JProjectFundResponse;
import com.ruoyi.jjh.ent.service.JProjectFundService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* (j_project_fund)
* @author du
* @since 2024/8/8 15:31
*/
@RestController
@RequestMapping("/jjh/jProjectFund")
@Api(tags = "项目资金表")
public class JProjectFundController extends BaseController {
@Resource
private JProjectFundService jProjectFundService;
/**
* id
*
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent,sightseer')")
@ApiOperation(value = "查询该项目id下的资金情况", response = JProjectFund.class)
@GetMapping("/{id}")
public AjaxResult selectFund(@PathVariable Long id) {
return success(jProjectFundService.selectFund(id));
}
/**
* -
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "政务端-工作台 资金引导拨付情况统计", response = FundStatisticsResponse.class)
@GetMapping("/fundStatistics")
public AjaxResult fundStatistics() {
return success(jProjectFundService.fundStatistics());
}
/**
* - TOP5
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "政务端-工作台 拨付资金企业申请情况TOP5", response = JProjectFund.class)
@GetMapping("/appropriationTop5")
public AjaxResult appropriationTop5() {
return success(jProjectFundService.appropriationTop5());
}
/**
* -
*/
@PreAuthorize("@ss.hasAnyRoles('admin,ent')")
@ApiOperation(value = "企业端-首页企业荣誉资质 关联项目进展", response = JProject.class)
@GetMapping("/enterpriseProject")
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "1企业荣誉资质 2关联项目进展", required = true),
})
public AjaxResult getEnterpriseProject(@RequestParam Integer type) {
String creditCode = null;
try {
creditCode = SecurityUtils.getUsername();
} catch (Exception ignored) {
}
return success(jProjectFundService.getEnterpriseProject(type,creditCode));
}
/**
* -
*/
@PreAuthorize("@ss.hasAnyRoles('admin,ent')")
@ApiOperation(value = "企业端-首页 往年专项资金申报", response = JProjectFundResponse.class)
@GetMapping("/usualFund")
public AjaxResult usualFund() {
String username = null;
try {
username = SecurityUtils.getUsername();
} catch (Exception ignored) {
}
return success(jProjectFundService.usualFund(username));
}
}

@ -37,7 +37,7 @@ public class JServicesListController extends BaseController {
* @param js
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,sightseer')")
@ApiOperation(value = "分页查询服务业企业名单", response = JServicesList.class)
@GetMapping
public AjaxResult selectAll(Page<JServicesList> page, JServicesListRequest js) {
@ -48,7 +48,7 @@ public class JServicesListController extends BaseController {
/**
*
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,sightseer')")
@ApiOperation(value = "首页服务业数据统计", response = JServicesListCountResponse.class)
@GetMapping("/selectCount")
public AjaxResult selectAllServicesCount() {

@ -7,9 +7,11 @@ import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.exception.job.TaskException;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.jjh.declaration.regular.TimeChange;
import com.ruoyi.jjh.ent.entity.HomeRequestSmart;
import com.ruoyi.jjh.ent.entity.JSmartDeclaration;
import com.ruoyi.jjh.ent.entity.JSmartReminders;
import com.ruoyi.jjh.ent.entity.request.JAddJobSmart;
import com.ruoyi.jjh.ent.entity.request.JRemindChiefAllRequest;
import com.ruoyi.jjh.ent.entity.request.JSmartRemindersDq;
import com.ruoyi.jjh.ent.entity.request.JSmartRemindersNDq;
import com.ruoyi.jjh.ent.mapper.JSmartRemindersMapper;
@ -33,6 +35,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.io.Serializable;
import java.util.Objects;
/**
* j_smart_reminders
@ -86,7 +89,7 @@ public class JSmartRemindersController extends BaseController {
@PreAuthorize("@ss.hasAnyRoles('ent')")
@ApiOperation(value = "企业端首页智能提醒查询所有数据", response = JSmartDeclaration.class)
@GetMapping("/enterpriseAll")
public AjaxResult enterpriseAll() {
public AjaxResult enterpriseAll(Page<HomeRequestSmart> page,String alertContent) {
// 获取当前登录用户是否是企业端
boolean admin = false;
String str = null;
@ -98,7 +101,7 @@ public class JSmartRemindersController extends BaseController {
if (admin) {
str = null;
}
return success(jSmartDeclarationService.selectEnterpriseAllList(str));
return success(jSmartDeclarationService.selectEnterpriseAllList(page,str,alertContent));
}
@ -107,22 +110,21 @@ public class JSmartRemindersController extends BaseController {
*
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "政务端首页智能提醒查询所有数据", response = JSmartDeclaration.class)
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,sightseer')")
@ApiOperation(value = "政务端首页智能提醒查询数据", response = JSmartDeclaration.class)
@GetMapping("/chiefAll")
public AjaxResult chiefAll(Long projectId) {
public AjaxResult chiefAll(Page<HomeRequestSmart> page, JRemindChiefAllRequest req) {
// 获取当前登录用户是否是政务端
boolean admin = false;
Long userId = null;
try {
admin = SecurityUtils.isAdmin(SecurityUtils.getUserId());
userId = SecurityUtils.getUserId();
req.setUserId(SecurityUtils.getUserId());
} catch (Exception ignored) {
}
if (admin) {
userId = null;
req.setUserId(null);
}
return success(jSmartDeclarationService.chiefAll(userId, projectId));
return success(jSmartDeclarationService.chiefAll(page,req));
}
/**
@ -198,10 +200,38 @@ public class JSmartRemindersController extends BaseController {
@ApiOperation(value = "修改定期提醒数据")
@PostMapping("/updateDq")
public AjaxResult updateDq(@RequestBody @Valid JSmartRemindersDq dq) throws SchedulerException, TaskException {
if (dq.getAlertType() == 1 || dq.getAlertType() == 4) {
return success(jSmartRemindersService.updateDq(dq));
} else {
throw new ServiceException("请选择正确类型!");
// 看当前用户是否是admin
boolean admin = false;
//查看是other-gov还是gov
boolean b = false;
boolean c = false;
Long userId = null;
try {
admin = SecurityUtils.isAdmin(SecurityUtils.getUserId());
b = SecurityUtils.hasRole("other-gov");
c = SecurityUtils.hasRole("gov");
userId=SecurityUtils.getUserId();
} catch (Exception ignored) {
}
if (admin || b) {
if (dq.getAlertType() == 1 || dq.getAlertType() == 4) {
return success(jSmartRemindersService.updateDq(dq));
} else {
throw new ServiceException("请选择正确类型!");
}
}else if(c){
JSmartReminders bys = jSmartRemindersService.getById(dq.getId());
if(!Objects.equals(bys.getCreateId(), userId)){
throw new ServiceException("您暂无权限修改他人的定时提醒!");
}else {
if (dq.getAlertType() == 1 || dq.getAlertType() == 4) {
return success(jSmartRemindersService.updateDq(dq));
} else {
throw new ServiceException("请选择正确类型!");
}
}
}else {
throw new ServiceException("修改失败,请联系管理员!");
}
}
@ -211,7 +241,7 @@ public class JSmartRemindersController extends BaseController {
* @param ndq
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
@ApiOperation(value = "修改不定期提醒数据")
@PostMapping("/updateNdq")
public AjaxResult updateNdq(@RequestBody @Valid JSmartRemindersNDq ndq) {
@ -229,7 +259,7 @@ public class JSmartRemindersController extends BaseController {
* @param id
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
@ApiOperation(value = "删除数据")
@PostMapping("/{id}")
public AjaxResult delete(@PathVariable Long id) throws SchedulerException {

@ -1,13 +1,13 @@
package com.ruoyi.jjh.ent.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import com.ruoyi.jjh.common.entity.BaseInfoEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* j_template_metrics
*
@ -29,18 +29,37 @@ public class JDevelopmentReport extends BaseInfoEntity {
/**
*
*/
@NotBlank
@ApiModelProperty("标题")
private String title;
/**
*
*/
@NotBlank
@ApiModelProperty("副标题")
private String subheading;
/**
*
*/
@NotBlank
@ApiModelProperty("内容")
private String content;
/**
* ID
*/
@ApiModelProperty("创建ID")
@TableField(fill = FieldFill.INSERT)
private Long createId;
/**
* ID
*/
@ApiModelProperty("更新者ID")
@TableField(fill = FieldFill.UPDATE)
private Long updateId;
}

@ -0,0 +1,68 @@
package com.ruoyi.jjh.ent.entity;
import com.baomidou.mybatisplus.annotation.IdType;
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;
/**
* (j_project_fund)
* @author du
* @since 2024/8/8 15:40
*/
@ApiModel("项目表")
@TableName(value = "j_project_fund")
@Data
public class JProjectFund {
/**
* Id
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
*
*/
@ApiModelProperty("企业名称")
private String qymc;
/**
*
*/
@ApiModelProperty("统一社会信用代码")
private String tyshxydm;
/**
*
*/
@ApiModelProperty("项目")
private String projectName;
/**
*
*/
@ApiModelProperty("项目金额")
private Double fundAmount;
/**
*
*/
@ApiModelProperty("拨付时间")
private String appropriationTime;
/**
*
*/
@ApiModelProperty("专项类型")
private String specialType;
/**
*
*/
@ApiModelProperty("摘要")
private String summary;
}

@ -18,7 +18,7 @@ import lombok.Data;
@Data
@ApiModel("服务业企业名单")
@TableName(value = "j_services_list")
public class JServicesList extends BaseInfoEntity {
public class JServicesList{
/**
* Id
@ -51,9 +51,9 @@ public class JServicesList extends BaseInfoEntity {
private String hydm;
/**
* 1. 2 3 4
* 1. 2 3 4
*/
@ApiModelProperty("1.生产性服务业 2生活性服务业 3新兴服务业 4限上批零住餐")
@ApiModelProperty("1.生产性服务业 2生活性服务业 3规上服务业 4限上批零住餐")
private String servicesType;
/**

@ -0,0 +1,31 @@
package com.ruoyi.jjh.ent.entity.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
* @author du
* @since 2024/8/2 10:36
*/
@Data
public class JRemindChiefAllRequest {
/**
*
*/
@ApiModelProperty("智能提醒内容")
private String content;
/**
* id
*/
@ApiModelProperty("项目id")
private Long projectId;
/**
* id
*/
@ApiModelProperty("用户id")
private Long userId;
}

@ -27,8 +27,8 @@ public class JServicesListRequest {
private String tyshxydm;
/**
* 1. 2 3 4
* 1. 2 3 4
*/
@ApiModelProperty("1.生产性服务业 2生活性服务业 3新兴服务业 4限上批零住餐")
@ApiModelProperty("1.生产性服务业 2生活性服务业 3规上服务业 4限上批零住餐")
private String servicesType;
}

@ -0,0 +1,34 @@
package com.ruoyi.jjh.ent.entity.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* TOP5
* @author du
* @since 2024/8/28 13:13
*/
@Data
@ApiModel("企业获得资金拨付排名TOP5请求体")
public class JTop5FundRequest {
/**
* 1. 2.
*/
@NotBlank
@ApiModelProperty("年份 1.当前 2.近三年 ")
private Integer yearsChange;
/**
* 1. 2.
*/
@NotNull
@ApiModelProperty("分类 1.总部专项 2.服务业专项")
private Integer type;
}

@ -0,0 +1,27 @@
package com.ruoyi.jjh.ent.entity.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
* @author du
* @since 2024/8/8 16:09
*/
@Data
@ApiModel("资金引导拨付情况统计返回体")
public class FundStatisticsResponse {
/**
*
*/
@ApiModelProperty("项目类别")
private String type;
/**
* )
*/
@ApiModelProperty("资金之和 (万元)")
private Double fundSum;
}

@ -0,0 +1,28 @@
package com.ruoyi.jjh.ent.entity.response;
import com.ruoyi.jjh.ent.entity.JProjectFund;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
* @author du
* @since 2024/8/12 11:19
*/
@Data
@ApiModel("往年专项资金申报返回体")
public class JProjectFundResponse extends JProjectFund {
/**
*
*/
@ApiModelProperty("项目大类")
private Integer projectBigType;
/**
* id
*/
@ApiModelProperty("项目id")
private Long projectId;
}

@ -30,5 +30,5 @@ public class JTemplateMetricsResponse {
*
*/
@ApiModelProperty("数值")
private Integer count;
private String count;
}

@ -5,8 +5,10 @@ import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDate;
import java.util.Date;
/**
*
@ -19,29 +21,39 @@ import java.time.LocalDate;
public class ProjectTrackingResponse {
/**
*
*/
@ApiModelProperty("项目大类名字")
private String enterpriseDirectory;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "填报开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDate startTime;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "填报结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDate endTime;
/**
*
*/
@ApiModelProperty("数量")
private Integer count;
// /**
// * 项目小类
// */
// @ApiModelProperty("项目小类")
// private Integer projectSmallType;
//
// /**
// * 提醒时间
// */
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
// @Excel(name = "提醒时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
// private Date alertTime;
//
//
// /**
// * 提醒内容
// */
// @ApiModelProperty("提醒内容")
// private String alertContent;
}

@ -0,0 +1,52 @@
package com.ruoyi.jjh.ent.entity.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
* @author du
* @since 2024/9/4 14:30
*/
@Data
@ApiModel("近三年资金拨付情况")
public class ThreeYearsFundResponse {
/**
*
*/
@ApiModelProperty("年份")
private String years;
/**
* 1.2.
*/
@ApiModelProperty("1.服务业高质量发展引导资金服务业2.总部经济高质量发展专项资金")
private String serviceType;
/**
*
*/
@ApiModelProperty("资金预算")
private Double fundBudget;
/**
*
*/
@ApiModelProperty("追加预算")
private Double additionBudget;
/**
*
*/
@ApiModelProperty("拨付资金")
private Double appropriationFund;
/**
*
*/
@ApiModelProperty("执行率")
private Double implementationRate;
}

@ -0,0 +1,50 @@
package com.ruoyi.jjh.ent.mapper;
import com.ruoyi.jjh.ent.entity.JMemorandum;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.JProjectFund;
import com.ruoyi.jjh.ent.entity.request.JTop5FundRequest;
import com.ruoyi.jjh.ent.entity.response.JServicesDevelopResponse;
import com.ruoyi.jjh.ent.entity.response.ThreeYearsFundResponse;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
*
* @author du
* @since 2024/5/6 13:57
*/
public interface JChiefWorkMapper{
/**
* -
*/
List<JServicesDevelopResponse> servicesDevelop();
/**
* - TOP5
*/
List<JProjectFund> getTop5Fund(@Param("req") JTop5FundRequest a);
/**
* -
*/
List<JProject> currentYearFinish();
/**
* -
*/
List<JProject> projectTrace();
/**
* -
*/
List<JMemorandum> memorandum();
/**
* -
*/
List<ThreeYearsFundResponse> getThreeYearsFund(String years);
}

@ -1,11 +1,12 @@
package com.ruoyi.jjh.ent.mapper;
import com.ruoyi.jjh.ent.entity.response.HonorResponse;
import com.ruoyi.jjh.ent.entity.response.JAllIndustryResponse;
import com.ruoyi.jjh.ent.entity.response.JBigMiddleIndustryResponse;
import com.ruoyi.jjh.ent.entity.response.JIndustryDepthResponse;
import com.ruoyi.jjh.ent.entity.response.JServicesDevelopResponse;
import com.ruoyi.jjh.ent.entity.response.ProjectTrackingResponse;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.jjh.declaration.entity.BmsEnterpriseBasicInfo;
import com.ruoyi.jjh.ent.entity.JContacts;
import com.ruoyi.jjh.ent.entity.JEnterpriseContact;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.response.*;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -47,17 +48,17 @@ public interface JDataScreenMapper {
List<JIndustryDepthResponse> getIndustryDepth();
/**
*
*
*
* @return
*/
List<JBigMiddleIndustryResponse> getMiddleIndustry();
/**
*
*
*
* @return
*/
List<JAllIndustryResponse> getBigIndustry();
}

@ -0,0 +1,46 @@
package com.ruoyi.jjh.ent.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.JProjectFund;
import com.ruoyi.jjh.ent.entity.response.FundStatisticsResponse;
import com.ruoyi.jjh.ent.entity.response.JProjectFundResponse;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* j_policy_fund访
* @author du
* @since 2024/7/15 13:57
*/
public interface JProjectFundMapper extends BaseMapper<JProjectFund> {
/**
* id
*
* @return
*/
List<JProjectFund> selectFund(@Param("creditCode") String creditCode,@Param("projectSmallType") String projectSmallType);
/**
* -
*/
List<FundStatisticsResponse> fundStatistics();
/**
* - TOP5
*/
List<JProjectFundResponse> appropriationTop5();
/**
* -
*/
List<JProject> getEnterpriseProject(@Param("type") Integer type,@Param("creditCode") String creditCode);
/**
* -
*/
List<JProjectFundResponse> usualFund(String username);
}

@ -26,13 +26,19 @@ public interface JServicesListMapper extends BaseMapper<JServicesList> {
*/
Page<JServicesList> page(Page<JServicesList> page, @Param("req") JServicesListRequest js);
/**
* 3
*/
Page<JServicesList> page1(Page<JServicesList> page, @Param("req")JServicesListRequest js);
/**
*
*/
List<JServicesListCountResponse> selectAllServicesCount();
/**
*
*
*/
JServicesListCountResponse selectAllZbCount();
}

@ -1,8 +1,10 @@
package com.ruoyi.jjh.ent.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.jjh.ent.entity.HomeRequestSmart;
import com.ruoyi.jjh.ent.entity.JSmartDeclaration;
import com.ruoyi.jjh.ent.entity.request.JRemindChiefAllRequest;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -20,13 +22,13 @@ public interface JSmartDeclarationMapper extends BaseMapper<JSmartDeclaration> {
*
* @return
*/
List<HomeRequestSmart> selectEnterpriseAllList(@Param("userName") String userName);
Page<HomeRequestSmart> selectEnterpriseAllList(Page<HomeRequestSmart> page,@Param("userName") String userName,@Param("alertContent") String alertContent);
/**
*
*
* @return
*/
List<HomeRequestSmart> chiefAll(@Param("userId") Long userId, @Param("projectId") Long projectId);
Page<HomeRequestSmart> chiefAll(Page<HomeRequestSmart> page,@Param("req") JRemindChiefAllRequest req);
}

@ -0,0 +1,49 @@
package com.ruoyi.jjh.ent.service;
import com.ruoyi.jjh.ent.entity.JMemorandum;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.JProjectFund;
import com.ruoyi.jjh.ent.entity.request.JTop5FundRequest;
import com.ruoyi.jjh.ent.entity.response.JServicesDevelopResponse;
import com.ruoyi.jjh.ent.entity.response.ThreeYearsFundResponse;
import java.util.List;
/**
*
*
* @author du
* @since 2024/7/31 15:16
*/
public interface JChiefWorkService {
/**
* -
*/
List<JServicesDevelopResponse> servicesDevelop();
/**
* - TOP5
*/
List<JProjectFund> getTop5Fund(JTop5FundRequest a);
/**
* -
*/
List<JProject> currentYearFinish();
/**
* -
*/
List<JProject> projectTrace();
/**
* -
*/
List<JMemorandum> memorandum();
/**
* -
*/
List<ThreeYearsFundResponse> getThreeYearsFund(String years);
}

@ -52,4 +52,6 @@ public interface JDataScreenService {
* @return
*/
List<JAllIndustryResponse> getAllIndustry();
}

@ -0,0 +1,44 @@
package com.ruoyi.jjh.ent.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.JProjectFund;
import com.ruoyi.jjh.ent.entity.response.FundStatisticsResponse;
import com.ruoyi.jjh.ent.entity.response.JProjectFundResponse;
import java.util.List;
/**
* j_policy_fund
* @author du
* @since 2024/8/8 15:36
*/
public interface JProjectFundService extends IService<JProjectFund> {
/**
* id
*
* @return
*/
List<JProjectFund> selectFund(Long id);
/**
* -
*/
List<FundStatisticsResponse> fundStatistics();
/**
* - TOP5
*/
List<JProjectFundResponse> appropriationTop5();
/**
* -
*/
List<JProject> getEnterpriseProject(Integer type,String creditCode);
/**
* -
*/
List<JProjectFundResponse> usualFund(String username);
}

@ -1,8 +1,10 @@
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.HomeRequestSmart;
import com.ruoyi.jjh.ent.entity.JSmartDeclaration;
import com.ruoyi.jjh.ent.entity.request.JRemindChiefAllRequest;
import java.util.List;
@ -20,7 +22,7 @@ public interface JSmartDeclarationService extends IService<JSmartDeclaration> {
*
* @return
*/
List<HomeRequestSmart> selectEnterpriseAllList(String userName);
Page<HomeRequestSmart> selectEnterpriseAllList(Page<HomeRequestSmart> page,String userName,String alertContent);
/**
@ -28,6 +30,6 @@ public interface JSmartDeclarationService extends IService<JSmartDeclaration> {
*
* @return
*/
List<HomeRequestSmart> chiefAll(Long userId, Long projectId);
Page<HomeRequestSmart> chiefAll(Page<HomeRequestSmart> page, JRemindChiefAllRequest req);
}

@ -0,0 +1,89 @@
package com.ruoyi.jjh.ent.service.impl;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.jjh.ent.entity.JMemorandum;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.JProjectFund;
import com.ruoyi.jjh.ent.entity.request.JTop5FundRequest;
import com.ruoyi.jjh.ent.entity.response.JServicesDevelopResponse;
import com.ruoyi.jjh.ent.entity.response.ThreeYearsFundResponse;
import com.ruoyi.jjh.ent.mapper.JChiefWorkMapper;
import com.ruoyi.jjh.ent.service.JChiefWorkService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDate;
import java.util.List;
/**
*
*
* @author du
* @since 2024/5/13 9:58
*/
@Service
public class JChiefWorkImpl implements JChiefWorkService {
@Resource
private JChiefWorkMapper jChiefWorkMapper;
/**
* -
*/
@Override
public List<JServicesDevelopResponse> servicesDevelop() {
return jChiefWorkMapper.servicesDevelop();
}
/**
* - TOP5
*/
@Override
public List<JProjectFund> getTop5Fund(JTop5FundRequest a) {
List<JProjectFund> top5Fund = jChiefWorkMapper.getTop5Fund(a);
if(a.getYearsChange() == 1){
top5Fund.forEach(x-> x.setAppropriationTime(String.valueOf(LocalDate.now().getYear()-1)));
}else {
top5Fund.forEach(x-> x.setAppropriationTime(LocalDate.now().getYear() - 3 +"-"+
(LocalDate.now().getYear() - 1)));
}
return top5Fund;
}
/**
* -
*/
@Override
public List<JProject> currentYearFinish() {
return jChiefWorkMapper.currentYearFinish();
}
/**
* -
*/
@Override
public List<JProject> projectTrace() {
return jChiefWorkMapper.projectTrace();
}
/**
* -
*/
@Override
public List<JMemorandum> memorandum() {
List<JMemorandum> memorandum = jChiefWorkMapper.memorandum();
memorandum.forEach(x->{
if(x.getContent().length()>10){
x.setContent(x.getContent().substring(0, 10)+"...");
}
});
return memorandum;
}
/**
* -
*/
@Override
public List<ThreeYearsFundResponse> getThreeYearsFund(String years) {
return jChiefWorkMapper.getThreeYearsFund( years);
}
}

@ -1,25 +1,26 @@
package com.ruoyi.jjh.ent.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.DesensitizedUtil;
import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.jjh.declaration.entity.BmsEnterpriseBasicInfo;
import com.ruoyi.jjh.declaration.entity.BmsEnterpriseDirectory;
import com.ruoyi.jjh.declaration.service.IBmsEnterpriseBasicInfoService;
import com.ruoyi.jjh.declaration.service.IBmsEnterpriseDirectoryService;
import com.ruoyi.jjh.ent.entity.JContacts;
import com.ruoyi.jjh.ent.entity.JEnterpriseContact;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.response.HonorResponse;
import com.ruoyi.jjh.ent.entity.response.JAllIndustryResponse;
import com.ruoyi.jjh.ent.entity.response.JBigMiddleIndustryResponse;
import com.ruoyi.jjh.ent.entity.response.JIndustryDepthResponse;
import com.ruoyi.jjh.ent.entity.response.JServicesDevelopResponse;
import com.ruoyi.jjh.ent.entity.response.ProjectTrackingResponse;
import com.ruoyi.jjh.ent.entity.JProjectFund;
import com.ruoyi.jjh.ent.entity.response.*;
import com.ruoyi.jjh.ent.mapper.JDataScreenMapper;
import com.ruoyi.jjh.ent.service.JContactsService;
import com.ruoyi.jjh.ent.service.JDataScreenService;
import com.ruoyi.jjh.ent.service.JHeadQuartersRevenueService;
import com.ruoyi.jjh.ent.service.JProjectService;
import com.ruoyi.jjh.ent.service.*;
import liquibase.pro.packaged.A;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
*
@ -39,10 +40,14 @@ public class JDataScreenImpl implements JDataScreenService {
@Resource
private IBmsEnterpriseBasicInfoService enterpriseBasicInfoService;
@Resource
private IBmsEnterpriseDirectoryService es;
@Resource
private JHeadQuartersRevenueService jHeadQuartersRevenueService;
@Resource
private JProjectFundService j1;
@Resource
private JContactsService jc;
/**
@ -128,203 +133,4 @@ public class JDataScreenImpl implements JDataScreenService {
});
return all;
}
// /**
// * 数据库脱敏
// */
// @Override
// public String sqltm() {
// //修改企业库的企业名称
//规上企业营收企业加密
// List<BmsEnterpriseBasicInfo> qyList = enterpriseBasicInfoService.list();
// List<BmsEnterpriseBasicInfo> neList = new ArrayList<>();
// for (BmsEnterpriseBasicInfo items : qyList) {
// String result = items.getQymc().substring(2, items.getQymc().length()-4);
// BmsEnterpriseBasicInfo be = new BmsEnterpriseBasicInfo();
// be.setId(items.getId());
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getQymc(), 0, 2);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// stringBuilder.append(items.getQymc().substring(items.getQymc().length()-4));
// be.setQymc(stringBuilder.toString());
// neList.add(be);
// }
// enterpriseBasicInfoService.updateBatchById(neList);
// //修改企业库的法人姓名
// List<BmsEnterpriseBasicInfo> qyList = enterpriseBasicInfoService.list();
// List<BmsEnterpriseBasicInfo> neList = new ArrayList<>();
// for (BmsEnterpriseBasicInfo items : qyList) {
// if(items.getFddbrxm()!=null){
// String result = items.getFddbrxm().substring(1, items.getFddbrxm().length() );
// BmsEnterpriseBasicInfo be = new BmsEnterpriseBasicInfo();
// be.setId(items.getId());
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getFddbrxm(), 0, 1);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// be.setFddbrxm(stringBuilder.toString());
// neList.add(be);
// }
// }
// enterpriseBasicInfoService.updateBatchById(neList);
// //修改企业库的法人姓名
// List<BmsEnterpriseBasicInfo> qyList = enterpriseBasicInfoService.list();
// List<BmsEnterpriseBasicInfo> neList = new ArrayList<>();
// for (BmsEnterpriseBasicInfo items : qyList) {
// if(items.getFddbrxm()!=null){
// String result = items.getFddbrxm().substring(1, items.getFddbrxm().length() );
// BmsEnterpriseBasicInfo be = new BmsEnterpriseBasicInfo();
// be.setId(items.getId());
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getFddbrxm(), 0, 1);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// be.setFddbrxm(stringBuilder.toString());
// neList.add(be);
// }
// }
// enterpriseBasicInfoService.updateBatchById(neList);
//修改企业库的手机号
// List<BmsEnterpriseBasicInfo> qyList = enterpriseBasicInfoService.list();
// List<BmsEnterpriseBasicInfo> neList = new ArrayList<>();
// for (BmsEnterpriseBasicInfo items : qyList) {
// if(items.getLxdh()!=null& !Objects.equals(items.getLxdh(), "")) {
// if (items.getLxdh().length() >= 10) {
// String result = items.getLxdh().substring(3, items.getLxdh().length() - 4);
// BmsEnterpriseBasicInfo be = new BmsEnterpriseBasicInfo();
// be.setId(items.getId());
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getLxdh(), 0, 3);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// stringBuilder.append(items.getLxdh().substring(items.getLxdh().length() - 4));
// be.setLxdh(stringBuilder.toString());
// neList.add(be);
// } else if(items.getLxdh().length() >= 4){
// String result = items.getLxdh().substring(2, items.getLxdh().length() - 2);
// BmsEnterpriseBasicInfo be = new BmsEnterpriseBasicInfo();
// be.setId(items.getId());
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getLxdh(), 0, 2);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// stringBuilder.append(items.getLxdh().substring(items.getLxdh().length() - 2));
// be.setLxdh(stringBuilder.toString());
// neList.add(be);
// }
// }
// }
// enterpriseBasicInfoService.updateBatchById(neList);
//规上企业营收企业加密
// List<BmsEnterpriseBasicInfo> jDataScreenMapper1 = jDataScreenMapper.get1();
// System.out.println(jDataScreenMapper1.size());
// List<BmsEnterpriseBasicInfo> neList = new ArrayList<>();
// for (BmsEnterpriseBasicInfo items : jDataScreenMapper1) {
// String result = items.getQymc().substring(2, items.getQymc().length()-4);
// BmsEnterpriseBasicInfo be = new BmsEnterpriseBasicInfo();
// be.setId(items.getId());
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getQymc(), 0, 2);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// stringBuilder.append(items.getQymc().substring(items.getQymc().length()-4));
// be.setQymc(stringBuilder.toString());
// neList.add(be);
// }
// for (BmsEnterpriseBasicInfo i : neList) {
// jDataScreenMapper.up(i);
// }
//联系人修改
// List<JContacts> list = jc.list();
// List<JContacts> newList = new ArrayList<>();
// for (JContacts items : list) {
// JContacts be = new JContacts();
// System.out.println(items.getDwAgencykey());
// be.setDwAgencykey(items.getDwAgencykey());
// if (items.getQymc() != null) {
// String result = items.getQymc().substring(2, items.getQymc().length() - 4);
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getQymc(), 0, 2);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// stringBuilder.append(items.getQymc().substring(items.getQymc().length() - 4));
// be.setQymc(stringBuilder.toString());
// }
// if (items.getLlrxm() != null & !Objects.equals(items.getLlrxm(), "")) {
// String result = items.getLlrxm().substring(1, items.getLlrxm().length());
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getLlrxm(), 0, 1);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// be.setLlrxm(stringBuilder.toString());
// }
// if (items.getDzyx() != null & !Objects.equals(items.getDzyx(), "")) {
// StringBuilder stringBuilder = new StringBuilder();
// for (int i = 0; i < 4; i++) {
// stringBuilder.append("*");
// }
// String result = items.getDzyx().substring(4, items.getDzyx().length());
// stringBuilder.append(result);
// be.setDzyx(stringBuilder.toString());
// }
// if (items.getYddh() != null &!Objects.equals(items.getYddh(), "")) {
// if (items.getYddh().length() >= 10) {
// String result = items.getYddh().substring(3, items.getYddh().length() - 4);
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getYddh(), 0, 3);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// stringBuilder.append(items.getYddh().substring(items.getYddh().length() - 4));
// be.setYddh(stringBuilder.toString());
// } else if (items.getYddh().length() >= 4) {
// String result = items.getYddh().substring(2, items.getYddh().length() - 2);
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getYddh(), 0, 2);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// stringBuilder.append(items.getYddh().substring(items.getYddh().length() - 2));
// be.setYddh(stringBuilder.toString());
// }
// }
// newList.add(be);
// }
// jc.updateBatchById(newList);
//
// //修改总部企业
// List<BmsEnterpriseBasicInfo> qyList = jDataScreenMapper.getjh();
// List<BmsEnterpriseBasicInfo> neList = new ArrayList<>();
// for (BmsEnterpriseBasicInfo items : qyList) {
// String result = items.getQymc().substring(2, items.getQymc().length()-4);
// BmsEnterpriseBasicInfo be = new BmsEnterpriseBasicInfo();
// be.setId(items.getId());
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getQymc(), 0, 2);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// stringBuilder.append(items.getQymc().substring(items.getQymc().length()-4));
// be.setQymc(stringBuilder.toString());
// neList.add(be);
// }
// for (BmsEnterpriseBasicInfo i : neList) {
// jDataScreenMapper.upjh(i);
// }
// return null;
// }
}

@ -0,0 +1,95 @@
package com.ruoyi.jjh.ent.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.JProjectFund;
import com.ruoyi.jjh.ent.entity.response.FundStatisticsResponse;
import com.ruoyi.jjh.ent.entity.response.JProjectFundResponse;
import com.ruoyi.jjh.ent.mapper.JProjectFundMapper;
import com.ruoyi.jjh.ent.service.JProjectFundService;
import com.ruoyi.jjh.ent.service.JProjectService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* j_policy_fund
* @author du
* @since 2024/8/8 15:36
*/
@Service
public class JProjectFundServiceImpl extends ServiceImpl<JProjectFundMapper, JProjectFund> implements JProjectFundService {
@Resource
private JProjectService jProjectService;
/**
* id
*
* @return
*/
@Override
public List<JProjectFund> selectFund(Long id) {
JProject jp = jProjectService.getById(id);
if(jp.getProjectSmallType()!=3&jp.getProjectSmallType()!=7){
throw new ServiceException("暂无资金拨付!");
}else {
if(jp.getProjectSmallType()==3){
return baseMapper.selectFund(jp.getCreditCode(),"区级总部");
} else {
return baseMapper.selectFund(jp.getCreditCode(),"市级服务业领军");
}
}
}
/**
* -
*/
@Override
public List<FundStatisticsResponse> fundStatistics() {
return baseMapper.fundStatistics();
}
/**
* - TOP5
*/
@Override
public List<JProjectFundResponse> appropriationTop5() {
return baseMapper.appropriationTop5();
}
/**
* -
*/
@Override
public List<JProject> getEnterpriseProject(Integer type,String creditCode) {
return baseMapper.getEnterpriseProject(type,creditCode);
}
/**
* -
*/
@Override
public List<JProjectFundResponse> usualFund(String username) {
List<JProjectFundResponse> jpf = baseMapper.usualFund(username);
List<JProject> list = jProjectService.lambdaQuery().eq(JProject::getCreditCode, username).list();
for (JProject x : list) {
for (JProjectFundResponse y : jpf) {
if(x.getProjectSmallType()==3& "区级总部".equals(y.getProjectName())){
y.setProjectBigType(1);
y.setProjectId(x.getId());
}
if(x.getProjectSmallType()==7& "市级服务业领军".equals(y.getProjectName())){
y.setProjectBigType(4);
y.setProjectId(x.getId());
}
}
}
return jpf;
}
}

@ -29,7 +29,11 @@ public class JServicesListServiceImpl extends ServiceImpl<JServicesListMapper, J
*/
@Override
public Page<JServicesList> page(Page<JServicesList> page, JServicesListRequest js) {
return baseMapper.page(page, js);
// if("3".equals(js.getServicesType())){
// return baseMapper.page1(page, js);
// }else {
return baseMapper.page(page, js);
// }
}
/**

@ -1,8 +1,10 @@
package com.ruoyi.jjh.ent.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.entity.request.JRemindChiefAllRequest;
import com.ruoyi.jjh.ent.mapper.JSmartDeclarationMapper;
import com.ruoyi.jjh.ent.service.JSmartDeclarationService;
import org.springframework.stereotype.Service;
@ -24,8 +26,8 @@ public class JSmartDeclarationServiceImpl extends ServiceImpl<JSmartDeclarationM
* @return
*/
@Override
public List<HomeRequestSmart> selectEnterpriseAllList(String userName) {
return baseMapper.selectEnterpriseAllList(userName);
public Page<HomeRequestSmart> selectEnterpriseAllList(Page<HomeRequestSmart> page,String userName,String alertContent) {
return baseMapper.selectEnterpriseAllList(page,userName,alertContent);
}
/**
@ -34,8 +36,8 @@ public class JSmartDeclarationServiceImpl extends ServiceImpl<JSmartDeclarationM
* @return
*/
@Override
public List<HomeRequestSmart> chiefAll(Long userId, Long projectId) {
return baseMapper.chiefAll(userId, projectId);
public Page<HomeRequestSmart> chiefAll(Page<HomeRequestSmart> page, JRemindChiefAllRequest req) {
return baseMapper.chiefAll(page, req);
}
}

@ -68,6 +68,10 @@ public class JSmartRemindersServiceImpl extends ServiceImpl<JSmartRemindersMappe
if (jSmartReminders.getAlertManner() == 2) {
throw new ServiceException("不可新增不定期提醒!");
}
LocalDateTime nt = LocalDateTime.now().plusMinutes(5);
if(jSmartRemindersDq.getAlertTime().isBefore(nt)){
throw new ServiceException("提醒时间必须在当前时间5分钟后!");
}
save(jSmartReminders);
updateAndAdd(jSmartReminders, true);
return jSmartReminders.getId();

@ -5,6 +5,7 @@ import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.service.SysPasswordService;
import com.ruoyi.system.domain.SysLogininfor;
@ -34,6 +35,21 @@ public class SysLogininforController extends BaseController {
@Autowired
private SysPasswordService passwordService;
/**
* 访
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent')")
@GetMapping("/getNewSysLogininfor")
public AjaxResult getNewSysLogininfor() {
String str = null;
try {
str = SecurityUtils.getUsername();
} catch (Exception ignored) {
}
return success(logininforService.getNewSysLogininfor(str));
}
@PreAuthorize("@ss.hasPermi('monitor:logininfor:list')")
@GetMapping("/list")
public TableDataInfo list(SysLogininfor logininfor) {

@ -38,7 +38,7 @@ public class SysDictDataController extends BaseController {
@Autowired
private ISysDictTypeService dictTypeService;
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent')")
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov,ent,sightseer')")
@GetMapping("/getAllList")
public AjaxResult getAllList(SysDictData dictData) {
return success(dictDataService.selectDictDataList(dictData));

@ -63,8 +63,10 @@ spring:
multi-statement-allow: true
#自己客户端地址
returnUrl: http://39.101.188.84:9999/demo/JinJiHu
#returnUrl: http://192.168.0.110:80
#returnUrl: http://192.168.0.113:80
#定时任务更新企业信息和联系人的开启
updateEnterprise: false
#发送短信
isTiming: false
# 开发环境配置

@ -115,7 +115,9 @@ knife4j:
#自己客户端地址
returnUrl: https://idp.sipac.gov.cn/bms
#定时任务更新企业信息和联系人的开启
isTiming: true
updateEnterprise: true
#发送短信
isTiming: false
#企业端正式环境应用系统编号
enterpriseAppId: 03f70874-39e9-11ef-bbd6-fa163e2b2e10

@ -0,0 +1,112 @@
# 数据源配置
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
druid:
# 主库数据源
master:
# url: jdbc:mysql://localhost:3306/jingji_hu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:mysql://39.101.188.84:3307/jingji_hu_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
# password: root
password: Admin123@
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
url:
username:
password:
# 初始连接数
initialSize: 5
# 最小连接池数量
minIdle: 10
# 最大连接池数量
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置连接超时时间
connectTimeout: 30000
# 配置网络超时时间
socketTimeout: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000
# 配置检测连接是否有效
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
webStatFilter:
enabled: true
statViewServlet:
enabled: true
# 设置白名单,不填则允许所有访问
allow:
url-pattern: /druid/*
# 控制台管理用户名和密码
login-username: ruoyi
login-password: 123456
filter:
stat:
enabled: true
# 慢SQL记录
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true
#自己客户端地址
returnUrl: http://39.101.188.84:9999/demo/JinJiHuTest
#returnUrl: http://192.168.0.113:80
#定时任务更新企业信息和联系人的开启
updateEnterprise: false
#发送短信
isTiming: false
# 开发环境配置
server:
# 服务器的HTTP端口默认为8080
port: 9031
servlet:
# 应用的访问路径
context-path: /
tomcat:
# tomcat的URI编码
uri-encoding: UTF-8
# 连接数满后的排队数默认为100
accept-count: 1000
threads:
# tomcat最大线程数默认为200
max: 800
# Tomcat启动初始化的线程数默认值10
min-spare: 100
#企业端测试环境应用系统编号
enterpriseAppId: BwAWS8uh
# 应用私钥
enterpriseAppsecret: 03f70874-39e9-11ef-bbd6-fa163e2b2e10
#企业端单点登陆url
url: https://qytt.sipac.gov.cn/api/usercenter/User/ssoLogin
#企业端用户信息url
infoUrl: https://qytt.sipac.gov.cn/api/usercenter/User/getInfo
#短信发送接口
smsSend: http://zwyyone.sipac.gov.cn/ebus/szyqznzs/dx
#短信接收人号码新增
smsPhoneAdd: http://zwyyone.sipac.gov.cn/ebus/szyqznzs/dxhm
#测试类型
paramType: cs
#测试授权码
smsV: oVFPU1y1wYJIatvqrGoTAE5ycguUyjaY
#工单编号
code: SC24071600001
#短信PaaSID
paaSID: xdfwy
#短信token
smsToken: iM89cd4b0cGNVYAqKu7jl7EONyHgTa0N

@ -34,7 +34,7 @@ spring:
# 国际化资源文件路径
basename: i18n/messages
profiles:
active: druid
active: test
# 文件上传
servlet:
multipart:

@ -108,7 +108,8 @@
<select id="selectDeclarationRecordsToIdList"
resultType="com.ruoyi.jjh.declaration.entity.vo.BmsDeclarationRecordsQueryVo">
SELECT
a.*
a.*,
b.qymc as enterpriseName
FROM
bms_declaration_records AS a
inner join bms_template_record f on a.template_record_id = f.id
@ -206,7 +207,12 @@
</if>
<if test="isDeleted != null ">and a.is_deleted = #{isDeleted}</if>
</where>
order by FIELD(a.status, 0, 1, 2, 3,10,8,7,9,5),a.create_time desc, e.dict_sort desc
<if test="orderChange == 0">
order by a.create_time desc
</if>
<if test="orderChange == 1">
order by FIELD(a.status, 0, 1, 2, 3,10,8,7,9,5),a.create_time desc, e.dict_sort desc
</if>
</select>
<select id="getAddProject" resultType="com.ruoyi.jjh.ent.entity.JProject">
SELECT c.qymc as declareUnit,
@ -223,8 +229,7 @@
<select id="approvalList"
resultType="com.ruoyi.jjh.declaration.entity.vo.ApprovalDeclarationRecordsQueryVo">
SELECT
IF
( s.approval_status = 0, 0, NULL ) AS approvalStatus,
s.approval_status AS approvalStatus,
e.enterprise_directory,
i.LEVEL,
i.responsibility_unit,
@ -234,28 +239,25 @@
a.`status`,
a.template_record_id,
e.template_id,
a.id AS declarationRecordsId
a.id AS declarationRecordsId,
s.approval_time as approvalTime
FROM
bms_declaration_records a
INNER JOIN bms_enterprise_basic_info c ON a.credit_code = c.tyshxydm
INNER JOIN bms_template_record e ON a.template_record_id = e.id
INNER JOIN bms_template_info i ON e.template_id = i.id
INNER JOIN (
SELECT
a.*
FROM
bms_approval_info a
JOIN ( SELECT declaration_records_id, max( sort ) AS max_sort FROM bms_approval_info
LEFT JOIN bms_enterprise_basic_info c ON a.credit_code = c.tyshxydm
LEFT JOIN bms_template_record e ON a.template_record_id = e.id
LEFT JOIN bms_template_info i ON e.template_id = i.id
LEFT JOIN (SELECT *
FROM bms_approval_info
WHERE id IN (
SELECT MAX(id)
FROM bms_approval_info
GROUP BY declaration_records_id, approval_dept
)) s ON s.declaration_records_id = a.id
LEFT JOIN bms_process_info d on s.process_id = d.id
<where>
<if test="approvalDept != null">
approval_dept = #{approvalDept}
d.approval_dept = #{approvalDept}
</if>
</where>
GROUP BY declaration_records_id ) b ON a.declaration_records_id = b.declaration_records_id
AND a.sort = b.max_sort
) AS s ON a.id = s.declaration_records_id
AND is_before_data = 0
<where>
<if test="enterpriseDirectory != null and enterpriseDirectory != ''">and e.enterprise_directory like
concat('%', #{enterpriseDirectory},
'%')

@ -18,46 +18,6 @@
</foreach>
</delete>
<select id="selectTemplateRecordVo" parameterType="com.ruoyi.jjh.declaration.entity.dto.BmsTemplateRecordQueryDto"
resultType="com.ruoyi.jjh.declaration.entity.vo.BmsTemplateRecordQueryVo">
SELECT
a.id as templateRecordId,
a.status,
a.enterprise_directory,
b.project_small_type as projectClassify,
b.id as templateId,
b.template_name,
b.LEVEL,
a.road,
a.file_name,
a.start_time,
a.end_time,
b.responsibility_unit,
a.create_time
FROM
bms_template_record a
INNER JOIN bms_template_info b ON a.template_id = b.id
<where>
<if test="req.enterpriseDirectory != null and req.enterpriseDirectory != ''">and a.enterprise_directory
like
concat('%', #{req.enterpriseDirectory}, '%')
</if>
<if test="req.templateId != null ">and b.id = #{req.templateId}</if>
<if test="req.startTime != null ">
and date_format(a.create_time ,'%y%m%d') &gt;= date_format(#{req.startTime},'%y%m%d')
</if>
<if test="req.endTime != null ">
and date_format(a.create_time,'%y%m%d') &lt;= date_format(#{req.endTime},'%y%m%d')
</if>
<if test="req.road != null ">and a.road = #{req.road}</if>
<if test="req.level != null ">and b.level = #{req.level}</if>
<if test="req.responsibilityUnit != null ">and b.responsibility_unit = #{req.responsibilityUnit}</if>
<if test="req.templateName != null and templateName != ''">and b.template_name like concat('%',
#{req.templateName}, '%')
</if>
</where>
order by a.create_time desc
</select>
<select id="selectBmsTemplateRecordVoById" resultType="com.ruoyi.jjh.declaration.entity.vo.BmsTemplateRecordVo">
SELECT a.id,
a.template_id,
@ -66,17 +26,20 @@
a.end_time,
a.file_name,
a.road,
a.notes,
a.status,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
a.remark,
a.is_time,
a.is_approval,
b.responsibility_unit,
b.project_big_type as projectBigType,
b.project_middle_type as projectMiddleType,
b.project_small_type as projectSmallType
FROM bms_template_record a
inner JOIN bms_template_info b ON a.template_id = b.id
where a.id = #{id}
@ -113,5 +76,47 @@
AND end_time &gt;= NOW()
order by a.create_time desc
</select>
<select id="selectTemplateRecordVo"
resultType="com.ruoyi.jjh.declaration.entity.vo.BmsTemplateRecordQueryVo">
SELECT
a.id as templateRecordId,
a.status,
a.enterprise_directory,
b.project_small_type as projectClassify,
b.id as templateId,
b.template_name,
b.LEVEL,
a.road,
a.file_name,
a.start_time,
a.end_time,
b.responsibility_unit,
a.create_time,
a.create_by as createByName,
a.notes as notes
FROM
bms_template_record a
INNER JOIN bms_template_info b ON a.template_id = b.id
<where>
<if test="req.enterpriseDirectory != null and req.enterpriseDirectory != ''">and a.enterprise_directory
like
concat('%', #{req.enterpriseDirectory}, '%')
</if>
<if test="req.templateId != null ">and b.id = #{req.templateId}</if>
<if test="req.startTime != null ">
and date_format(a.create_time ,'%y%m%d') &gt;= date_format(#{req.startTime},'%y%m%d')
</if>
<if test="req.endTime != null ">
and date_format(a.create_time,'%y%m%d') &lt;= date_format(#{req.endTime},'%y%m%d')
</if>
<if test="req.road != null ">and a.road = #{req.road}</if>
<if test="req.level != null ">and b.level = #{req.level}</if>
<if test="req.responsibilityUnit != null ">and b.responsibility_unit = #{req.responsibilityUnit}</if>
<if test="req.templateName != null and req.templateName != ''">and b.template_name like concat('%',
#{req.templateName}, '%')
</if>
</where>
order by a.create_time desc
</select>
</mapper>

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.jjh.ent.mapper.JChiefWorkMapper">
<select id="servicesDevelop" resultType="com.ruoyi.jjh.ent.entity.response.JServicesDevelopResponse">
SELECT
a.develop_year,
a.quarterly AS quarterly,
IFNULL( a.value_added, 0 ) AS valueAdded,
IFNULL( a.increase_speed, 0 ) AS increaseSpeed,
IFNULL( a.gdp_proportion, 0 ) AS gdpProportion
FROM
j_services_develop a
WHERE
YEAR (
NOW()) - 1 = a.develop_year
AND a.quarterly IS NULL UNION
(
SELECT
c.develop_year,
c.quarterly AS quarterly,
IFNULL( c.value_added, 0 ) AS valueAdded,
IFNULL( c.increase_speed, 0 ) AS increaseSpeed,
IFNULL( c.gdp_proportion, 0 ) AS gdpProportion
FROM
j_services_develop c
WHERE
YEAR (
NOW()) = c.develop_year
AND c.quarterly IS NOT NULL
ORDER BY
c.quarterly DESC
LIMIT 1)
</select>
<select id="getTop5Fund" resultType="com.ruoyi.jjh.ent.entity.JProjectFund">
SELECT
IFNULL(ROUND(SUM(a.fund_amount) / 10000, 1 ),'-') AS fundAmount,
a.qymc,
a.project_name
FROM
j_project_fund a
<where>
<if test="req.type == 1 ">
and a.project_name = '区级总部'
</if>
<if test="req.type != 1 ">
and a.project_name != '区级总部'
</if>
<if test="req.yearsChange == 1 ">
and a.appropriation_time like concat('%',YEAR(NOW())-1,'%')
</if>
<if test="req.yearsChange != 1 ">
and SUBSTRING(a.appropriation_time, 1, 4) BETWEEN YEAR(DATE_SUB(CURDATE(), INTERVAL 3 YEAR)) AND YEAR(NOW())-1
</if>
</where>
group by
a.qymc,a.project_name
ORDER BY SUM(a.fund_amount) DESC
limit 5
</select>
<select id="currentYearFinish" resultType="com.ruoyi.jjh.ent.entity.JProject">
select *
from j_project
where status = 5 and project_year = YEAR(NOW())
order by update_time desc
limit 10;
</select>
<select id="projectTrace" resultType="com.ruoyi.jjh.ent.entity.JProject">
select *
from j_project
where status in(1,2,3)
order by create_time desc
limit 10;
</select>
<select id="memorandum" resultType="com.ruoyi.jjh.ent.entity.JMemorandum">
select *
from j_memorandum
order by create_time desc
limit 10;
</select>
<select id="getThreeYearsFund" resultType="com.ruoyi.jjh.ent.entity.response.ThreeYearsFundResponse">
SELECT
years,
service_type,
ROUND(plans_num,1) AS fundBudget,
IFNULL(ROUND(COALESCE ( one_adjustments, 0 ) + COALESCE ( two_adjustments, 0 ),1), 0 ) AS additionBudget,
IFNULL( ROUND(execute_num,1), 0 ) AS appropriationFund,
IFNULL(
ROUND( execute_num / ( COALESCE ( one_adjustments, 0 ) + COALESCE ( two_adjustments, 0 )+ COALESCE ( plans_num, 0 )) * 100, 0 ),
0
) AS implementationRate
FROM
j_dashboard
WHERE
years = #{years}
</select>
</mapper>

@ -25,6 +25,7 @@
COUNT(DISTINCT credit_code),
COUNT(*)) AS count
FROM j_project
where status = 5
GROUP BY project_big_type) AS rs ON a.dict_value = rs.project_big_type
LEFT JOIN (SELECT project_middle_type,
IF
@ -34,15 +35,18 @@
COUNT(DISTINCT credit_code),
COUNT(*)) AS count
FROM j_project
where status = 5
GROUP BY project_middle_type) AS ys ON b.dict_value = ys.project_middle_type
LEFT JOIN (SELECT project_small_type,
IF(project_small_type = 14, COUNT(DISTINCT credit_code), COUNT(*)) AS count
IF(project_small_type = 14 or project_small_type = 1 or project_small_type = 2
or project_small_type = 3 , COUNT(DISTINCT credit_code), COUNT(*)) AS count
FROM j_project
where status = 5
GROUP BY project_small_type) AS us ON c.dict_value = us.project_small_type
LEFT JOIN (SELECT ns.project_small_type,
COUNT(*) AS count
FROM j_project ns
WHERE YEAR(
WHERE status = 5 and YEAR(
NOW()) = ns.project_year
GROUP BY ns.project_small_type) AS ns ON c.dict_value = ns.project_small_type
WHERE a.dict_type = 'project_categories'
@ -56,9 +60,16 @@
COUNT(*) as count
FROM bms_declaration_records a
INNER JOIN bms_template_record b ON a.template_record_id = b.id
WHERE a.`status` != 0
WHERE a.status != 0
GROUP BY a.template_record_id
order by count desc
# SELECT a.alert_time,
# a.alert_content,
# b.project_small_type
# FROM j_smart_reminders a
# left JOIN j_project b on a.project_id = b.id
# where a.alert_type = 4 and NOW() > a.alert_time
# order by a.alert_time desc
</select>
<select id="servicesDevelop" resultType="com.ruoyi.jjh.ent.entity.response.JServicesDevelopResponse">
SELECT
@ -84,43 +95,37 @@
<select id="getIndustryDepth" resultType="com.ruoyi.jjh.ent.entity.response.JIndustryDepthResponse">
SELECT a.years,
a.industry_categories,
IFNULL(a.year_revenue / 10000, '-') AS yearRevenue,
IFNULL(a.add_value / 10000, '-') AS addValue,
IFNULL(a.growth / 10000, '-') AS growth,
IFNULL(a.gdp_proportion / 10000, '-') AS gdpProportion
IFNULL(ROUND(a.year_revenue / 10000, 1), '-') AS yearRevenue,
IFNULL(ROUND(a.add_value, 1) , '-') AS addValue,
IFNULL(ROUND(a.growth, 1), '-') AS growth,
IFNULL(ROUND(a.gdp_proportion, 2), '-') AS gdpProportion
FROM j_industry_depth a
WHERE a.years = YEAR(NOW()) - 1
</select>
<select id="getMiddleIndustry"
resultType="com.ruoyi.jjh.ent.entity.response.JBigMiddleIndustryResponse">
SELECT a.categories,
a.middle AS nameType,
IFNULL(ROUND(SUM(b.year_revenue) / 10000, 3), '-') AS yearRevenue,
IFNULL(ROUND(SUM(b.add_value) / 10000, 3), '-') AS addValue,
IFNULL(b.growth, '-') AS growth,
IFNULL(b.gdp_proportion, '-') AS gdpProportion
FROM j_industry_dictionary a
LEFT JOIN j_small_industry b ON a.middle_code = LEFT(b.small_code, 2)
WHERE b.years = YEAR(
NOW()) - 1 || b.years IS NULL
GROUP BY a.middle,
a.categories,
b.growth,
b.gdp_proportion
a.medium AS nameType,
IFNULL(ROUND(a.year_revenue / 10000, 1), '-') AS yearRevenue,
IFNULL(ROUND(a.add_value, 1), '-') AS addValue,
IFNULL(a.growth, '-') AS growth,
IFNULL(a.gdp_proportion, '-') AS gdpProportion
FROM j_medium_revenue a
WHERE a.years = YEAR( NOW()) - 1 and a.medium != ''
</select>
<select id="getBigIndustry" resultType="com.ruoyi.jjh.ent.entity.response.JAllIndustryResponse">
SELECT a.categories AS nameType,
IFNULL(ROUND(SUM(b.year_revenue) / 10000, 3), '-') AS yearRevenue,
IFNULL(ROUND(SUM(b.add_value) / 10000, 3), '-') AS addValue,
IFNULL(b.growth, '-') AS growth,
IFNULL(b.gdp_proportion, '-') AS gdpProportion
FROM j_industry_dictionary a
LEFT JOIN j_small_industry b ON a.middle_code = LEFT(b.small_code, 2)
WHERE b.years = YEAR(
NOW()) - 1 || b.years IS NULL
GROUP BY a.categories,
b.growth,
b.gdp_proportion
ORDER BY a.middle_code ASC
SELECT a.categories AS nameType,
a.categories_code,
IFNULL(ROUND(SUM(a.year_revenue/ 10000) , 1), '-') AS yearRevenue,
IFNULL(ROUND(SUM(a.add_value), 1), '-') AS addValue,
IFNULL(ROUND(AVG(a.growth), 1), '-') AS growth,
IFNULL(ROUND(SUM(a.gdp_proportion), 1), '-') AS gdpProportion
FROM j_medium_revenue a
WHERE a.years = YEAR( NOW()) - 1
GROUP BY
a.categories_code,
a.categories
</select>
</mapper>

@ -5,74 +5,77 @@
<mapper namespace="com.ruoyi.jjh.ent.mapper.JDevelopmentReportMapper">
<select id="getTemplateMetrics" resultType="com.ruoyi.jjh.ent.entity.response.JTemplateMetricsResponse">
SELECT
'服务业企业总数' as dataName,
null as years,
count(*) as count
from bms_enterprise_basic_info
UNION
SELECT
'规上企业总数' as dataName,
null as years,
sum(type = 1) as count
from bms_enterprise_basic_info
UNION
SELECT
'荣誉总数' as dataName,
project_year as years,
count(*) as count
from j_project
<where>
<if test="years!= null and years != '' ">
project_year = #{year}
</if>
</where>
UNION
'服务业企业总数' AS dataName,
'-' AS years,
count(*) AS count
FROM
bms_enterprise_basic_info UNION
SELECT
CASE services_type
WHEN '1' THEN '生产性服务业企业数'
WHEN '2' THEN '生活性服务业企业数'
WHEN '3' THEN '新兴服务业企业数'
ELSE '限上批零住餐企业数'
END as dataName,
years as years,
count(*) as count
from j_services_list
<where>
<if test="years!= null and years != '' ">
years = #{year}
</if>
</where>
GROUP BY
services_type
UNION
'规上企业总数' AS dataName,
'-' AS years,
sum( type = 1 ) AS count
FROM
bms_enterprise_basic_info UNION
SELECT
a.dict_label AS dataName,
IF(#{year} is null,null,rs.project_year) AS years,
IFNULL( rs.count, 0 ) AS count
'荣誉总数' AS dataName,
#{year} AS years,
count(*) AS count
FROM
sys_dict_data a
LEFT JOIN (
j_project
WHERE
project_year = #{year}
UNION
SELECT
project_big_type,
IF
(
project_big_type = 1
OR project_big_type = 9,
COUNT( DISTINCT credit_code ),
COUNT(*)) AS count,
project_year
CASE
services_type
WHEN '1' THEN
'生产性服务业企业数'
WHEN '2' THEN
'生活性服务业企业数'
WHEN '3' THEN
'新兴服务业企业数' ELSE '限上批零住餐企业数'
END AS dataName,
#{year} AS years,
IF
(
sum(
IF
( #{year} = years, 1, '-' )) = 0,
'-',
sum(
IF
( #{year} = years, 1, '-' ))) AS count
FROM
j_project
<where>
<if test="years!= null and years != '' ">
project_year = #{year}
</if>
</where>
j_services_list
GROUP BY
project_big_type
) AS rs ON a.dict_value = rs.project_big_type
services_type UNION SELECT
a.dict_label AS dataName,
#{year} AS years,
IFNULL( rs.count, '-' ) AS count
FROM
sys_dict_data a
LEFT JOIN (
SELECT
project_big_type,
IF
(
project_big_type = 1
OR project_big_type = 9,
COUNT( DISTINCT credit_code ),
COUNT(*)) AS count
FROM
j_project
WHERE
project_big_type IN ( '1', '4' )
AND project_year = #{year}
GROUP BY
project_big_type
) AS rs ON a.dict_value = rs.project_big_type
WHERE
a.dict_type = 'project_categories'
AND a.dict_value != 11
a.dict_type = 'project_categories'
AND a.dict_value IN (
'1',
'4'
)
</select>
</mapper>

@ -16,25 +16,16 @@
ELSE '服务业总部'
END as type,
a.hydm,
IFNULL( ROUND( a.revenue / 10000, 3 ), '-' ) AS revenue,
IFNULL( ROUND( a.taxation / 10000, 3 ), '-' ) AS taxation,
IFNULL( ROUND( a.revenue / 10000, 1 ), '-' ) AS revenue,
IFNULL( ROUND( a.taxation / 10000, 1 ), '-' ) AS taxation,
a.years,
IFNULL( a.output, '-' ) AS output,
IFNULL( a.sales, '-' ) AS sales
FROM
(
SELECT
a.*,
b.project_small_type
IFNULL( ROUND( a.output / 10000, 1 ), '-' ) AS output,
IFNULL( ROUND( a.sales / 10000, 1 ), '-' ) AS sales
FROM
j_headquarters_revenue a
LEFT JOIN j_project b ON a.tyshxydm = b.credit_code
WHERE
b.project_middle_type = 1
GROUP BY
a.tyshxydm
) a
<where>
b.project_middle_type = 1
<if test="req.qymc != null and req.qymc != '' ">
and a.qymc like concat('%',#{req.qymc},'%')
</if>
@ -61,25 +52,25 @@
'^(51|52|61|62|47|48|49|50|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46)'
</if>
<if test="req.projectSmallType != null">
and a.project_small_type = #{req.projectSmallType}
and b.project_small_type = #{req.projectSmallType}
</if>
</where>
</select>
<select id="selectZbCount" resultType="com.ruoyi.jjh.ent.entity.response.JHqCountResponse">
SELECT DISTINCT SUM(
IF
(a.project_small_type = 1, 1, 0)) AS count1,
SUM(
IF
(a.project_small_type = 2, 1, 0)) AS count2,
sum(
IF
(a.project_small_type = 3, 1, 0)) AS count3
FROM (SELECT a.*,
b.project_small_type
FROM j_headquarters_revenue a
LEFT JOIN j_project b ON a.tyshxydm = b.credit_code
WHERE b.project_middle_type = 1
GROUP BY a.tyshxydm) AS a
SELECT DISTINCT
SUM(
IF
( b.project_small_type = 1, 1, 0 )) AS count1,
SUM(
IF
( b.project_small_type = 2, 1, 0 )) AS count2,
sum(
IF
( b.project_small_type = 3, 1, 0 )) AS count3
FROM
j_headquarters_revenue a
LEFT JOIN j_project b ON a.tyshxydm = b.credit_code
WHERE
b.project_middle_type = 1
</select>
</mapper>

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.jjh.ent.mapper.JProjectFundMapper">
<select id="selectFund" resultType="com.ruoyi.jjh.ent.entity.JProjectFund">
SELECT
a.*
FROM
j_project_fund a
WHERE
a.project_name = #{projectSmallType} and a.tyshxydm=#{creditCode}
</select>
<select id="fundStatistics" resultType="com.ruoyi.jjh.ent.entity.response.FundStatisticsResponse">
SELECT
b.type,
ROUND( sum( a.fund_amount / 100000000 ), 1 ) AS fundSum
FROM
j_project_fund a
LEFT JOIN ( SELECT id, IF ( project_name = '区级总部' || project_name = '市级服务业领军', project_name, '其他' ) AS type FROM j_project_fund ) b ON a.id = b.id
GROUP BY
b.type
</select>
<select id="appropriationTop5" resultType="com.ruoyi.jjh.ent.entity.response.JProjectFundResponse">
SELECT
ROUND( a.fund_amount / 100000000, 1 ) AS fundAmount,
a.id,
a.qymc,
a.tyshxydm,
a.project_name,
a.appropriation_time,
IF
( a.project_name = '区级总部' || a.project_name = '市级服务业领军', b.id, NULL ) AS projectId
FROM
j_project_fund a
LEFT JOIN ( SELECT id,project_year, credit_code FROM j_project WHERE
project_small_type = 3 || project_small_type = 7 ) b ON a.tyshxydm = b.credit_code and SUBSTRING(a.appropriation_time, 1, 4) = b.project_year
GROUP BY
a.id,
a.fund_amount,
a.qymc, a.tyshxydm, a.project_name, a.appropriation_time, b.id
ORDER BY
a.fund_amount DESC
LIMIT 5
</select>
<select id="getEnterpriseProject" resultType="com.ruoyi.jjh.ent.entity.JProject">
SELECT
a.*
FROM
j_project a
<where>
<if test="creditCode != null and creditCode != '' ">
and a.credit_code = #{creditCode}
</if>
<if test="type == 1 ">
and a.status = 5
</if>
<if test="type == 2">
and a.status != 5
</if>
</where>
order by create_time desc
</select>
<select id="usualFund" resultType="com.ruoyi.jjh.ent.entity.response.JProjectFundResponse">
SELECT
IFNULL(ROUND( a.fund_amount / 10000, 1 ),'-') AS fundAmount,
a.id,
a.qymc,
a.tyshxydm,
a.project_name,
a.appropriation_time,
a.special_type,
a.summary
FROM
j_project_fund a
LEFT JOIN j_project b ON a.tyshxydm = b.credit_code
WHERE
a.tyshxydm = #{username}
GROUP BY
a.ID,
a.qymc, a.tyshxydm, a.project_name, a.appropriation_time,a.fund_amount,
a.special_type,
a.summary
order by a.fund_amount desc
LIMIT 10
</select>
</mapper>

@ -5,9 +5,13 @@
<mapper namespace="com.ruoyi.jjh.ent.mapper.JServicesListMapper">
<select id="page" resultType="com.ruoyi.jjh.ent.entity.JServicesList">
SELECT
a.*,
IFNULL( ROUND( b.revenue/ 100000, 3 ), '-' )
AS revenue,
a.id,
a.qymc,
a.tyshxydm,
a.djzctjlb,
a.hydm,
a.services_type,
IFNULL( ROUND( b.revenue/ 100000, 1 ), '-' ) AS revenue,
b.years
FROM
j_services_list a
@ -26,23 +30,67 @@
ORDER BY
a.id
</select>
<select id="page1" resultType="com.ruoyi.jjh.ent.entity.JServicesList">
SELECT
a.id,
a.qymc,
a.tyshxydm,
a.hydm,
'3' AS servicesType,
IFNULL( ROUND( b.revenue / 100000, 1 ), '-' ) AS revenue,
b.years
FROM
bms_enterprise_basic_info a
LEFT JOIN j_business_revenue b ON a.tyshxydm = b.tyshxydm COLLATE utf8mb4_general_ci
<where>
a.type = 1
<if test="req.qymc != null and req.qymc != '' ">
and a.qymc like concat('%',#{req.qymc},'%')
</if>
<if test="req.tyshxydm != null and req.tyshxydm != '' ">
and a.tyshxydm = #{req.tyshxydm}
</if>
</where>
</select>
<select id="selectAllServicesCount"
resultType="com.ruoyi.jjh.ent.entity.response.JServicesListCountResponse">
SELECT a.services_type,
count(*) AS qyCount,
IFNULL(b.add_value, '-') AS addValue,
IFNULL(ROUND(SUM(b.revenue) / 100000, 3), '-') AS allRevenue
FROM j_services_list a
LEFT JOIN j_business_revenue b ON a.tyshxydm = b.tyshxydm
GROUP BY a.services_type
ORDER BY a.services_type
SELECT
IFNULL( ROUND( SUM( a.revenue ) / 100000, 1 ), '-' ) AS allRevenue,
IFNULL( ROUND( a.add_value, 1 ), '-' ) AS addValue,
a.type AS servicesType,
b.qyCount AS qyCount
FROM
j_total_revenue a
LEFT JOIN ( SELECT a.services_type, count( * ) AS qyCount FROM j_services_list a GROUP BY a.services_type ) AS b ON a.type = b.services_type
WHERE
a.years = YEAR (NOW()) - 1
GROUP BY
a.type,
b.qyCount
# SELECT
# IFNULL( ROUND( a.revenue / 100000, 1 ), '-' ) AS allRevenue,
# IFNULL( ROUND( a.add_value, 1 ), '-' ) AS addValue,
# a.type AS servicesType,
# CASE
#
# WHEN a.type = 3 THEN
# ( SELECT COUNT(*) FROM bms_enterprise_basic_info WHERE type = 1 ) ELSE b.qyCount
# END AS qyCount
# FROM
# j_total_revenue a
# LEFT JOIN ( SELECT a.services_type, COUNT(*) AS qyCount FROM j_services_list a GROUP BY a.services_type ) AS b ON a.type = b.services_type
# WHERE
# a.years = YEAR (NOW()) - 1
# ORDER BY FIELD(a.type, 3, 1, 2, 4);
</select>
<select id="selectAllZbCount" resultType="com.ruoyi.jjh.ent.entity.response.JServicesListCountResponse">
SELECT 5 AS services_type,
count(*) AS qyCount,
IFNULL(ROUND(SUM(taxation) / 100000, 3), '-') AS allRevenue,
IFNULL(ROUND(SUM(IFNULL(revenue, 0)) / 100000, 3) + ROUND(SUM(IFNULL(output, 0)) / 100000, 3) +
ROUND(SUM(IFNULL(sales, 0)) / 100000, 3), '-') AS addValue
IFNULL(ROUND(SUM(taxation) / 100000, 1), '-') AS allRevenue,
IFNULL(ROUND(SUM(IFNULL(revenue, 0)) / 100000, 1) + ROUND(SUM(IFNULL(output, 0)) / 100000, 1) +
ROUND(SUM(IFNULL(sales, 0)) / 100000, 1), '-') AS addValue
FROM j_headquarters_revenue
</select>
</mapper>

@ -26,9 +26,12 @@
<if test="userName != null and userName != '' ">
and a.tyshxydm = #{userName}
</if>
<if test="alertContent != null and alertContent != '' ">
and c.alert_content like concat('%',#{alertContent},'%')
</if>
and a.alert_time &lt; NOW()
</where>
order by a.alert_time desc;
order by a.alert_time desc
</select>
<select id="chiefAll" resultType="com.ruoyi.jjh.ent.entity.HomeRequestSmart">
SELECT
@ -50,14 +53,17 @@
LEFT JOIN j_smart_reminders AS c ON a.smart_reminders_id = c.id
<where>
c.alert_recipients = 2
<if test="projectId != null and projectId != '' ">
and a.project_id = #{projectId}
<if test="req.projectId != null and req.projectId != '' ">
and a.project_id = #{req.projectId}
</if>
<if test="req.userId != null and req.userId != '' ">
and a.zw_id = #{req.userId}
</if>
<if test="userId != null and userId != '' ">
and a.zw_id = #{userId}
<if test="req.content != null and req.content != '' ">
and c.alert_content like concat('%', #{req.content}, '%')
</if>
and a.alert_time &lt; NOW()
</where>
order by a.alert_time desc;
order by a.alert_time desc
</select>
</mapper>

@ -0,0 +1,8 @@
苏州工业园区服务业发展情况
2023年4月
一、总体实力显著增强
产业规模高速增长,综合贡献明显提升。
近年来园区服务业保持持续增长态势截至目前园区服务业规上企业总计677家。2021年园区实现服务业增加值1674.4亿元占GDP比重达50.3%。2022年全年实现服务业增加值1753.18亿元占GDP比重49.9%。2023年1-3月实现服务业增加值405.95亿元同比增加4.2%。7大服务业核算行业①多式联运和运输代理业、②装卸报运和仓储业、③互联网和相关服务、软件信息服务业、④租赁和商务服务业、⑤居民服务、修理和其他服务业、⑥文化、体育和娱乐业、⑦科学研究和技术服务业2022年全年营收1311.71亿元增速达22%2023年1-3月实现营收348.34亿元同比增速35%。根据苏州市新兴服务业行业分类含金融服务、信息服务、物流服务、科技服务、商务中介服务、设计服务、人力资源服务、检验检测认证、低碳绿色服务、现代商贸、文化消费、旅游康养等12个类别2022年园区新兴服务业营收达1488.57亿元较上年增长24%。
二、产业结构持续优化
产业结构逐步优化生产性服务占主导。经过多年发展园区服务业产业结构逐渐多样化生产性服务业与生活性服务业基本形成73的格局。2022年生产性服务业增加值达到1199.5亿元占服务业增加值比重达68.4%。截至目前园区生产性服务业规上企业总计655家含部分工业企业。自2019年苏州市开展全市生产性服务业综合评价以来园区已连续两年考评优秀。37家园区企业入选苏州市生产性服务业领军企业占全市51%位居全市第一并成为苏州首个实现生产性服务业9大重点领域信息技术服务、研发设计、金融服务、检验检测认证、知识产权服务、节能环保服务、人力资源服务、现代供应链管理、商务服务全覆盖的区域。推动先进制造业和现代服务业深度融合发展2022年初园区获评江苏省两业融合深度融合试点地区。
城市活力不断提升,生活性服务显潜能。完成环金鸡湖商圈城市活力提升规划并正式发布,引导环金鸡湖商圈核心商业体差异定位、错位发展,金鸡湖景区获评第一批省级现代服务业高质量发展集聚示范区。积极引入北京及上海周边外溢资源,推动园区载体与国内优质品牌对接,加快发展"首店经济"(首店经济是指一个区域利用特有的资源优势,吸引国内外品牌在区域首次开设门店,目前园区大力推动"中国首店""苏州首店"落户园区)。通过开展"云购金鸡湖"等活动持续打造金鸡湖系列IP宣传园区特色消费场景在后疫情时代不断激发生活性服务业发展潜能。

@ -18,6 +18,11 @@ import java.math.BigDecimal;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Excel {
/**
*
*/
public boolean required() default false;
/**
* excel
*/

@ -42,6 +42,12 @@ public class XssFilter implements Filter {
throws IOException, ServletException {
HttpServletRequest req = (HttpServletRequest) request;
HttpServletResponse resp = (HttpServletResponse) response;
resp.setHeader("Access-Control-Allow-Origin", "http://39.101.188.84:9999");
// resp.setHeader("Access-Control-Allow-Origin", "https://idp.sipac.gov.cn");
resp.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE, PUT");
resp.setHeader("Access-Control-Max-Age", "3600");
resp.setHeader("Access-Control-Allow-Headers", "x-requested-with,Authorization,isrepeatsubmit,Content-Type");
resp.setHeader("Access-Control-Allow-Credentials", "true");
if (handleExcludeURL(req, resp)) {
chain.doFilter(request, response);
return;

@ -0,0 +1,152 @@
package com.ruoyi.common.utils;
import org.apache.commons.codec.binary.Base64;
import javax.crypto.Cipher;
import java.security.*;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
/**
* RSA
*
* @author ruoyi
**/
public class RsaUtils
{
// Rsa 私钥
public static String privateKey = "MIIBVQIBADANBgkqhkiG9w0BAQEFAASCAT8wggE7AgEAAkEA4Qj9AvP1YzQ28Z5L\n" +
"jgqlHl1tWu8lNN8u7nHe7XQLAQ2qYcRp9g8zPhJ8Gf33/++QsrE7RxEozcxL6Vv/\n" +
"WhJWqwIDAQABAkAcTrklCfMwS30t36+5anVi4HXFHpgbkoegzwov7I0F0Kndk81M\n" +
"WRPzriIsMWSKPwF5eS+FbopM+9qh6W8WFCyBAiEA88tPNwHuJ/35Z40jqspVYiTf\n" +
"TLrzrVmgaXCMFG7UdvsCIQDsTT7UTL4JvH5BUX488uouyZt/DFyXCyVQOFglj9hQ\n" +
"EQIhAJgIw//D3mdmRTDEneeWgqTP5cmOFQSYDidzHohnjWwdAiB721U2U+88DTek\n" +
"JwHjEnQbCANgCWuyo93v+UiCj64S8QIhAJs6G4SSKS2hvYKYF+ERqkt0GTaDviSP\n" +
"wg+zTdAgRmjr";
/**
*
*
* @param text
* @return
*/
public static String decryptByPrivateKey(String text) throws Exception
{
return decryptByPrivateKey(privateKey, text);
}
/**
*
*
* @param publicKeyString
* @param text
* @return
*/
public static String decryptByPublicKey(String publicKeyString, String text) throws Exception
{
X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(Base64.decodeBase64(publicKeyString));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PublicKey publicKey = keyFactory.generatePublic(x509EncodedKeySpec);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.DECRYPT_MODE, publicKey);
byte[] result = cipher.doFinal(Base64.decodeBase64(text));
return new String(result);
}
/**
*
*
* @param privateKeyString
* @param text
* @return
*/
public static String encryptByPrivateKey(String privateKeyString, String text) throws Exception
{
PKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec(Base64.decodeBase64(privateKeyString));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PrivateKey privateKey = keyFactory.generatePrivate(pkcs8EncodedKeySpec);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.ENCRYPT_MODE, privateKey);
byte[] result = cipher.doFinal(text.getBytes());
return Base64.encodeBase64String(result);
}
/**
*
*
* @param privateKeyString
* @param text
* @return
*/
public static String decryptByPrivateKey(String privateKeyString, String text) throws Exception
{
PKCS8EncodedKeySpec pkcs8EncodedKeySpec5 = new PKCS8EncodedKeySpec(Base64.decodeBase64(privateKeyString));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PrivateKey privateKey = keyFactory.generatePrivate(pkcs8EncodedKeySpec5);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.DECRYPT_MODE, privateKey);
byte[] result = cipher.doFinal(Base64.decodeBase64(text));
return new String(result);
}
/**
*
*
* @param publicKeyString
* @param text
* @return
*/
public static String encryptByPublicKey(String publicKeyString, String text) throws Exception
{
X509EncodedKeySpec x509EncodedKeySpec2 = new X509EncodedKeySpec(Base64.decodeBase64(publicKeyString));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PublicKey publicKey = keyFactory.generatePublic(x509EncodedKeySpec2);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
byte[] result = cipher.doFinal(text.getBytes());
return Base64.encodeBase64String(result);
}
/**
* RSA
*
* @return
*/
public static RsaKeyPair generateKeyPair() throws NoSuchAlgorithmException
{
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
keyPairGenerator.initialize(1024);
KeyPair keyPair = keyPairGenerator.generateKeyPair();
RSAPublicKey rsaPublicKey = (RSAPublicKey) keyPair.getPublic();
RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) keyPair.getPrivate();
String publicKeyString = Base64.encodeBase64String(rsaPublicKey.getEncoded());
String privateKeyString = Base64.encodeBase64String(rsaPrivateKey.getEncoded());
return new RsaKeyPair(publicKeyString, privateKeyString);
}
/**
* RSA
*/
public static class RsaKeyPair
{
private final String publicKey;
private final String privateKey;
public RsaKeyPair(String publicKey, String privateKey)
{
this.publicKey = publicKey;
this.privateKey = privateKey;
}
public String getPublicKey()
{
return publicKey;
}
public String getPrivateKey()
{
return privateKey;
}
}
}

@ -7,6 +7,7 @@ import com.ruoyi.common.annotation.Excels;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.exception.UtilException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.DictUtils;
@ -491,6 +492,12 @@ public class ExcelUtil<T> {
// 从map中得到对应列的field.
Field field = (Field) entry.getValue()[0];
Excel attr = (Excel) entry.getValue()[1];
boolean rq = attr.required();
if(rq){
if(StringUtils.isNull(val) || StringUtils.isEmpty(val.toString())) {
throw new ServiceException("第"+i+"行"+attr.name()+"单元格必填项未填写,请正确填写!");
}
}
// 取得类型,并根据对象类型设置值.
Class<?> fieldType = field.getType();
if (String.class == fieldType) {

@ -11,10 +11,7 @@ import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.exception.user.CaptchaException;
import com.ruoyi.common.exception.user.CaptchaExpireException;
import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.MessageUtils;
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.*;
import com.ruoyi.common.utils.ip.IpUtils;
import com.ruoyi.framework.manager.AsyncManager;
import com.ruoyi.framework.manager.factory.AsyncFactory;
@ -75,14 +72,20 @@ public class SysLoginService {
* @return
*/
public Map<String, Object> login(String username, String password, String code, String uuid, String userType) {
String strP = "";
try {
strP = RsaUtils.decryptByPrivateKey(password);
} catch (Exception e) {
throw new RuntimeException(e);
}
// 验证码校验
validateCaptcha(username, code, uuid);
// validateCaptcha(username, code, uuid);
// 登录前置校验
loginPreCheck(username, password);
loginPreCheck(username,strP);
// 用户验证
Authentication authentication = null;
try {
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, password);
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, strP);
AuthenticationContextHolder.setContext(authenticationToken);
// 该方法会去调用UserDetailsServiceImpl.loadUserByUsername
authentication = authenticationManager.authenticate(authenticationToken);

@ -1,6 +1,7 @@
package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.SysLogininfor;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -39,4 +40,8 @@ public interface SysLogininforMapper {
* @return
*/
public int cleanLogininfor();
/**
* 访
*/
SysLogininfor getNewSysLogininfor(@Param("userName") String str);
}

@ -37,4 +37,9 @@ public interface ISysLogininforService {
*
*/
public void cleanLogininfor();
/**
* 访
*/
SysLogininfor getNewSysLogininfor(String str);
}

@ -6,6 +6,10 @@ import com.ruoyi.system.service.ISysLogininforService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.time.Period;
import java.time.ZoneId;
import java.util.Date;
import java.util.List;
/**
@ -58,4 +62,26 @@ public class SysLogininforServiceImpl implements ISysLogininforService {
public void cleanLogininfor() {
logininforMapper.cleanLogininfor();
}
/**
* 访
*/
@Override
public SysLogininfor getNewSysLogininfor(String str) {
SysLogininfor ns = logininforMapper.getNewSysLogininfor(str);
if(ns!=null){
LocalDateTime ld = ns.getAccessTime().toInstant()
.atZone(ZoneId.systemDefault())
.toLocalDateTime();
Period period = Period.between(ld.toLocalDate(), LocalDateTime.now().toLocalDate());
int days = period.getDays() + (period.getMonths() * 30) + (period.getYears() * 365);
if(days>=90){
return ns;
}else {
return null;
}
}else {
return null;
}
}
}

@ -1,6 +1,13 @@
package com.ruoyi.system.service.impl;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.crypto.digest.DigestAlgorithm;
import cn.hutool.crypto.digest.Digester;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.domain.entity.SysRole;
@ -24,13 +31,17 @@ import com.ruoyi.system.service.ISysUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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 org.springframework.util.CollectionUtils;
import javax.validation.Validator;
import java.time.Instant;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
@ -55,7 +66,30 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
private SysUserPostMapper userPostMapper;
@Autowired
private ISysConfigService configService;
@Value("${smsSend}")
private String smsSend;
@Value("${smsPhoneAdd}")
private String smsPhoneAdd;
@Value("${paaSID}")
private String paaSID;
@Value("${smsToken}")
private String smsToken;
@Value("${code}")
private String code;
@Value("${smsV}")
private String smsV;
@Value("${paramType}")
private String paramType;
@Value("${isTiming}")
private Boolean isTiming;
/**
*
*
@ -230,6 +264,27 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
@Override
@Transactional
public int insertUser(SysUser user) {
if ("02".equals(user.getUserType()) & isTiming) {
if (user.getPhonenumber() != null) {
Digester sha256 = new Digester(DigestAlgorithm.SHA256);
String timestamp = String.valueOf(Instant.now().getEpochSecond());
String str = RandomUtil.randomString(30);
//请求头
HashMap<String, String> headers = new HashMap<>();//存放请求头,可以存放多个请求头
headers.put("x-tif-paasid", paaSID);
headers.put("x-tif-signature", sha256.digestHex(timestamp + smsToken + str + timestamp).toUpperCase());
headers.put("x-tif-timestamp", timestamp);
headers.put("x-tif-nonce", str);
Map<String, Object> js1 = new HashMap<>();//存放参数
js1.put("orderId", code);
js1.put("nums", user.getPhonenumber());
HttpResponse response = HttpRequest.post(smsPhoneAdd)
.addHeaders(headers)
.form(js1)
.execute();
System.out.println(response.body());
}
}
// 新增用户信息
int rows = userMapper.insertUser(user);
// 新增用户岗位关联

@ -40,6 +40,17 @@
</where>
order by info_id desc
</select>
<select id="getNewSysLogininfor" resultType="com.ruoyi.system.domain.SysLogininfor">
select info_id, user_name, ipaddr, status, msg, access_time from sys_logininfor
<where>
status = '0' and msg = '登录成功'
<if test="userName != null and userName != ''">
AND user_name = #{userName}
</if>
</where>
order by access_time desc
LIMIT 1 OFFSET 1
</select>
<delete id="deleteLogininforByIds" parameterType="Long">
delete from sys_logininfor where info_id in

Loading…
Cancel
Save