Merge remote-tracking branch 'origin/master'
This commit is contained in:
+48
@@ -0,0 +1,48 @@
|
||||
package com.jero.modules.laws.enterprise.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardDeclare;
|
||||
import com.jero.modules.laws.enterprise.entity.vo.EnterpriseStandardDeclareVo;
|
||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardDeclareService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 企标宣贯
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-02-12
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="企标宣贯")
|
||||
@RestController
|
||||
@RequestMapping("/enterprise/declare")
|
||||
@Slf4j
|
||||
public class EnterpriseStandardDeclareController extends JeroController<EnterpriseStandardDeclare, EnterpriseStandardDeclareService> {
|
||||
|
||||
@Resource
|
||||
private EnterpriseStandardDeclareService esDeclareService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "企标宣贯-分页列表查询")
|
||||
@ApiOperation(value="企标宣贯-分页列表查询", notes="企标宣贯-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(EnterpriseStandardDeclare esDeclare,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
||||
IPage<EnterpriseStandardDeclareVo> pageList= esDeclareService.queryPageList(esDeclare, pageNo, pageSize);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
}
|
||||
+22
-1
@@ -69,7 +69,7 @@ public class EnterpriseStandardDeclare implements Serializable {
|
||||
private Date declareDate;
|
||||
|
||||
/** 宣贯人 */
|
||||
@ApiModelProperty(value = "宣贯人")
|
||||
@ApiModelProperty(value = "宣贯人id")
|
||||
private String declareUser;
|
||||
|
||||
/** 主题 */
|
||||
@@ -83,4 +83,25 @@ public class EnterpriseStandardDeclare implements Serializable {
|
||||
/** 内容 */
|
||||
@ApiModelProperty(value = "内容")
|
||||
private String declareContent;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "企标名称")
|
||||
private String standardName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "宣贯开始日期")
|
||||
private Date declareStartDate;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "宣贯结束日期")
|
||||
private Date declareEndDate;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "宣贯人姓名")
|
||||
private String declareUserName;
|
||||
|
||||
}
|
||||
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.jero.modules.laws.enterprise.entity.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author: Mzaxd
|
||||
* @Date: 2023/9/7 14:53
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class EnterpriseStandardDeclareVo {
|
||||
|
||||
@ApiModelProperty(value = "企标编号")
|
||||
private String standardNo;
|
||||
|
||||
@ApiModelProperty(value = "企标名称")
|
||||
private String standardName;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "发布日期")
|
||||
private Date releaseDate;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "实施日期")
|
||||
private Date implementationDate;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "宣贯日期")
|
||||
private Date declareDate;
|
||||
|
||||
@ApiModelProperty(value = "宣贯人id")
|
||||
private String declareUser;
|
||||
|
||||
@ApiModelProperty(value = "宣贯人姓名")
|
||||
private String declareUserName;
|
||||
|
||||
@ApiModelProperty(value = "相关材料id")
|
||||
private String declareFile;
|
||||
|
||||
@ApiModelProperty(value = "相关材料文件名")
|
||||
private String declareFileName;
|
||||
}
|
||||
+10
@@ -1,7 +1,10 @@
|
||||
package com.jero.modules.laws.enterprise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardDeclare;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.modules.laws.enterprise.entity.vo.EnterpriseStandardDeclareVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @author ThinkBook
|
||||
@@ -11,6 +14,13 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface EnterpriseStandardDeclareMapper extends BaseMapper<EnterpriseStandardDeclare> {
|
||||
|
||||
/**
|
||||
* 宣贯列表
|
||||
* @param page
|
||||
* @param esDeclare
|
||||
* @return
|
||||
*/
|
||||
IPage<EnterpriseStandardDeclareVo> page(IPage<EnterpriseStandardDeclareVo> page, @Param("param") EnterpriseStandardDeclare esDeclare);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+39
@@ -25,4 +25,43 @@
|
||||
standard_no,declare_date,declare_user,
|
||||
declare_topic,declare_file,declare_content
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="page" resultType="com.jero.modules.laws.enterprise.entity.vo.EnterpriseStandardDeclareVo">
|
||||
SELECT
|
||||
d.id,
|
||||
s.standard_no,
|
||||
s.standard_name,
|
||||
s.release_date,
|
||||
s.implementation_date,
|
||||
d.declare_date,
|
||||
d.declare_user,
|
||||
CONCAT(u.username, '(', u.work_no, ')') AS declareUserName,
|
||||
d.declare_file,
|
||||
f.file_name AS declareFileName
|
||||
FROM
|
||||
`laws_enterprise_standard_declare` AS d
|
||||
LEFT JOIN laws_enterprise_standard AS s ON d.standard_no = s.standard_no
|
||||
LEFT JOIN oss_file AS f ON f.id = d.declare_file
|
||||
LEFT JOIN sys_user AS u ON u.id = d.declare_user
|
||||
Where 1 = 1
|
||||
<!--企标编号判断-->
|
||||
<if test="param.standardNo != null and param.standardNo != ''">
|
||||
AND s.standard_no LIKE CONCAT('%',#{param.standardNo},'%')
|
||||
</if>
|
||||
<!--企标名称判断-->
|
||||
<if test="param.standardName != null and param.standardName != ''">
|
||||
AND s.standard_name LIKE CONCAT('%',#{param.standardName},'%')
|
||||
</if>
|
||||
<!--宣贯日期判断-->
|
||||
<if test="param.declareStartDate != null and param.declareEndDate != null">
|
||||
AND d.declare_date BETWEEN #{param.declareStartDate} AND #{param.declareEndDate}
|
||||
</if>
|
||||
<!--宣贯人判断-->
|
||||
<if test="param.declareUserName != null and param.declareUserName != ''">
|
||||
AND u.username LIKE CONCAT('%',#{param.declareUserName},'%')
|
||||
</if>
|
||||
ORDER BY
|
||||
d.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+12
@@ -1,7 +1,11 @@
|
||||
package com.jero.modules.laws.enterprise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardDeclare;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.laws.enterprise.entity.vo.EnterpriseStandardDeclareVo;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @author ThinkBook
|
||||
@@ -10,4 +14,12 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface EnterpriseStandardDeclareService extends IService<EnterpriseStandardDeclare> {
|
||||
|
||||
/**
|
||||
* 企标宣贯列表
|
||||
* @param esDeclare
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
IPage<EnterpriseStandardDeclareVo> queryPageList(EnterpriseStandardDeclare esDeclare, Integer pageNo, Integer pageSize);
|
||||
}
|
||||
|
||||
+14
@@ -1,11 +1,17 @@
|
||||
package com.jero.modules.laws.enterprise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardDeclare;
|
||||
import com.jero.modules.laws.enterprise.entity.vo.EnterpriseStandardDeclareVo;
|
||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardDeclareService;
|
||||
import com.jero.modules.laws.enterprise.mapper.EnterpriseStandardDeclareMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @author ThinkBook
|
||||
* @description 针对表【laws_enterprise_standard_declare】的数据库操作Service实现
|
||||
@@ -15,6 +21,14 @@ import org.springframework.stereotype.Service;
|
||||
public class EnterpriseStandardDeclareServiceImpl extends ServiceImpl<EnterpriseStandardDeclareMapper, EnterpriseStandardDeclare>
|
||||
implements EnterpriseStandardDeclareService{
|
||||
|
||||
@Resource
|
||||
private EnterpriseStandardDeclareMapper esDeclareMapper;
|
||||
|
||||
@Override
|
||||
public IPage<EnterpriseStandardDeclareVo> queryPageList(EnterpriseStandardDeclare esDeclare, Integer pageNo, Integer pageSize) {
|
||||
IPage<EnterpriseStandardDeclareVo> page = new Page<>(pageNo, pageSize);
|
||||
return esDeclareMapper.page(page, esDeclare);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user