4-12 审查流程入库页面展示

This commit is contained in:
yuezhihang
2022-04-12 17:40:20 +08:00
parent 362f82c639
commit f96714b0d2
10 changed files with 266 additions and 141 deletions
@@ -8,6 +8,7 @@ import com.adc.da.login.util.IDMUtil;
import com.adc.da.login.util.JwtUtils; import com.adc.da.login.util.JwtUtils;
import com.adc.da.sys.entity.UserEO; import com.adc.da.sys.entity.UserEO;
import com.adc.da.sys.service.IUserEOService; import com.adc.da.sys.service.IUserEOService;
import com.adc.da.util.Encodes;
import com.adc.da.util.PasswordUtils; import com.adc.da.util.PasswordUtils;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@@ -17,10 +18,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import sun.misc.BASE64Encoder; import sun.misc.BASE64Encoder;
import javax.servlet.http.Cookie; import javax.servlet.http.Cookie;
@@ -29,6 +27,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.List; import java.util.List;
@@ -78,6 +77,33 @@ public class LoginRestController {
} }
} }
@ApiOperation(value = "登录")
// @GetMapping(value = "/login")
@GetMapping(value = "/checkPage")
@ResponseBody
public ResponseMessage<String> checkPage(@RequestParam @NotNull(message = "请输入用户名") String username) throws UnsupportedEncodingException {
username =new String(Encodes.decodeBase64(username), StandardCharsets.UTF_8);
UserEO userEO = userService.getUserByLoginNameNotDeleted(username);
if (null == userEO) {
log.info("用户[{}]身份验证失败", username);
return Result.error("r0011", "您输入的帐号不存在");
}
if(userEO.getDisableFlag()==1){
log.info("用户[{}]身份验证失败", username);
return Result.error("r0011", "您输入的帐号已禁用");
}
String token = jwtUtils.generateToken(userEO.getUsid());
// 加密重要信息
BASE64Encoder encoder = new BASE64Encoder();
userEO.setToken(token);
String userStr = JSON.toJSONString(userEO);
String userStr2 = URLEncoder.encode(userStr,"UTF-8");
userStr = encoder.encode(userStr2.getBytes());
return Result.success(userStr);
}
@ApiOperation(value = "登录") @ApiOperation(value = "登录")
@PostMapping(value = "/loginIdm") @PostMapping(value = "/loginIdm")
@@ -53,7 +53,7 @@ public class ProductDeptIssueController {
@GetMapping @GetMapping
@ApiOperation("查询产品规划部重点问题") @ApiOperation("查询产品规划部重点问题")
public ResponseMessage<IPage<ProductDeptIssue>> getProductDeptIssue(@RequestParam ProductDeptIssueVo wrapper){ public ResponseMessage<IPage<ProductDeptIssue>> getProductDeptIssue(ProductDeptIssueVo wrapper){
IPage<ProductDeptIssue> issueList = iProductDeptIssueService.getProductDeptIssue(wrapper); IPage<ProductDeptIssue> issueList = iProductDeptIssueService.getProductDeptIssue(wrapper);
return Result.success(issueList); return Result.success(issueList);
} }
@@ -64,7 +64,8 @@ public class ProductDeptIssueController {
boolean b = iProductDeptIssueService.updateProductDeptIssue(issue); boolean b = iProductDeptIssueService.updateProductDeptIssue(issue);
return Result.success(b); return Result.success(b);
} }
// 多态对接口具有可替换性接口 灵活性简化性易拓展 可替换的概念可以理解伟方法可以被同类重用
// 可扩充性可以理解为该方法可以添加子类而不影响现有代码,接口性就是指的是向子类提供一个公用的高级接口子类来集成完善这个接口中的方法来实现要求。
@PostMapping("/closeProductIssue") @PostMapping("/closeProductIssue")
@ApiOperation("关闭产品规划部重点问题") @ApiOperation("关闭产品规划部重点问题")
@@ -15,5 +15,6 @@ import org.apache.ibatis.annotations.Param;
@Mapper @Mapper
public interface BusinessDeptIssueDao extends BaseMapper<BusinessDeptIssue> { public interface BusinessDeptIssueDao extends BaseMapper<BusinessDeptIssue> {
IPage<BusinessDeptIssue> findPage(IPage<BusinessDeptIssue> page, @Param(Constants.WRAPPER) QueryWrapper<BusinessDeptIssue> queryWrapper); IPage<BusinessDeptIssue> findPage(IPage<BusinessDeptIssue> page, @Param(Constants.WRAPPER) QueryWrapper<BusinessDeptIssue> queryWrapper
,@Param("dept") String dept);
} }
@@ -1,6 +1,7 @@
package com.adc.da.slrs.sarStandUnqualified.dao; package com.adc.da.slrs.sarStandUnqualified.dao;
import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssue; import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssue;
import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssueVo;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -11,5 +12,6 @@ import org.apache.ibatis.annotations.Param;
public interface ProductDeptIssueDao extends BaseMapper<ProductDeptIssue> { public interface ProductDeptIssueDao extends BaseMapper<ProductDeptIssue> {
public IPage<ProductDeptIssue> findPage(IPage<ProductDeptIssue> page,@Param(Constants.WRAPPER) QueryWrapper<ProductDeptIssue> wrapper); public IPage<ProductDeptIssue> findPage1(IPage<ProductDeptIssue> page,@Param(Constants.WRAPPER) QueryWrapper<ProductDeptIssue> wrapper);
public IPage<ProductDeptIssue> findPage(IPage<ProductDeptIssue> page, @Param("ew") ProductDeptIssueVo objVo);
} }
@@ -97,4 +97,13 @@ public class BusinessDeptIssue {
@ExcelIgnore @ExcelIgnore
@TableField(exist = false) @TableField(exist = false)
private Integer pageSize; private Integer pageSize;
@TableField(exist = false)
private String responseInsId;
@TableField(exist = false)
private String responseInsName;
@TableField(exist = false)
private String responseUserName;
} }
@@ -71,4 +71,13 @@ public class ProductDeptIssue {
@TableField(exist = false) @TableField(exist = false)
private Integer pageSize; private Integer pageSize;
@TableField(exist = false)
private String responseInsId;
@TableField(exist = false)
private String responseInsName;
@TableField(exist = false)
private String responseUserName;
} }
@@ -63,9 +63,9 @@ public class BusinessDeptIssueService extends ServiceImpl<BusinessDeptIssueDao,
wrapper.like("product_type",pageVo.getProductType()); wrapper.like("product_type",pageVo.getProductType());
} }
if (pageVo.getResponseDept()!=null){ // if (pageVo.getResponseDept()!=null){
wrapper.like("response_dept",pageVo.getResponseDept()); // wrapper.like("response_dept",pageVo.getResponseDept());
} // }
/** /**
* 导出 * 导出
@@ -74,7 +74,7 @@ public class BusinessDeptIssueService extends ServiceImpl<BusinessDeptIssueDao,
wrapper.in("issue.ID",pageVo.getIdList()); wrapper.in("issue.ID",pageVo.getIdList());
} }
page = businessDeptIssueDao.findPage(page, wrapper); page = businessDeptIssueDao.findPage(page, wrapper,pageVo.getResponseDept());
return page; return page;
} }
@@ -37,29 +37,29 @@ public class ProductDeptIssueService extends ServiceImpl<ProductDeptIssueDao,Pro
@Override @Override
public IPage<ProductDeptIssue> getProductDeptIssue(ProductDeptIssueVo objVo) { public IPage<ProductDeptIssue> getProductDeptIssue(ProductDeptIssueVo objVo) {
IPage<ProductDeptIssue> page=new Page<>(objVo.getPage(),objVo.getPage()); IPage<ProductDeptIssue> page=new Page<>(objVo.getPage(),objVo.getPageSize());
QueryWrapper<ProductDeptIssue> wrapper = new QueryWrapper<>(); // QueryWrapper<ProductDeptIssue> wrapper = new QueryWrapper<>();
//查询条件 // //查询条件
if (objVo.getIsClose()!=null){ // if (objVo.getIsClose()!=null){
wrapper.like("is_close",objVo.getIsClose()); // wrapper.like("is_close",objVo.getIsClose());
} // }
//
//
if (objVo.getLawsNumber()!=null){ // if (objVo.getLawsNumber()!=null){
wrapper.like("laws.LAWS_NAME",objVo.getLawsName()) // wrapper.like("laws.LAWS_NAME",objVo.getLawsName())
.or() // .or()
.like("laws.LAWS_NUMBER",objVo.getLawsNumber()); // .like("laws.LAWS_NUMBER",objVo.getLawsNumber());
} // }
//
if (objVo.getPojName()!=null){ // if (objVo.getPojName()!=null){
wrapper.like("poj_name",objVo.getPojName()); // wrapper.like("poj_name",objVo.getPojName());
} // }
//
if (objVo.getResponseDept()!=null){ // if (objVo.getResponseDept()!=null){
wrapper.like("response_dept",objVo.getResponseDept()); // wrapper.like("response_dept",objVo.getResponseDept());
} // }
productDeptIssueDao.findPage(page,wrapper); productDeptIssueDao.findPage(page,objVo);
return page; return page;
} }
@@ -23,22 +23,32 @@
<select id="findPage" resultMap="BusinessIssuePage"> <select id="findPage" resultMap="BusinessIssuePage">
select t.* from ( select t.* from (
SELECT SELECT
issue.*,laws.LAWS_NUMBER,laws.LAWS_NAME issue.*,laws.LAWS_NUMBER,laws.LAWS_NAME,
us.INSTITUTION_ID as responseInsId,
tsins.name as responseInsName,
us.uname as responseUserName
FROM FROM
business_dept_issue AS issue business_dept_issue AS issue
LEFT JOIN sar_laws_stand_info AS laws LEFT JOIN sar_laws_stand_info AS laws
ON issue.law_id = laws.ID ON issue.law_id = laws.ID
left join ts_user as us on us.USID = issue.response_people
left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
${ew.customSqlSegment} ${ew.customSqlSegment}
UNION ALL UNION ALL
SELECT SELECT
issue.*, issue.*,
laws.STAND_CODE AS lawNumber, laws.STAND_CODE AS lawNumber,
laws.STAND_NAME AS lawName laws.STAND_NAME AS lawName,
us.INSTITUTION_ID as responseInsId,
tsins.name as responseInsName,
us.uname as responseUserName
FROM FROM
business_dept_issue AS issue business_dept_issue AS issue
LEFT JOIN sar_bussioness_stand AS laws LEFT JOIN sar_bussioness_stand AS laws
ON issue.law_id = laws.ID ON issue.law_id = laws.ID
left join ts_user as us on us.USID = issue.response_people
left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
${ew.customSqlSegment} ${ew.customSqlSegment}
UNION ALL UNION ALL
@@ -50,15 +60,22 @@
'-', '-',
laws.STAND_YEAR laws.STAND_YEAR
) AS lawNumber, ) AS lawNumber,
laws.STAND_NAME AS lawName laws.STAND_NAME AS lawName,
us.INSTITUTION_ID as responseInsId,
tsins.name as responseInsName,
us.uname as responseUserName
FROM FROM
business_dept_issue AS issue business_dept_issue AS issue
LEFT JOIN sar_standards_info AS laws LEFT JOIN sar_standards_info AS laws
ON issue.law_id = laws.ID ON issue.law_id = laws.ID
left join ts_user as us on us.USID = issue.response_people
left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
${ew.customSqlSegment} ${ew.customSqlSegment}
) t ) t
where t.LAWS_NAME is not null and t.LAWS_NUMBER is not null where t.LAWS_NAME is not null and t.LAWS_NUMBER is not null
<if test="null != dept and dept != ''">
and t.responseInsName like concat('%',#{dept},'%')
</if>
</select> </select>
</mapper> </mapper>
@@ -21,12 +21,72 @@
<select id="findPage" resultMap="ProductIssuePage"> <select id="findPage" resultMap="ProductIssuePage">
select a.* from (
SELECT SELECT
issue.*,laws.LAWS_NUMBER,laws.LAWS_NAME issue.*,
laws.LAWS_NUMBER,
laws.LAWS_NAME ,
us.INSTITUTION_ID as responseInsId,
tsins.name as responseInsName,
us.uname as responseUserName
FROM FROM
product_dept_issue AS issue product_dept_issue AS issue
LEFT JOIN sar_laws_stand_info AS laws LEFT JOIN sar_laws_stand_info AS laws ON issue.law_id = laws.ID
ON issue.law_id = laws.ID left join ts_user as us on us.USID = issue.response_dept
${ew.customSqlSegment} left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
WHERE 1=1
AND laws.LAWS_NAME is NOT NULL AND laws.LAWS_NUMBER is NOT NULL
<if test="null != ew.isClose and ew.isClose != ''">and issue.is_close like concat('%',#{ew.isClose},'%')
</if>
UNION all
SELECT
issue.*,
CONCAT(laws.
STAND_SORT,' ',laws.STAND_NUMBER,'-',laws.STAND_YEAR)as LAWS_NUMBER,
laws.STAND_NAME as LAWS_NAME,
us.INSTITUTION_ID as responseInsId,
tsins.name as responseInsName,
us.uname as responseUserName
FROM
product_dept_issue AS issue
LEFT JOIN sar_standards_info AS laws ON issue.law_id = laws.ID
left join ts_user as us on us.USID = issue.response_dept
left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
WHERE
1=1
AND laws.STAND_SORT is NOT NULL
<if test="null != ew.isClose and ew.isClose != ''">
and issue.is_close like concat('%',#{ew.isClose},'%')
</if>
UNION all
SELECT
issue.*,
laws.STAND_CODE as LAWS_NUMBER,
laws.STAND_NAME as LAWS_NAME,
us.INSTITUTION_ID as responseInsId,
tsins.name as responseInsName,
us.uname as responseUserName
FROM
product_dept_issue AS issue
LEFT JOIN sar_bussioness_stand AS laws ON issue.law_id = laws.ID
left join ts_user as us on us.USID = issue.response_dept
left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
WHERE
1=1
AND laws.STAND_CODE is NOT NULL AND laws.STAND_NAME is NOT NULL
<if test="null != ew.isClose and ew.isClose != ''">
and issue.is_close like concat('%',#{ew.isClose},'%')
</if>
)a
where 1=1
<if test="null != ew.lawsNumber and ew.lawsNumber != ''">
and ( a.LAWS_NUMBER like concat('%',#{ew.lawsNumber},'%') or a.LAWS_NAME like concat('%',#{ew.lawsNumber},'%') )
</if>
<if test="null != ew.responseInsName and ew.responseInsName != ''">
and a.responseInsName like concat('%',#{ew.responseInsName},'%')
</if>
</select> </select>
</mapper> </mapper>