fix:企业端分标委
This commit is contained in:
+36
@@ -112,6 +112,42 @@ public class PayCaseCommitteeSubitemController extends JeroController<PayCaseCom
|
||||
}
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业端分页列表查询
|
||||
*
|
||||
*/
|
||||
@ApiOperation(value="企业端分标委成员表-搜索", notes="企业端分标委成员表-搜索",response = FindByName.class)
|
||||
@GetMapping(value = "/findTwo")
|
||||
public Result<?> findTwo(
|
||||
@RequestParam(name="fenBiaoWeiName",required =false) String fenBiaoWeiName,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize
|
||||
) {
|
||||
//模糊查询%_特殊字符bug
|
||||
String fenBiaoWeiNames = oConvertUtils.replaceAllPercent(fenBiaoWeiName);
|
||||
LoginUser sysUser =(LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
Page<FindByName> page = new Page<>(pageNo, pageSize);
|
||||
IPage<FindByName> pageList = payCaseCommitteeSubitemService.listThreeTwo(page,sysUser.getId(),fenBiaoWeiNames);
|
||||
if (!CollectionUtils.isEmpty(pageList.getRecords())) {
|
||||
try {
|
||||
pageList.getRecords().forEach(p -> {
|
||||
if (!CollectionUtils.isEmpty(p.getList())) {
|
||||
for (ChildrenFindByName q:p.getList()
|
||||
) {
|
||||
if (!org.apache.commons.lang3.StringUtils.isBlank(q.getPhone())){
|
||||
q.setPhone(PasswordUtil.decrypt(q.getPhone()));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("手机号、邮箱解密异常!", e);
|
||||
}
|
||||
}
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
|
||||
-5
@@ -1,12 +1,7 @@
|
||||
package com.jero.data.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
+50
-14
@@ -98,6 +98,42 @@ public class PayCaseCouncilSubitemController extends JeroController<PayCaseCounc
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 理事会成员表
|
||||
*
|
||||
*/
|
||||
@RequiresPermissions("council:search")
|
||||
@ApiOperation(value="理事会成员表-搜索", notes="理事会成员表-搜索",response = FindByName.class)
|
||||
@GetMapping(value = "/findTwo")
|
||||
public Result<?> findTwo(
|
||||
@RequestParam(name="councilName",required =false) String councilName,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize
|
||||
) {
|
||||
//模糊查询%_特殊字符bug
|
||||
String councilNames = oConvertUtils.replaceAllPercent(councilName);
|
||||
LoginUser sysUser =(LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
Page<councilList> page = new Page<>(pageNo, pageSize);
|
||||
IPage<councilList> pageList = payCaseCouncilSubitemService.listThreeTwo(page,sysUser.getId(),councilNames);
|
||||
if (!CollectionUtils.isEmpty(pageList.getRecords())) {
|
||||
try {
|
||||
pageList.getRecords().forEach(p -> {
|
||||
if (!CollectionUtils.isEmpty(p.getList())) {
|
||||
for ( subCouncil q:p.getList()
|
||||
) {
|
||||
if (!org.apache.commons.lang3.StringUtils.isBlank(q.getPhone())){
|
||||
q.setPhone(PasswordUtil.decrypt(q.getPhone()));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("手机号、邮箱解密异常!", e);
|
||||
}
|
||||
}
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@@ -138,20 +174,20 @@ public class PayCaseCouncilSubitemController extends JeroController<PayCaseCounc
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 批量删除
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// @RequiresPermissions("council:batchDel")
|
||||
// @AutoLog(value = "理事会成员-批量删除")
|
||||
// @ApiOperation(value="理事会成员-批量删除", notes="理事会成员-批量删除")
|
||||
// @GetMapping(value = "/deleteBatch")
|
||||
// public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
// this.payCaseCouncilSubitemService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
// return Result.OK("批量删除成功!");
|
||||
// }
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("council:batchDel")
|
||||
@AutoLog(value = "理事会成员-批量删除")
|
||||
@ApiOperation(value="理事会成员-批量删除", notes="理事会成员-批量删除")
|
||||
@GetMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.payCaseCouncilSubitemService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
//
|
||||
// /**
|
||||
// * 通过id查询
|
||||
|
||||
@@ -21,6 +21,9 @@ public class FindByName implements Serializable {
|
||||
@ApiModelProperty(value = "备注")
|
||||
private java.lang.String remarks;
|
||||
|
||||
@ApiModelProperty(value = "负责人")
|
||||
private java.lang.String principal;
|
||||
|
||||
@ApiModelProperty(value = "子目录分标委成员")
|
||||
private List<ChildrenFindByName> list;
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@ public class councilList implements Serializable {
|
||||
@ApiModelProperty(value = "目标简称")
|
||||
private String remarks;
|
||||
|
||||
@ApiModelProperty(value = "负责人")
|
||||
private java.lang.String principal;
|
||||
|
||||
@ApiModelProperty(value = "理事会成员")
|
||||
private List<subCouncil> list;
|
||||
|
||||
|
||||
+2
@@ -31,5 +31,7 @@ public interface PayCaseCommitteeSubitemMapper extends BaseMapper<PayCaseCommitt
|
||||
|
||||
List<ChooseExcelWorkingGroup> chooseExcel(ArrayList<String> idList);
|
||||
|
||||
IPage<FindByName> listThreeTwo(Page<FindByName> page,@Param("id") String id, @Param("fenBiaoWeiNames")String fenBiaoWeiNames);
|
||||
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -26,4 +26,5 @@ public interface PayCaseCouncilSubitemMapper extends BaseMapper<PayCaseCouncilSu
|
||||
|
||||
List<ChooseExcelCouncil> listForExcel(@Param("contactsNames")String contactsNames, @Param("companyNames")String companyNames,@Param("councilNames") String councilNames);
|
||||
|
||||
IPage<councilList> listThreeTwo(Page<councilList> page, @Param("id")String id,@Param("councilNames") String councilNames);
|
||||
}
|
||||
|
||||
+43
@@ -104,4 +104,47 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 企业端分标委查询-->
|
||||
<resultMap id="peopleTwo" type="com.jero.data.entity.FindByName">
|
||||
<id property="id" column="id"></id>
|
||||
<result property="name" column="name"></result>
|
||||
<result property="remarks" column="remarks"></result>
|
||||
<result property="principal" column="create_by"></result>
|
||||
<collection property="list" ofType="com.jero.data.entity.ChildrenFindByName" javaType="java.util.List" select="listForChildrenTwo" column="{pid=id}" >
|
||||
<id property="childrenId" column="childrenId"></id>
|
||||
<result property="companyName" column="company_name"></result>
|
||||
<result property="post" column="post"></result>
|
||||
<result property="phone" column="phone"></result>
|
||||
<result property="peopleName" column="peopleName"></result>
|
||||
</collection>
|
||||
</resultMap>
|
||||
<select id="listThreeTwo" resultMap="peopleTwo">
|
||||
SELECT pe.id as id,pe.name as name,pe.abbreviation,pe.remarks,pe.create_by as principal
|
||||
from
|
||||
pay_case_committee pe
|
||||
left JOIN pay_case_committee_subitem pm on (pe.id = pm.committee_id)
|
||||
left JOIN pay_contacts_management pt on (pm.contacts_id = pt.id)
|
||||
left join pay_company_management pcm on(pm.company_id=pcm.id)
|
||||
<where>
|
||||
<if test=" fenBiaoWeiName!=null and fenBiaoWeiName != ''">
|
||||
AND pe.name LIKE CONCAT('%',#{fenBiaoWeiName},'%')
|
||||
</if>
|
||||
<if test="id!=null and id != ''">
|
||||
AND pm.contacts_id = #{id}
|
||||
</if>
|
||||
</where>
|
||||
group by pe.id
|
||||
order by pe.create_time desc
|
||||
</select>
|
||||
<select id="listForChildrenTwo" resultType="com.jero.data.entity.ChildrenFindByName">
|
||||
SELECT pt.name as peopleName,if(pcm.status=1,pcm.company_name,CONCAT(pcm.company_name,'(待审核)')) as companyName,pt.post as post,pt.phone as phone ,pm.id as childrenId
|
||||
from
|
||||
pay_case_committee_subitem pm
|
||||
left JOIN pay_contacts_management pt on (pm.contacts_id = pt.id) left join pay_company_management pcm on(pm.company_id=pcm.id)
|
||||
<where>
|
||||
pm.committee_id = #{pid}
|
||||
</where>
|
||||
order by pm.create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
+39
-1
@@ -92,7 +92,45 @@
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 企业端理事会列表-->
|
||||
<resultMap id="peopleTwo" type="com.jero.data.entity.councilList">
|
||||
<id property="id" column="id"></id>
|
||||
<result property="name" column="name"></result>
|
||||
<result property="remarks" column="remarks"></result>
|
||||
<result property="principal" column="create_by"></result>
|
||||
<collection property="list" ofType="com.jero.data.entity.subCouncil" javaType="java.util.List" select="listForChildrenTwo" column="{pid=id,companyName=companyName,tname=tname}" >
|
||||
<id property="id" column="id"></id>
|
||||
<result property="companyName" column="companyName"></result>
|
||||
<result property="post" column="post"></result>
|
||||
<result property="phone" column="phone"></result>
|
||||
<result property="peopleName" column="peopleName"></result>
|
||||
</collection>
|
||||
</resultMap>
|
||||
<select id="listThreeTwo" resultMap="peopleTwo">
|
||||
SELECT pe.id as id,pe.name as name,pe.remarks,pe.create_by as principal
|
||||
from
|
||||
pay_case_council pe
|
||||
left JOIN pay_case_council_subitem pm on (pe.id = pm.council_id)
|
||||
left JOIN pay_contacts_management pt on (pm.contacts_id = pt.id)
|
||||
left join pay_company_management pcm on(pm.company_id=pcm.id)
|
||||
<where>
|
||||
<if test=" councilNames!=null and councilNames != ''">
|
||||
AND pe.name LIKE CONCAT('%',#{councilNames},'%')
|
||||
</if>
|
||||
<if test=" id!=null and id != ''">
|
||||
AND pm.contacts_id = #{id}
|
||||
</if>
|
||||
</where>
|
||||
group by pe.id
|
||||
order by pe.create_time desc
|
||||
</select>
|
||||
<select id="listForChildrenTwo" resultType="com.jero.data.entity.subCouncil">
|
||||
SELECT pt.name as peopleName,if(pcm.status=1,pcm.company_name,CONCAT(pcm.company_name,'(待审核)')) as companyName,pt.post as post,pt.phone as phone ,pm.id as id
|
||||
from
|
||||
pay_case_council_subitem pm
|
||||
left JOIN pay_contacts_management pt on (pm.contacts_id = pt.id) left join pay_company_management pcm on(pm.company_id=pcm.id)
|
||||
where pm.council_id = #{pid} order by pm.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+3
@@ -30,4 +30,7 @@ public interface IPayCaseCommitteeSubitemService extends IService<PayCaseCommitt
|
||||
List<ChooseExcelWorkingGroup> listForExcel(String name, String companyName, String councilName);
|
||||
|
||||
List<ChooseExcelWorkingGroup> chooseExcel(ArrayList<String> idList);
|
||||
|
||||
IPage<FindByName> listThreeTwo(Page<FindByName> page, String id, String fenBiaoWeiNames);
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -25,4 +25,6 @@ public interface IPayCaseCouncilSubitemService extends IService<PayCaseCouncilSu
|
||||
|
||||
List<ChooseExcelCouncil> chooseExcel(ArrayList<String> idList);
|
||||
|
||||
IPage<councilList> listThreeTwo(Page<councilList> page, String id, String councilNames);
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -55,4 +55,9 @@ public class PayCaseCommitteeSubitemServiceImpl extends ServiceImpl<PayCaseCommi
|
||||
public List<ChooseExcelWorkingGroup> chooseExcel(ArrayList<String> idList) {
|
||||
return payCaseCommitteeSubitemMapper.chooseExcel(idList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<FindByName> listThreeTwo(Page<FindByName> page, String id, String fenBiaoWeiNames) {
|
||||
return payCaseCommitteeSubitemMapper.listThreeTwo(page,id,fenBiaoWeiNames);
|
||||
}
|
||||
}
|
||||
|
||||
+5
@@ -42,5 +42,10 @@ public class PayCaseCouncilSubitemServiceImpl extends ServiceImpl<PayCaseCouncil
|
||||
return payCaseCouncilSubitemMapper.chooseExcel(idList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<councilList> listThreeTwo(Page<councilList> page, String id, String councilNames) {
|
||||
return payCaseCouncilSubitemMapper.listThreeTwo(page,id,councilNames);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+15
-15
@@ -21,12 +21,12 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @Description: pay_research_project
|
||||
* @Description: 在研项目
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2021-12-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="pay_research_project")
|
||||
@Api(tags="在研项目")
|
||||
@RestController
|
||||
@RequestMapping("/payResearchProject/payResearchProject")
|
||||
@Slf4j
|
||||
@@ -43,8 +43,8 @@ public class PayResearchProjectController extends JeroController<PayResearchProj
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "pay_research_project-分页列表查询")
|
||||
@ApiOperation(value="pay_research_project-分页列表查询", notes="pay_research_project-分页列表查询")
|
||||
@AutoLog(value = "在研项目-分页列表查询")
|
||||
@ApiOperation(value="在研项目-分页列表查询", notes="在研项目-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<?> queryPageList(PayResearchProject payResearchProject,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@@ -62,8 +62,8 @@ public class PayResearchProjectController extends JeroController<PayResearchProj
|
||||
* @param payResearchProject
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "pay_research_project-添加")
|
||||
@ApiOperation(value="pay_research_project-添加", notes="pay_research_project-添加")
|
||||
@AutoLog(value = "在研项目-添加")
|
||||
@ApiOperation(value="在研项目-添加", notes="在研项目-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody PayResearchProject payResearchProject) {
|
||||
payResearchProjectService.save(payResearchProject);
|
||||
@@ -76,8 +76,8 @@ public class PayResearchProjectController extends JeroController<PayResearchProj
|
||||
* @param payResearchProject
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "pay_research_project-编辑")
|
||||
@ApiOperation(value="pay_research_project-编辑", notes="pay_research_project-编辑")
|
||||
@AutoLog(value = "在研项目-编辑")
|
||||
@ApiOperation(value="在研项目-编辑", notes="在研项目-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody PayResearchProject payResearchProject) {
|
||||
payResearchProjectService.updateById(payResearchProject);
|
||||
@@ -90,8 +90,8 @@ public class PayResearchProjectController extends JeroController<PayResearchProj
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "pay_research_project-通过id删除")
|
||||
@ApiOperation(value="pay_research_project-通过id删除", notes="pay_research_project-通过id删除")
|
||||
@AutoLog(value = "在研项目-通过id删除")
|
||||
@ApiOperation(value="在研项目-通过id删除", notes="在研项目-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
payResearchProjectService.removeById(id);
|
||||
@@ -104,8 +104,8 @@ public class PayResearchProjectController extends JeroController<PayResearchProj
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "pay_research_project-批量删除")
|
||||
@ApiOperation(value="pay_research_project-批量删除", notes="pay_research_project-批量删除")
|
||||
@AutoLog(value = "在研项目-批量删除")
|
||||
@ApiOperation(value="在研项目-批量删除", notes="在研项目-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.payResearchProjectService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
@@ -118,8 +118,8 @@ public class PayResearchProjectController extends JeroController<PayResearchProj
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "pay_research_project-通过id查询")
|
||||
@ApiOperation(value="pay_research_project-通过id查询", notes="pay_research_project-通过id查询")
|
||||
@AutoLog(value = "在研项目-通过id查询")
|
||||
@ApiOperation(value="在研项目-通过id查询", notes="在研项目-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
PayResearchProject payResearchProject = payResearchProjectService.getById(id);
|
||||
@@ -137,7 +137,7 @@ public class PayResearchProjectController extends JeroController<PayResearchProj
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PayResearchProject payResearchProject) {
|
||||
return super.exportXls(request, payResearchProject, PayResearchProject.class, "pay_research_project");
|
||||
return super.exportXls(request, payResearchProject, PayResearchProject.class, "在研项目");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ public class PayResearchProject implements Serializable {
|
||||
private java.lang.String draftCompany;
|
||||
/**过程文件*/
|
||||
@Excel(name = "过程文件", width = 15)
|
||||
@ApiModelProperty(value = "过程文件")
|
||||
@ApiModelProperty(value = "过程文件(多个都好隔开)")
|
||||
private java.lang.String files;
|
||||
/**项目进度*/
|
||||
@Excel(name = "项目进度", width = 15)
|
||||
|
||||
Reference in New Issue
Block a user