资料维护

This commit is contained in:
zhangqinlin
2021-09-08 13:41:37 +08:00
parent faa7c3af56
commit 7f3736d2ef
18 changed files with 200 additions and 136 deletions
@@ -30,6 +30,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.Valid;
/** /**
@@ -141,7 +142,7 @@ public class PayCaseCommitteeSubitemController extends JeroController<PayCaseCom
@AutoLog(value = "分标委成员表-添加") @AutoLog(value = "分标委成员表-添加")
@ApiOperation(value="分标委成员表-添加", notes="分标委成员表-添加") @ApiOperation(value="分标委成员表-添加", notes="分标委成员表-添加")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<?> add(@RequestBody PayCaseCommitteeSubitemDTO payCaseCommitteeSubitemDTO) { public Result<?> add(@Valid @RequestBody PayCaseCommitteeSubitemDTO payCaseCommitteeSubitemDTO) {
PayCaseCommitteeSubitem payCaseCommitteeSubitem = new PayCaseCommitteeSubitem(); PayCaseCommitteeSubitem payCaseCommitteeSubitem = new PayCaseCommitteeSubitem();
BeanUtils.copyProperties(payCaseCommitteeSubitemDTO,payCaseCommitteeSubitem); BeanUtils.copyProperties(payCaseCommitteeSubitemDTO,payCaseCommitteeSubitem);
payCaseCommitteeSubitemService.save(payCaseCommitteeSubitem); payCaseCommitteeSubitemService.save(payCaseCommitteeSubitem);
@@ -14,6 +14,7 @@ import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog; import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.system.base.controller.JeroController; import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.vo.LoginUser; import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.ValidUtil;
import com.jero.data.entity.DTO.PayDataDirectoryDTO; import com.jero.data.entity.DTO.PayDataDirectoryDTO;
import com.jero.data.entity.PayDataDirectory; import com.jero.data.entity.PayDataDirectory;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -71,6 +72,29 @@ public class PayDataDirectoryController extends JeroController<PayDataDirectory,
.collect(Collectors.toList()); .collect(Collectors.toList());
return Result.OK(collect); return Result.OK(collect);
} }
/**
* 资料会议树
*
* @return
*/
@AutoLog(value = "资料目录会议-树")
@ApiOperation(value = "资料目录会议-树", notes = "资料目录会议-树")
@GetMapping(value = "/meetingTree")
public Result<?> meetingTree() {
LoginUser sysUser =(LoginUser) SecurityUtils.getSubject().getPrincipal();
QueryWrapper<PayDataDirectory> queryWrapper = new QueryWrapper();
queryWrapper.eq("type",2);
queryWrapper.eq("create_by",sysUser.getUsername());
List<PayDataDirectory> list = payDataDirectoryService.list(queryWrapper);
List<DirectoryToTree> collect = list.stream()
.filter(payDataDirectory -> "0".equals(payDataDirectory.getParentId()))
.map(payDataDirectory -> {
DirectoryToTree directoryToTree = transtoTree(payDataDirectory, list);
return directoryToTree;
}).sorted(Comparator.comparing(DirectoryToTree::getSort))
.collect(Collectors.toList());
return Result.OK(collect);
}
/** /**
* 转换为树 * 转换为树
@@ -36,6 +36,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@@ -68,6 +69,9 @@ public class PayDataFileController extends JeroController<PayDataFile, IPayDataF
@Resource @Resource
private IPayMeetingSituationService payMeetingSituationService; private IPayMeetingSituationService payMeetingSituationService;
@Value("${jero.path.upload}")
public static String upLoadPath;
//拼接目录结构 //拼接目录结构
StringBuffer stringBuffer; StringBuffer stringBuffer;
@@ -403,9 +407,10 @@ public class PayDataFileController extends JeroController<PayDataFile, IPayDataF
*/ */
@AutoLog(value = "导出下载") @AutoLog(value = "导出下载")
@ApiOperation(value="导出下载", notes="导出下载") @ApiOperation(value="导出下载", notes="导出下载")
@ApiImplicitParam(name = "fileNames", value = "文件名称,多个以逗号隔开")
@GetMapping(value = "/importFile") @GetMapping(value = "/importFile")
public void importFile(@RequestParam(name="fileName") String fileName) { public void importFile(@RequestParam(name="fileNames") String fileNames) {
ArrayList<String> fileIdList = new ArrayList<>(Arrays.asList(fileName.split(","))); ArrayList<String> fileIdList = new ArrayList<>(Arrays.asList(fileNames.split(",")));
zipFileDownload(fileIdList); zipFileDownload(fileIdList);
} }
@@ -444,7 +449,7 @@ public class PayDataFileController extends JeroController<PayDataFile, IPayDataF
zipos = new ZipOutputStream(new BufferedOutputStream(response.getOutputStream())); zipos = new ZipOutputStream(new BufferedOutputStream(response.getOutputStream()));
zipos.setMethod(ZipOutputStream.DEFLATED); //设置压缩方法 zipos.setMethod(ZipOutputStream.DEFLATED); //设置压缩方法
for (String path : paths){ for (String path : paths){
File file = new File("D:\\opt\\upFiles" + "\\" + path + ".pdf"); File file = new File(upLoadPath + "\\" + path + ".pdf");
if(file.exists()){ if(file.exists()){
try { try {
//添加ZipEntry,并ZipEntry中写入文件流 //添加ZipEntry,并ZipEntry中写入文件流
@@ -45,7 +45,7 @@ import io.swagger.annotations.ApiOperation;
@Slf4j @Slf4j
public class PayFileDownloadRecordController extends JeroController<PayFileDownloadRecord, IPayFileDownloadRecordService> { public class PayFileDownloadRecordController extends JeroController<PayFileDownloadRecord, IPayFileDownloadRecordService> {
@Value("${jero.path.upload}") @Value("${jero.path.upload}")
private String upLoadPath; public static String upLoadPath;
@Autowired @Autowired
private IPayFileDownloadRecordService payFileDownloadRecordService; private IPayFileDownloadRecordService payFileDownloadRecordService;
@@ -98,7 +98,7 @@ public class PayFileDownloadRecordController extends JeroController<PayFileDownl
byte[] buff = new byte[1024]; byte[] buff = new byte[1024];
BufferedInputStream bis = null; BufferedInputStream bis = null;
// 读取filename // 读取filename
bis = new BufferedInputStream(new FileInputStream(new File("D:\\opt\\upFiles\\"+filename +".pdf"))); bis = new BufferedInputStream(new FileInputStream(new File(upLoadPath+"\\"+filename +".pdf")));
int i = bis.read(buff); int i = bis.read(buff);
while (i != -1) { while (i != -1) {
outputStream.write(buff, 0, buff.length); outputStream.write(buff, 0, buff.length);
@@ -24,6 +24,6 @@ public class PayDataDirectoryDTO {
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
private java.lang.String remarks; private java.lang.String remarks;
@ApiModelProperty(value = "类型(1:分标委,2:会议)") @ApiModelProperty(value = "类型(1:资料,2:会议)")
private java.lang.Integer type; private java.lang.Integer type;
} }
@@ -5,9 +5,6 @@ import lombok.Data;
@Data @Data
public class queryPeopleByCompanyIdAndMeetingId { public class queryPeopleByCompanyIdAndMeetingId {
@ApiModelProperty(value = "id")
private String id;
@ApiModelProperty(value = "联系人id") @ApiModelProperty(value = "联系人id")
private String contactId; private String contactId;
@@ -19,7 +19,7 @@
pf.file_id as dataId, pf.file_id as dataId,
pf.file_path as filePath, pf.file_path as filePath,
of.file_name as fileName, of.file_name as fileName,
pd.meetingId, pd.meeting_id as meetingId,
pm.meeting_name as meetingName, pm.meeting_name as meetingName,
pm.start_time as meetingTime, pm.start_time as meetingTime,
dt.downLodeTime, dt.downLodeTime,
@@ -33,11 +33,10 @@
<select id="queryPeopleByCompanyIdAndMeetingId" resultType="com.jero.data.entity.queryPeopleByCompanyIdAndMeetingId"> <select id="queryPeopleByCompanyIdAndMeetingId" resultType="com.jero.data.entity.queryPeopleByCompanyIdAndMeetingId">
SELECT SELECT
ps.user_id as id, ps.company_contact_id as contactId,
pm.id as contactId, ps.company_contact_name as userName,
ps.user_name as userName, ps.email as email
pm.email as email FROM pay_meeting_situation as ps
FROM pay_meeting_situation as ps left join pay_contacts_management as pm on(ps.user_id=pm.id)
${ew.customSqlSegment} ${ew.customSqlSegment}
</select> </select>
</mapper> </mapper>
@@ -16,6 +16,7 @@ import com.jero.mail.entity.PayMailBill;
import com.jero.mail.service.IPayMailBillService; import com.jero.mail.service.IPayMailBillService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@@ -65,6 +66,7 @@ public class PayMailBillController extends JeroController<PayMailBill, IPayMailB
*/ */
@ApiOperation(value="邮寄票据-添加", notes="邮寄票据-添加") @ApiOperation(value="邮寄票据-添加", notes="邮寄票据-添加")
@PostMapping(value = "/add") @PostMapping(value = "/add")
@Transactional
public Result<?> add(@RequestBody PayMailBill payMailBill) { public Result<?> add(@RequestBody PayMailBill payMailBill) {
payMailBillService.save(payMailBill); payMailBillService.save(payMailBill);
return Result.OK("添加成功!"); return Result.OK("添加成功!");
@@ -75,6 +77,7 @@ public class PayMailBillController extends JeroController<PayMailBill, IPayMailB
* *
*/ */
@ApiOperation(value="邮寄票据-编辑(邮寄和修改按钮统一接口)", notes="邮寄票据-编辑(邮寄和修改按钮统一接口)") @ApiOperation(value="邮寄票据-编辑(邮寄和修改按钮统一接口)", notes="邮寄票据-编辑(邮寄和修改按钮统一接口)")
@Transactional
@PutMapping(value = "/edit") @PutMapping(value = "/edit")
public Result<?> edit(@RequestParam(name="id") String id, public Result<?> edit(@RequestParam(name="id") String id,
@RequestParam(name="sendMethod") Integer sendMethod, @RequestParam(name="sendMethod") Integer sendMethod,
@@ -92,48 +95,48 @@ public class PayMailBillController extends JeroController<PayMailBill, IPayMailB
payMailBillService.updateById(payMailBill); payMailBillService.updateById(payMailBill);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
} }
//
/** // /**
* 通过id删除 // * 通过id删除
* // *
* @param id // * @param id
* @return // * @return
*/ // */
@ApiOperation(value="邮寄票据-通过id删除", notes="邮寄票据-通过id删除") // @ApiOperation(value="邮寄票据-通过id删除", notes="邮寄票据-通过id删除")
@DeleteMapping(value = "/delete") // @DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id") String id) { // public Result<?> delete(@RequestParam(name="id") String id) {
payMailBillService.removeById(id); // payMailBillService.removeById(id);
return Result.OK("删除成功!"); // return Result.OK("删除成功!");
} // }
//
/** // /**
* 批量删除 // * 批量删除
* // *
* @param ids // * @param ids
* @return // * @return
*/ // */
@ApiOperation(value="邮寄票据-批量删除", notes="邮寄票据-批量删除") // @ApiOperation(value="邮寄票据-批量删除", notes="邮寄票据-批量删除")
@DeleteMapping(value = "/deleteBatch") // @DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids") String ids) { // public Result<?> deleteBatch(@RequestParam(name="ids") String ids) {
this.payMailBillService.removeByIds(Arrays.asList(ids.split(","))); // this.payMailBillService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!"); // return Result.OK("批量删除成功!");
} // }
//
/** // /**
* 通过id查询 // * 通过id查询
* // *
* @param id // * @param id
* @return // * @return
*/ // */
@ApiOperation(value="邮寄票据-通过id查询", notes="邮寄票据-通过id查询") // @ApiOperation(value="邮寄票据-通过id查询", notes="邮寄票据-通过id查询")
@GetMapping(value = "/queryById") // @GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) { // public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
PayMailBill payMailBill = payMailBillService.getById(id); // PayMailBill payMailBill = payMailBillService.getById(id);
if(payMailBill==null) { // if(payMailBill==null) {
return Result.error("未找到对应数据"); // return Result.error("未找到对应数据");
} // }
return Result.OK(payMailBill); // return Result.OK(payMailBill);
} // }
/** /**
* 导出excel * 导出excel
@@ -2,6 +2,7 @@ package com.jero.mail.controller;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@@ -16,6 +17,7 @@ import com.jero.mail.service.IPayMailContractService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.util.AmountUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@@ -91,72 +93,63 @@ public class PayMailContractController extends JeroController<PayMailContract, I
return Result.OK("操作成功!"); return Result.OK("操作成功!");
} }
/** // /**
* 通过id删除 // * 通过id删除
* // *
* @param id // * @param id
* @return // * @return
*/ // */
@AutoLog(value = "邮寄合同-通过id删除") // @AutoLog(value = "邮寄合同-通过id删除")
@ApiOperation(value="邮寄合同-通过id删除", notes="邮寄合同-通过id删除") // @ApiOperation(value="邮寄合同-通过id删除", notes="邮寄合同-通过id删除")
@DeleteMapping(value = "/delete") // @DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) { // public Result<?> delete(@RequestParam(name="id",required=true) String id) {
payMailContractService.removeById(id); // payMailContractService.removeById(id);
return Result.OK("删除成功!"); // return Result.OK("删除成功!");
} // }
//
/** // /**
* 批量删除 // * 批量删除
* // *
* @param ids // * @param ids
* @return // * @return
*/ // */
@AutoLog(value = "邮寄合同-批量删除") // @AutoLog(value = "邮寄合同-批量删除")
@ApiOperation(value="邮寄合同-批量删除", notes="邮寄合同-批量删除") // @ApiOperation(value="邮寄合同-批量删除", notes="邮寄合同-批量删除")
@DeleteMapping(value = "/deleteBatch") // @DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { // public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.payMailContractService.removeByIds(Arrays.asList(ids.split(","))); // this.payMailContractService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!"); // return Result.OK("批量删除成功!");
} // }
//
/** // /**
* 通过id查询 // * 通过id查询
* // *
* @param id // * @param id
* @return // * @return
*/ // */
@AutoLog(value = "邮寄合同-通过id查询") // @AutoLog(value = "邮寄合同-通过id查询")
@ApiOperation(value="邮寄合同-通过id查询", notes="邮寄合同-通过id查询") // @ApiOperation(value="邮寄合同-通过id查询", notes="邮寄合同-通过id查询")
@GetMapping(value = "/queryById") // @GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) { // public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
PayMailContract payMailContract = payMailContractService.getById(id); // PayMailContract payMailContract = payMailContractService.getById(id);
if(payMailContract==null) { // if(payMailContract==null) {
return Result.error("未找到对应数据"); // return Result.error("未找到对应数据");
} // }
return Result.OK(payMailContract); // return Result.OK(payMailContract);
} // }
/** /**
* 导出excel * 导出excel
* *
* @param request
* @param payMailContract
*/ */
@RequestMapping(value = "/exportXls") @AutoLog(value = "邮寄合同-导出")
public ModelAndView exportXls(HttpServletRequest request, PayMailContract payMailContract) { @ApiOperation(value="邮寄合同-导出", notes="邮寄合同-导出")
return super.exportXls(request, payMailContract, PayMailContract.class, "邮寄合同"); @GetMapping(value = "/exportXls")
public ModelAndView exportXls() {
QueryWrapper<PayMailBillList> queryWrapper = new QueryWrapper<>();
List<PayMailBillList> payMailBillList = payMailContractService.pageContractExcel(queryWrapper);
return AmountUtil.exportListXls(payMailBillList,PayMailBillList.class,"邮寄合同");
} }
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, PayMailContract.class);
}
} }
@@ -62,6 +62,7 @@ public class PayMailBill implements Serializable {
@ApiModelProperty(value = "邮寄状态(0:未邮寄,1::已邮寄)") @ApiModelProperty(value = "邮寄状态(0:未邮寄,1::已邮寄)")
private java.lang.Integer postStatus; private java.lang.Integer postStatus;
/**快递公司(1:EMS,2:顺丰)*/ /**快递公司(1:EMS,2:顺丰)*/
@Dict(dicCode = "mail_send")
@ApiModelProperty(value = "快递公司(1:EMS,2:顺丰)") @ApiModelProperty(value = "快递公司(1:EMS,2:顺丰)")
private java.lang.Integer sendMethod; private java.lang.Integer sendMethod;
/**快递单号*/ /**快递单号*/
@@ -2,30 +2,41 @@ package com.jero.mail.entity;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
@Data @Data
public class PayMailBillList { public class PayMailBillList {
@ApiModelProperty(value = "id主键") @ApiModelProperty(value = "id主键")
private java.lang.String id; private java.lang.String id;
@ApiModelProperty(value = "邮寄状态") @Excel(name = "邮寄状态", width = 15)
@ApiModelProperty(value = "邮寄状态(0:未邮寄,1::已邮寄)")
private java.lang.String postStatus; private java.lang.String postStatus;
@ApiModelProperty(value = "邮寄方式") @Excel(name = "邮寄方式", width = 15)
@ApiModelProperty(value = "邮寄方式(1:EMS,2:顺丰)")
private java.lang.String sendMethod; private java.lang.String sendMethod;
@Excel(name = "邮寄单号", width = 15)
@ApiModelProperty(value = "邮寄单号") @ApiModelProperty(value = "邮寄单号")
private java.lang.String postNo; private java.lang.String postNo;
@Excel(name = "负责人", width = 15)
@ApiModelProperty(value = "负责人") @ApiModelProperty(value = "负责人")
private java.lang.String liaisonMan; private java.lang.String liaisonMan;
@Excel(name = "负责人手机号", width = 15)
@ApiModelProperty(value = "负责人手机号") @ApiModelProperty(value = "负责人手机号")
private java.lang.String mobile; private java.lang.String mobile;
@Excel(name = "合同编号", width = 15)
@ApiModelProperty(value = "合同编号") @ApiModelProperty(value = "合同编号")
private java.lang.String contractNum; private java.lang.String contractNum;
@Excel(name = "合同名称", width = 15)
@ApiModelProperty(value = "合同名称") @ApiModelProperty(value = "合同名称")
private java.lang.String contractName; private java.lang.String contractName;
@Excel(name = "签订单位", width = 15)
@ApiModelProperty(value = "签订单位") @ApiModelProperty(value = "签订单位")
private java.lang.String signedCompanyTemporaryName; private java.lang.String signedCompanyTemporaryName;
@Excel(name = "邮寄联系人", width = 15)
@ApiModelProperty(value = "邮寄联系人") @ApiModelProperty(value = "邮寄联系人")
private java.lang.String principalName; private java.lang.String principalName;
@Excel(name = "合同总金额", width = 15)
@ApiModelProperty(value = "合同总金额") @ApiModelProperty(value = "合同总金额")
private java.lang.String contractAmount; private java.lang.String contractAmount;
@@ -10,6 +10,8 @@ import com.jero.mail.entity.PayMailBillList;
import com.jero.mail.entity.PayMailContract; import com.jero.mail.entity.PayMailContract;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* @Description: pay_mail_contract * @Description: pay_mail_contract
* @Author: jeecg-boot * @Author: jeecg-boot
@@ -20,4 +22,6 @@ public interface PayMailContractMapper extends BaseMapper<PayMailContract> {
IPage<PayMailBillList> pageContract(Page<PayMailBillList> page, @Param(Constants.WRAPPER) QueryWrapper<PayMailBillList> queryWrapper); IPage<PayMailBillList> pageContract(Page<PayMailBillList> page, @Param(Constants.WRAPPER) QueryWrapper<PayMailBillList> queryWrapper);
List<PayMailBillList> pageContractExcel(@Param(Constants.WRAPPER) QueryWrapper<PayMailBillList> queryWrapper);
} }
@@ -13,6 +13,22 @@ pic.contract_num as contractNum,
pic.contract_name as contractName, pic.contract_name as contractName,
pic.signed_company_temporary_name as signedCompanyTemporaryName, pic.signed_company_temporary_name as signedCompanyTemporaryName,
pic.principal_name as principalName, pic.principal_name as principalName,
pic.contract_amount as contractAmount FROM pay_mail_contract as pc left join pay_income_contract as pic on(pc.contract_id=pic.id)
${ew.customSqlSegment}
</select>
<select id="pageContractExcel" resultType="com.jero.mail.entity.PayMailBillList">
SELECT
pc.id,
pc.post_status as postStatus,
pc.send_method as sendMethod,
pc.postNo,
pc.liaison_man as liaisonMan,
pc.mobile,
pic.contract_num as contractNum,
pic.contract_name as contractName,
pic.signed_company_temporary_name as signedCompanyTemporaryName,
pic.principal_name as principalName,
pic.contract_amount as contractAmount FROM pay_mail_contract as pc left join pay_income_contract as pic on(pc.contract_id=pic.id) pic.contract_amount as contractAmount FROM pay_mail_contract as pc left join pay_income_contract as pic on(pc.contract_id=pic.id)
${ew.customSqlSegment} ${ew.customSqlSegment}
</select> </select>
@@ -11,6 +11,7 @@ import com.jero.mail.mapper.PayMailContractMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List;
/** /**
* @Description: pay_mail_contract * @Description: pay_mail_contract
@@ -23,5 +24,6 @@ public interface IPayMailContractService extends IService<PayMailContract> {
IPage<PayMailBillList> pageContract(Page<PayMailBillList> page, QueryWrapper<PayMailBillList> queryWrapper); IPage<PayMailBillList> pageContract(Page<PayMailBillList> page, QueryWrapper<PayMailBillList> queryWrapper);
List<PayMailBillList> pageContractExcel(QueryWrapper<PayMailBillList> queryWrapper);
} }
@@ -11,6 +11,7 @@ import com.jero.mail.service.IPayMailContractService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List;
/** /**
@@ -29,4 +30,9 @@ public class PayMailContractServiceImpl extends ServiceImpl<PayMailContractMappe
public IPage<PayMailBillList> pageContract(Page<PayMailBillList> page, QueryWrapper<PayMailBillList> queryWrapper) { public IPage<PayMailBillList> pageContract(Page<PayMailBillList> page, QueryWrapper<PayMailBillList> queryWrapper) {
return payMailContractMapper.pageContract(page,queryWrapper); return payMailContractMapper.pageContract(page,queryWrapper);
} }
@Override
public List<PayMailBillList> pageContractExcel(QueryWrapper<PayMailBillList> queryWrapper) {
return payMailContractMapper.pageContractExcel(queryWrapper);
}
} }
@@ -18,7 +18,7 @@ import java.util.List;
public class AmountUtil { public class AmountUtil {
@Value("${jero.path.upload}") @Value("${jero.path.upload}")
private String upLoadPath; public static String upLoadPath;
/** /**
* 计算到账状态 * 计算到账状态
* *
@@ -49,7 +49,7 @@ public class AmountUtil {
*传入 对象的list集合 对象的class对象 excel名称 *传入 对象的list集合 对象的class对象 excel名称
* @param * @param
*/ */
protected ModelAndView exportListXls(List<T> object, Class<T> clazz, String title) { public static ModelAndView exportListXls(List<?> objects, Class<?> clazz, String title) {
// Step.3 AutoPoi 导出Excel // Step.3 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
mv.addObject(NormalExcelConstants.FILE_NAME, title); //此处设置的filename无效 ,前端会重更新设置一下 mv.addObject(NormalExcelConstants.FILE_NAME, title); //此处设置的filename无效 ,前端会重更新设置一下
@@ -59,7 +59,7 @@ public class AmountUtil {
exportParams.setImageBasePath(upLoadPath); exportParams.setImageBasePath(upLoadPath);
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置---------------------- //update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
mv.addObject(NormalExcelConstants.PARAMS,exportParams); mv.addObject(NormalExcelConstants.PARAMS,exportParams);
mv.addObject(NormalExcelConstants.DATA_LIST, null); mv.addObject(NormalExcelConstants.DATA_LIST, objects);
return mv; return mv;
} }
} }
@@ -70,9 +70,7 @@ public class EmailSendMsgHandle implements ISendMsgHandle {
ArrayList<String> fileList = new ArrayList<>(Arrays.asList(fileName.split(","))); ArrayList<String> fileList = new ArrayList<>(Arrays.asList(fileName.split(",")));
for(String file :fileList) { for(String file :fileList) {
if(!StringUtils.isBlank(file)) { if(!StringUtils.isBlank(file)) {
StringBuffer url = new StringBuffer("D:\\opt\\upFiles"); FileSystemResource filePath = new FileSystemResource(new File("D:\\opt\\upFiles" + "\\" + file + ".pdf"));
url.append("\\" + file+".pdf");
FileSystemResource filePath = new FileSystemResource(new File(url.toString()));
helper.addAttachment(file, filePath); helper.addAttachment(file, filePath);
} }
} }
@@ -25,16 +25,20 @@ spring:
max-file-size: 10MB max-file-size: 10MB
max-request-size: 10MB max-request-size: 10MB
mail: mail:
host: smtp.163.com host: smtp.mxhichina.com
username: test@163.com username: zhangqinlin@syxysoft.com
password: ?? password: Zql0000000
properties: port: 25
mail: # host: smtp.163.com
smtp: # username: test@163.com
auth: true # password: ??
starttls: # properties:
enable: true # mail:
required: true # smtp:
# auth: true
# starttls:
# enable: true
# required: true
## quartz定时任务,采用数据库方式 ## quartz定时任务,采用数据库方式
quartz: quartz:
job-store-type: jdbc job-store-type: jdbc