测试bug修改

duhanyu
杜函宇 2 weeks ago
parent 112d7ac85b
commit b86adcbf72

@ -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) {

@ -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;
@ -78,6 +79,7 @@ public class BmsEnterpriseBasicInfoController extends BaseController {
/**
*
*/
@Transactional(rollbackFor = Exception.class)
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov')")
@ApiOperation(value = "导入企业基础信息列表")
@Log(title = "导入企业基础信息列表", businessType = BusinessType.IMPORT)
@ -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("导入成功");
}

@ -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,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=市监局")

@ -169,20 +169,20 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
public int approval(BmsApprovalInfoUpdateDto bmsApprovalInfoUpdateDto, Long id, Integer a) {
//获取审批之前的流程
BmsProcessInfo bmsProcessInfo = iBmsProcessInfoService.getById(id);
if (bmsApprovalInfoUpdateDto.getApprovalStatus() == 1) {
//根据审批之前的流程获取下一个流程id的详情数据
if (bmsProcessInfo.getNextProcessId() != 0) {
BmsProcessInfo newBmsProcessInfo = iBmsProcessInfoService.getById(bmsProcessInfo.getNextProcessId());
BmsApprovalInfo ar = new BmsApprovalInfo();
ar.setProcessId(bmsProcessInfo.getNextProcessId());
ar.setDeclarationRecordsId(bmsApprovalInfoUpdateDto.getDeclarationRecordsId());
ar.setApprovalStatus(0);
ar.setApprovalDept(newBmsProcessInfo.getApprovalDept());
ar.setSort(a + 1);
ar.setIsReview(0);
iBmsApprovalInfoService.save(ar);
}
}
// if (bmsApprovalInfoUpdateDto.getApprovalStatus() == 1) {
// //根据审批之前的流程获取下一个流程id的详情数据
// if (bmsProcessInfo.getNextProcessId() != 0) {
// BmsProcessInfo newBmsProcessInfo = iBmsProcessInfoService.getById(bmsProcessInfo.getNextProcessId());
// BmsApprovalInfo ar = new BmsApprovalInfo();
// ar.setProcessId(bmsProcessInfo.getNextProcessId());
// ar.setDeclarationRecordsId(bmsApprovalInfoUpdateDto.getDeclarationRecordsId());
// ar.setApprovalStatus(0);
// ar.setApprovalDept(newBmsProcessInfo.getApprovalDept());
// ar.setSort(a + 1);
// ar.setIsReview(0);
// iBmsApprovalInfoService.save(ar);
// }
// }
BmsDeclarationRecords bmsDeclarationRecords = baseMapper.selectById(bmsApprovalInfoUpdateDto.getDeclarationRecordsId());
BmsEnterpriseBasicInfo one = iBmsEnterpriseBasicInfoService.lambdaQuery().eq(BmsEnterpriseBasicInfo::getTyshxydm, bmsDeclarationRecords.getCreditCode()).one();
JProject jp = new JProject();

@ -12,6 +12,7 @@ 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;
@ -44,13 +45,12 @@ public class JChiefWorkController extends BaseController {
/**
* -
* ( 2318)
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "政务端-工作台 近三年资金拨付情况")
@GetMapping("/threeYearsFund")
public AjaxResult getThreeYearsFund() {
return success();
@GetMapping("/threeYearsFund/{years}")
public AjaxResult getThreeYearsFund(@PathVariable String years) {
return success(jChiefWorkService.getThreeYearsFund(years));
}
/**

@ -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;
}

@ -5,6 +5,7 @@ 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;
@ -41,4 +42,9 @@ public interface JChiefWorkMapper{
* -
*/
List<JMemorandum> memorandum();
/**
* -
*/
List<ThreeYearsFundResponse> getThreeYearsFund(String years);
}

@ -5,6 +5,7 @@ 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;
@ -40,4 +41,9 @@ public interface JChiefWorkService {
* -
*/
List<JMemorandum> memorandum();
/**
* -
*/
List<ThreeYearsFundResponse> getThreeYearsFund(String years);
}

@ -6,6 +6,7 @@ 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;
@ -77,4 +78,12 @@ public class JChiefWorkImpl implements JChiefWorkService {
});
return memorandum;
}
/**
* -
*/
@Override
public List<ThreeYearsFundResponse> getThreeYearsFund(String years) {
return jChiefWorkMapper.getThreeYearsFund( years);
}
}

@ -26,6 +26,7 @@ public class JProjectFundServiceImpl extends ServiceImpl<JProjectFundMapper, JP
@Resource
private JProjectService jProjectService;
/**
* id
*
@ -75,6 +76,20 @@ public class JProjectFundServiceImpl extends ServiceImpl<JProjectFundMapper, JP
*/
@Override
public List<JProjectFundResponse> usualFund(String username) {
return baseMapper.usualFund(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;
}
}

@ -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

@ -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 req.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,
@ -113,5 +73,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>

@ -57,7 +57,7 @@
</where>
group by
a.qymc,a.project_name
ORDER BY a.fund_amount DESC
ORDER BY SUM(a.fund_amount) DESC
limit 5
</select>
<select id="currentYearFinish" resultType="com.ruoyi.jjh.ent.entity.JProject">
@ -80,4 +80,20 @@
order by create_time desc
limit 10;
</select>
<select id="getThreeYearsFund" resultType="com.ruoyi.jjh.ent.entity.response.ThreeYearsFundResponse">
SELECT
years,
service_type,
plans_num AS fundBudget,
IFNULL(( COALESCE ( one_adjustments, 0 ) + COALESCE ( two_adjustments, 0 )), 0 ) AS additionBudget,
IFNULL( execute_num, 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>

@ -69,8 +69,7 @@
a.qymc,
a.tyshxydm,
a.project_name,
a.appropriation_time,
MAX(IF(a.project_name = '区级总部' OR a.project_name = '市级服务业领军', b.project_big_type, NULL)) AS projectBigType
a.appropriation_time
FROM
j_project_fund a
LEFT JOIN j_project b ON a.tyshxydm = b.credit_code
@ -79,6 +78,7 @@
GROUP BY
a.ID,
a.qymc, a.tyshxydm, a.project_name, a.appropriation_time,a.fund_amount
order by a.fund_amount desc
LIMIT 10
</select>
</mapper>

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

@ -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) {

Loading…
Cancel
Save