Merge branch 'dev' into dev_dz
| | |
| | | public interface CertificationMapper extends BaseMapper<Certification> { |
| | | |
| | | //查询资质明细列表 |
| | | IPage<Certification> getCertificationDetail(Page page, @Param("ew") QueryWrapper<Certification> ew); |
| | | IPage<Certification> getCertificationDetail(Page page, @Param("param") Certification certification); |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "资质附件地址") |
| | | private String fileUrl; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | } |
| | |
| | | //查询资质明细列表 |
| | | @Override |
| | | public IPage<Certification> getCertificationDetail(Page page, Certification certification) { |
| | | return certificationMapper.getCertificationDetail(page, QueryWrappers.queryWrappers(certification)); |
| | | return certificationMapper.getCertificationDetail(page, certification); |
| | | } |
| | | |
| | | //添加资质明细列表 |
| | | @Override |
| | | public int addCertificationDetail(Certification certification) { |
| | | if(null != certification.getId()){ |
| | | return certificationMapper.updateById(certification); |
| | | }else { |
| | | return certificationMapper.insert(certification); |
| | | } |
| | | return certificationMapper.insert(certification); |
| | | } |
| | | |
| | | //删除资质明细列表 |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.ruoyi.basic.mapper.CertificationMapper"> |
| | | <select id="getCertificationDetail" resultType="com.ruoyi.basic.pojo.Certification"> |
| | | select b.* |
| | | from ( select c.id,a.`name`, a.`code`,a.organization,a.explanation,a.first_issuance_date,a.latest_issuance_date,c.expire_time , c.image_url, |
| | | c.file_url FROM |
| | | (SELECT id,name,MIN(date_of_issuance) AS first_issuance_date, |
| | | MAX(date_of_issuance) AS latest_issuance_date, |
| | | c.`code`,c.organization,c.explanation |
| | | FROM |
| | | certification c |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | GROUP BY |
| | | name) a left join certification c on a.id=c.id |
| | | ) b |
| | | SELECT * FROM certification |
| | | <where> |
| | | create_time IN ( |
| | | SELECT MAX( create_time ) FROM certification WHERE create_time IS NOT NULL GROUP BY NAME ) |
| | | <if test="param.name != null and param.name != ''"> |
| | | AND name like concat('%',#{param.name},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | public Result<?> addLightningProtectionDetection(FeLightningProtection feLightningProtection, |
| | | @RequestPart(value = "file", required = false) MultipartFile file) { |
| | | if (ObjectUtils.isNotEmpty(file)) { |
| | | String s = FileSaveUtil.StoreFile(file); |
| | | String s = FileSaveUtil.uploadWordFile(file); |
| | | feLightningProtection.setSystemFileName(s); |
| | | feLightningProtection.setFileName(file.getOriginalFilename()); |
| | | } |
| | |
| | | } else { |
| | | IPage<AuxiliaryWorkingHoursDayDto> auxiliaryWorkingHoursDayDtoIPage = auxiliaryWorkingHoursDayMapper.selectAuxiliaryWorkingHoursDay(page, QueryWrappers.queryWrappers(auxiliaryWorkingHoursDayDto), ids); |
| | | for (AuxiliaryWorkingHoursDayDto record : auxiliaryWorkingHoursDayDtoIPage.getRecords()) { |
| | | record.setDateTime(record.getDateTime().substring(0, 10)); |
| | | record.setDateTime(ObjectUtils.isEmpty(record.getDateTime())? null : record.getDateTime().substring(0, 10)); |
| | | } |
| | | return auxiliaryWorkingHoursDayDtoIPage; |
| | | } |