资料维护
This commit is contained in:
+45
-42
@@ -16,6 +16,7 @@ import com.jero.mail.entity.PayMailBill;
|
||||
import com.jero.mail.service.IPayMailBillService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -65,6 +66,7 @@ public class PayMailBillController extends JeroController<PayMailBill, IPayMailB
|
||||
*/
|
||||
@ApiOperation(value="邮寄票据-添加", notes="邮寄票据-添加")
|
||||
@PostMapping(value = "/add")
|
||||
@Transactional
|
||||
public Result<?> add(@RequestBody PayMailBill payMailBill) {
|
||||
payMailBillService.save(payMailBill);
|
||||
return Result.OK("添加成功!");
|
||||
@@ -75,6 +77,7 @@ public class PayMailBillController extends JeroController<PayMailBill, IPayMailB
|
||||
*
|
||||
*/
|
||||
@ApiOperation(value="邮寄票据-编辑(邮寄和修改按钮统一接口)", notes="邮寄票据-编辑(邮寄和修改按钮统一接口)")
|
||||
@Transactional
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestParam(name="id") String id,
|
||||
@RequestParam(name="sendMethod") Integer sendMethod,
|
||||
@@ -92,48 +95,48 @@ public class PayMailBillController extends JeroController<PayMailBill, IPayMailB
|
||||
payMailBillService.updateById(payMailBill);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="邮寄票据-通过id删除", notes="邮寄票据-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id") String id) {
|
||||
payMailBillService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="邮寄票据-批量删除", notes="邮寄票据-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids") String ids) {
|
||||
this.payMailBillService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="邮寄票据-通过id查询", notes="邮寄票据-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
PayMailBill payMailBill = payMailBillService.getById(id);
|
||||
if(payMailBill==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(payMailBill);
|
||||
}
|
||||
//
|
||||
// /**
|
||||
// * 通过id删除
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @ApiOperation(value="邮寄票据-通过id删除", notes="邮寄票据-通过id删除")
|
||||
// @DeleteMapping(value = "/delete")
|
||||
// public Result<?> delete(@RequestParam(name="id") String id) {
|
||||
// payMailBillService.removeById(id);
|
||||
// return Result.OK("删除成功!");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 批量删除
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// @ApiOperation(value="邮寄票据-批量删除", notes="邮寄票据-批量删除")
|
||||
// @DeleteMapping(value = "/deleteBatch")
|
||||
// public Result<?> deleteBatch(@RequestParam(name="ids") String ids) {
|
||||
// this.payMailBillService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
// return Result.OK("批量删除成功!");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过id查询
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @ApiOperation(value="邮寄票据-通过id查询", notes="邮寄票据-通过id查询")
|
||||
// @GetMapping(value = "/queryById")
|
||||
// public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
// PayMailBill payMailBill = payMailBillService.getById(id);
|
||||
// if(payMailBill==null) {
|
||||
// return Result.error("未找到对应数据");
|
||||
// }
|
||||
// return Result.OK(payMailBill);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
|
||||
+53
-60
@@ -2,6 +2,7 @@ package com.jero.mail.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
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.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.util.AmountUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -91,72 +93,63 @@ public class PayMailContractController extends JeroController<PayMailContract, I
|
||||
return Result.OK("操作成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "邮寄合同-通过id删除")
|
||||
@ApiOperation(value="邮寄合同-通过id删除", notes="邮寄合同-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
payMailContractService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "邮寄合同-批量删除")
|
||||
@ApiOperation(value="邮寄合同-批量删除", notes="邮寄合同-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.payMailContractService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "邮寄合同-通过id查询")
|
||||
@ApiOperation(value="邮寄合同-通过id查询", notes="邮寄合同-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
PayMailContract payMailContract = payMailContractService.getById(id);
|
||||
if(payMailContract==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(payMailContract);
|
||||
}
|
||||
// /**
|
||||
// * 通过id删除
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "邮寄合同-通过id删除")
|
||||
// @ApiOperation(value="邮寄合同-通过id删除", notes="邮寄合同-通过id删除")
|
||||
// @DeleteMapping(value = "/delete")
|
||||
// public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
// payMailContractService.removeById(id);
|
||||
// return Result.OK("删除成功!");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 批量删除
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "邮寄合同-批量删除")
|
||||
// @ApiOperation(value="邮寄合同-批量删除", notes="邮寄合同-批量删除")
|
||||
// @DeleteMapping(value = "/deleteBatch")
|
||||
// public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
// this.payMailContractService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
// return Result.OK("批量删除成功!");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过id查询
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "邮寄合同-通过id查询")
|
||||
// @ApiOperation(value="邮寄合同-通过id查询", notes="邮寄合同-通过id查询")
|
||||
// @GetMapping(value = "/queryById")
|
||||
// public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
// PayMailContract payMailContract = payMailContractService.getById(id);
|
||||
// if(payMailContract==null) {
|
||||
// return Result.error("未找到对应数据");
|
||||
// }
|
||||
// return Result.OK(payMailContract);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param payMailContract
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PayMailContract payMailContract) {
|
||||
return super.exportXls(request, payMailContract, PayMailContract.class, "邮寄合同");
|
||||
@AutoLog(value = "邮寄合同-导出")
|
||||
@ApiOperation(value="邮寄合同-导出", notes="邮寄合同-导出")
|
||||
@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::已邮寄)")
|
||||
private java.lang.Integer postStatus;
|
||||
/**快递公司(1:EMS,2:顺丰)*/
|
||||
@Dict(dicCode = "mail_send")
|
||||
@ApiModelProperty(value = "快递公司(1:EMS,2:顺丰)")
|
||||
private java.lang.Integer sendMethod;
|
||||
/**快递单号*/
|
||||
|
||||
@@ -2,30 +2,41 @@ package com.jero.mail.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
@Data
|
||||
public class PayMailBillList {
|
||||
|
||||
@ApiModelProperty(value = "id主键")
|
||||
private java.lang.String id;
|
||||
@ApiModelProperty(value = "邮寄状态")
|
||||
@Excel(name = "邮寄状态", width = 15)
|
||||
@ApiModelProperty(value = "邮寄状态(0:未邮寄,1::已邮寄)")
|
||||
private java.lang.String postStatus;
|
||||
@ApiModelProperty(value = "邮寄方式")
|
||||
@Excel(name = "邮寄方式", width = 15)
|
||||
@ApiModelProperty(value = "邮寄方式(1:EMS,2:顺丰)")
|
||||
private java.lang.String sendMethod;
|
||||
@Excel(name = "邮寄单号", width = 15)
|
||||
@ApiModelProperty(value = "邮寄单号")
|
||||
private java.lang.String postNo;
|
||||
@Excel(name = "负责人", width = 15)
|
||||
@ApiModelProperty(value = "负责人")
|
||||
private java.lang.String liaisonMan;
|
||||
@Excel(name = "负责人手机号", width = 15)
|
||||
@ApiModelProperty(value = "负责人手机号")
|
||||
private java.lang.String mobile;
|
||||
@Excel(name = "合同编号", width = 15)
|
||||
@ApiModelProperty(value = "合同编号")
|
||||
private java.lang.String contractNum;
|
||||
@Excel(name = "合同名称", width = 15)
|
||||
@ApiModelProperty(value = "合同名称")
|
||||
private java.lang.String contractName;
|
||||
@Excel(name = "签订单位", width = 15)
|
||||
@ApiModelProperty(value = "签订单位")
|
||||
private java.lang.String signedCompanyTemporaryName;
|
||||
@Excel(name = "邮寄联系人", width = 15)
|
||||
@ApiModelProperty(value = "邮寄联系人")
|
||||
private java.lang.String principalName;
|
||||
@Excel(name = "合同总金额", width = 15)
|
||||
@ApiModelProperty(value = "合同总金额")
|
||||
private java.lang.String contractAmount;
|
||||
|
||||
|
||||
+4
@@ -10,6 +10,8 @@ import com.jero.mail.entity.PayMailBillList;
|
||||
import com.jero.mail.entity.PayMailContract;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: pay_mail_contract
|
||||
* @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);
|
||||
|
||||
List<PayMailBillList> pageContractExcel(@Param(Constants.WRAPPER) QueryWrapper<PayMailBillList> queryWrapper);
|
||||
|
||||
}
|
||||
|
||||
+16
@@ -13,6 +13,22 @@ 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)
|
||||
${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)
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
+2
@@ -11,6 +11,7 @@ import com.jero.mail.mapper.PayMailContractMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: pay_mail_contract
|
||||
@@ -23,5 +24,6 @@ public interface IPayMailContractService extends IService<PayMailContract> {
|
||||
|
||||
|
||||
IPage<PayMailBillList> pageContract(Page<PayMailBillList> page, QueryWrapper<PayMailBillList> queryWrapper);
|
||||
List<PayMailBillList> pageContractExcel(QueryWrapper<PayMailBillList> queryWrapper);
|
||||
|
||||
}
|
||||
|
||||
+6
@@ -11,6 +11,7 @@ import com.jero.mail.service.IPayMailContractService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
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) {
|
||||
return payMailContractMapper.pageContract(page,queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PayMailBillList> pageContractExcel(QueryWrapper<PayMailBillList> queryWrapper) {
|
||||
return payMailContractMapper.pageContractExcel(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user