全所统计
This commit is contained in:
+27
-41
@@ -27,6 +27,7 @@ import com.jero.util.AmountUtil;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -142,61 +143,46 @@ public class PayCaseCommitteeSubitemController extends JeroController<PayCaseCom
|
||||
}
|
||||
|
||||
/**
|
||||
* 分标委选择导出-导出
|
||||
* 分标委表导出
|
||||
*
|
||||
*
|
||||
*/
|
||||
@ApiOperation(value="分标委选择导出-导出", notes="分标委选择导出-导出")
|
||||
@GetMapping(value = "/exportXlsChoose")
|
||||
public ModelAndView exportXls(@RequestParam(name = "ids",required = false) String ids) {
|
||||
@AutoLog(value = "分标委表导出-导出")
|
||||
@ApiOperation(value="分标委表导出-导出", notes="分标委表导出-导出")
|
||||
@GetMapping(value = "/exportXls",produces = "text/text;charset=utf-8")
|
||||
public ModelAndView customExportXlsList(@RequestParam(name="name",required =false) String name,
|
||||
@RequestParam(name = "ids",required = false) String ids,
|
||||
@RequestParam(name="companyName",required =false) String companyName,
|
||||
@RequestParam(name="fenBiaoWeiName",required =false) String fenBiaoWeiName) {
|
||||
// ids为空表示搜索导出
|
||||
if (StringUtils.isBlank(ids)) {
|
||||
List<ChooseExcelWorkingGroup> list = payCaseCommitteeSubitemService.listForExcel(name, companyName, fenBiaoWeiName);
|
||||
return getModelAndView(list);
|
||||
} else {
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(ids.split(",")));
|
||||
List<ChooseExcelWorkingGroup> list= payCaseCommitteeSubitemService.chooseExcel(idList);
|
||||
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
try {
|
||||
list.forEach(p -> {
|
||||
if (!org.apache.commons.lang3.StringUtils.isBlank(p.getPhone())) {
|
||||
p.setPhone(PasswordUtil.decrypt(p.getPhone()));
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.error("手机号解密异常!", e);
|
||||
}
|
||||
}
|
||||
|
||||
return AmountUtil.exportListXls(list, ChooseExcelWorkingGroup.class,"邮寄票据");
|
||||
return getModelAndView(list);
|
||||
}
|
||||
/**
|
||||
* 分标委表搜索导出
|
||||
*
|
||||
*
|
||||
*/
|
||||
@AutoLog(value = "分标委表搜索导出-导出")
|
||||
@ApiOperation(value="分标委表搜索导出-导出", notes="分标委表搜索导出-导出")
|
||||
@GetMapping(value = "/exportXls",produces = "text/text;charset=utf-8")
|
||||
public ModelAndView customExportXlsList(@RequestParam(name="name",required =false) String name,
|
||||
@RequestParam(name="companyName",required =false) String companyName,
|
||||
@RequestParam(name="fenBiaoWeiName",required =false) String fenBiaoWeiName) {
|
||||
QueryWrapper<PayCaseCommittee> queryWrapper = Wrappers.query();
|
||||
List<FindByName> pageList = payCaseCommitteeSubitemService.listForExcel(name,companyName,fenBiaoWeiName,queryWrapper);
|
||||
if (!CollectionUtils.isEmpty(pageList)) {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private ModelAndView getModelAndView(List<ChooseExcelWorkingGroup> list) {
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
try {
|
||||
pageList.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()));
|
||||
}
|
||||
}
|
||||
list.forEach(p -> {
|
||||
if (!org.apache.commons.lang3.StringUtils.isBlank(p.getPhone())) {
|
||||
p.setPhone(PasswordUtil.decrypt(p.getPhone()));
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.error("手机号、邮箱解密异常!", e);
|
||||
log.error("手机号解密异常!", e);
|
||||
}
|
||||
}
|
||||
|
||||
return AmountUtil.exportListXls(pageList, FindByName.class, "分标委表导出");
|
||||
return AmountUtil.exportListXls(list, ChooseExcelWorkingGroup.class,"分标委表导出");
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验
|
||||
*/
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public interface PayCaseCommitteeSubitemMapper extends BaseMapper<PayCaseCommitt
|
||||
|
||||
List<FindByName> list4(@Param("pageNo") Integer pageNo,@Param("pageSize") Integer pageSize,@Param("name") String name,@Param("companyName") String companyName,@Param("fenBiaoWeiName") String fenBiaoWeiName,@Param(Constants.WRAPPER) Wrapper<PayCaseCommittee> wrapper);
|
||||
|
||||
List<FindByName> listForExcel (@Param("name") String name,@Param("companyName") String companyName,@Param("fenBiaoWeiName") String fenBiaoWeiName,@Param(Constants.WRAPPER) Wrapper<PayCaseCommittee> wrapper);
|
||||
List<ChooseExcelWorkingGroup> listForExcel (@Param("name") String name,@Param("companyName") String companyName,@Param("fenBiaoWeiName") String fenBiaoWeiName);
|
||||
|
||||
List<ChooseExcelWorkingGroup> chooseExcel(ArrayList<String> idList);
|
||||
|
||||
|
||||
+2
-2
@@ -33,8 +33,8 @@
|
||||
|
||||
</select>
|
||||
|
||||
<select id="listForExcel" resultMap="people">
|
||||
SELECT pe.id as id,pt.name as peopleName,pm.company_name as companyName,pt.post as post,pt.phone as phone ,pe.name as name,pm.id as childrenId
|
||||
<select id="listForExcel" resultType="com.jero.data.entity.ChooseExcelWorkingGroup">
|
||||
SELECT pt.name as peopleName,pm.company_name as companyName,pt.post as post,pt.phone as phone ,pe.name as name
|
||||
from
|
||||
pay_case_committee pe
|
||||
left JOIN pay_case_committee_subitem pm on (pe.id = pm.committee_id)
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public interface IPayCaseCommitteeSubitemService extends IService<PayCaseCommitt
|
||||
|
||||
List<FindByName> list4(Integer pageNo,Integer pageSize,String name,String companyName,String fenBiaoWeiName, QueryWrapper<PayCaseCommittee> queryWrapper);
|
||||
|
||||
List<FindByName> listForExcel(String name, String companyName, String fenBiaoWeiName, QueryWrapper<PayCaseCommittee> queryWrapper);
|
||||
List<ChooseExcelWorkingGroup> listForExcel(String name, String companyName, String fenBiaoWeiName);
|
||||
|
||||
List<ChooseExcelWorkingGroup> chooseExcel(ArrayList<String> idList);
|
||||
}
|
||||
|
||||
+2
-2
@@ -55,8 +55,8 @@ public class PayCaseCommitteeSubitemServiceImpl extends ServiceImpl<PayCaseCommi
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FindByName> listForExcel(String name, String companyName, String fenBiaoWeiName, QueryWrapper<PayCaseCommittee> queryWrapper) {
|
||||
return payCaseCommitteeSubitemMapper.listForExcel(name,companyName,fenBiaoWeiName, queryWrapper);
|
||||
public List<ChooseExcelWorkingGroup> listForExcel(String name, String companyName, String fenBiaoWeiName) {
|
||||
return payCaseCommitteeSubitemMapper.listForExcel(name,companyName,fenBiaoWeiName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user