
67 changed files with 4994 additions and 228 deletions
@ -0,0 +1,82 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.buscenter.api.busfleet; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import java.util.Date; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-buscenter(车队管理) <br/> |
|||
* File: BusFleet.java <br/> |
|||
* Class: com.yxt.anrui.buscenter.api.busfleet.BusFleet <br/> |
|||
* Description: 车队管理. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 13:41:57 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "车队管理", description = "车队管理") |
|||
@TableName("bus_fleet") |
|||
public class BusFleet extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("创建人sid") |
|||
private String createByName; // 创建人sid
|
|||
@ApiModelProperty("车队名称") |
|||
private String fleetName; // 车队名称
|
|||
@ApiModelProperty("联系人") |
|||
private String contacts; // 联系人
|
|||
@ApiModelProperty("联系电话") |
|||
private String contactNumber; // 联系电话
|
|||
@ApiModelProperty("车辆台数") |
|||
private Integer carNum; // 车辆台数
|
|||
@ApiModelProperty("相关业务备注") |
|||
private String businessRemarks; // 相关业务备注
|
|||
@ApiModelProperty("相关业务保险") |
|||
private String businessInsurance; // 相关业务保险
|
|||
@ApiModelProperty("相关业务违章") |
|||
private String businessillegally; // 相关业务违章
|
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("开始日期") |
|||
private Date attachmentStartDate; // 开始日期
|
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("结束日期") |
|||
private Date attachmentEndDate; // 结束日期
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 创建组织sid
|
|||
@ApiModelProperty("创建组织名称") |
|||
private String createOrgName; // 创建组织名称
|
|||
|
|||
} |
@ -0,0 +1,94 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.buscenter.api.busfleet; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-buscenter(车队管理) <br/> |
|||
* File: BusFleetVo.java <br/> |
|||
* Class: com.yxt.anrui.buscenter.api.busfleet.BusFleetVo <br/> |
|||
* Description: 车队管理 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 13:41:58 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "车队管理 视图数据详情", description = "车队管理 视图数据详情") |
|||
public class BusFleetDetailsVo implements Vo { |
|||
|
|||
private String sid; // sid
|
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("创建人sid") |
|||
private String createBySid; |
|||
@ApiModelProperty("创建人姓名") |
|||
private String createByName; |
|||
@ApiModelProperty("车队名称") |
|||
private String fleetName; // 车队名称
|
|||
@ApiModelProperty("联系人") |
|||
private String contacts; // 联系人
|
|||
@ApiModelProperty("联系电话") |
|||
private String contactNumber; // 联系电话
|
|||
@ApiModelProperty("车辆台数") |
|||
private Integer carNum; // 车辆台数
|
|||
@ApiModelProperty("相关业务备注") |
|||
private String businessRemarks; // 相关业务备注
|
|||
@ApiModelProperty("相关业务保险") |
|||
private String businessInsurance; // 相关业务保险
|
|||
@ApiModelProperty("相关业务违章") |
|||
private String businessillegally; // 相关业务违章
|
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("开始日期") |
|||
private Date attachmentStartDate; // 开始日期
|
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("结束日期") |
|||
private Date attachmentEndDate; // 结束日期
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 创建组织sid
|
|||
@ApiModelProperty("创建组织名称") |
|||
private String createOrgName; // 创建组织名称
|
|||
@ApiModelProperty("挂靠协议") |
|||
private List<String> urls = new ArrayList<>(); |
|||
@ApiModelProperty("相关业务附件") |
|||
private List<String> businessUrls = new ArrayList<>(); |
|||
} |
@ -0,0 +1,94 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.buscenter.api.busfleet; |
|||
|
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-buscenter(车队管理) <br/> |
|||
* File: BusFleetDto.java <br/> |
|||
* Class: com.yxt.anrui.buscenter.api.busfleet.BusFleetDto <br/> |
|||
* Description: 车队管理 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 13:41:57 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "车队管理 数据传输对象", description = "车队管理 数据传输对象") |
|||
public class BusFleetDto implements Dto { |
|||
|
|||
private String sid; // sid
|
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("创建人sid") |
|||
private String createBySid; |
|||
@ApiModelProperty("创建人姓名") |
|||
private String createByName; |
|||
@ApiModelProperty("车队名称") |
|||
private String fleetName; // 车队名称
|
|||
@ApiModelProperty("联系人") |
|||
private String contacts; // 联系人
|
|||
@ApiModelProperty("联系电话") |
|||
private String contactNumber; // 联系电话
|
|||
@ApiModelProperty("车辆台数") |
|||
private Integer carNum; // 车辆台数
|
|||
@ApiModelProperty("相关业务备注") |
|||
private String businessRemarks; // 相关业务备注
|
|||
@ApiModelProperty("相关业务保险") |
|||
private String businessInsurance; // 相关业务保险
|
|||
@ApiModelProperty("相关业务违章") |
|||
private String businessillegally; // 相关业务违章
|
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("开始日期") |
|||
private Date attachmentStartDate; // 开始日期
|
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("结束日期") |
|||
private Date attachmentEndDate; // 结束日期
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 创建组织sid
|
|||
@ApiModelProperty("创建组织名称") |
|||
private String createOrgName; // 创建组织名称
|
|||
@ApiModelProperty("挂靠协议") |
|||
private List<String> urls = new ArrayList<>(); |
|||
@ApiModelProperty("相关业务附件") |
|||
private List<String> businessUrls = new ArrayList<>(); |
|||
} |
@ -0,0 +1,82 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.buscenter.api.busfleet; |
|||
|
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-buscenter(车队管理) <br/> |
|||
* File: BusFleetFeign.java <br/> |
|||
* Class: com.yxt.anrui.buscenter.api.busfleet.BusFleetFeign <br/> |
|||
* Description: 车队管理. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 13:41:58 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "车队管理") |
|||
@FeignClient( |
|||
contextId = "anrui-buscenter-BusFleet", |
|||
name = "anrui-buscenter", |
|||
path = "v1/fleetManagement") |
|||
public interface BusFleetFeign { |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
@ResponseBody |
|||
public ResultBean<PagerVo<BusFleetVo>> listPage(@RequestBody PagerQuery<BusFleetQuery> pq); |
|||
|
|||
@ApiOperation("新增或修改") |
|||
@PostMapping("/saveOrUpdate") |
|||
@ResponseBody |
|||
public ResultBean save(@RequestBody BusFleetDto dto); |
|||
|
|||
@ApiOperation("相关业务补充") |
|||
@PostMapping("/saveBusiness") |
|||
@ResponseBody |
|||
public ResultBean saveBusiness(@RequestBody BusFleetNewDto dto); |
|||
|
|||
@ApiOperation("根据sid删除记录") |
|||
@DeleteMapping("/delBySids") |
|||
@ResponseBody |
|||
public ResultBean delBySids(@RequestBody String[] sids); |
|||
|
|||
@ApiOperation("根据SID获取一条记录") |
|||
@GetMapping("/gteInitBySid/{sid}") |
|||
@ResponseBody |
|||
public ResultBean<BusFleetDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid); |
|||
} |
@ -0,0 +1,66 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.buscenter.api.busfleet; |
|||
|
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-buscenter(车队管理) <br/> |
|||
* File: BusFleetDto.java <br/> |
|||
* Class: com.yxt.anrui.buscenter.api.busfleet.BusFleetDto <br/> |
|||
* Description: 车队管理 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 13:41:57 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "车队管理 数据传输对象", description = "车队管理 数据传输对象") |
|||
public class BusFleetNewDto implements Dto { |
|||
|
|||
private String sid; // sid
|
|||
|
|||
@ApiModelProperty("相关业务备注") |
|||
private String remarks; // 相关业务备注
|
|||
@ApiModelProperty("相关业务保险") |
|||
private String insurance; // 相关业务保险
|
|||
@ApiModelProperty("相关业务违章") |
|||
private String illegally; // 相关业务违章
|
|||
@ApiModelProperty("相关业务附件") |
|||
private List<String> urls = new ArrayList<>(); |
|||
} |
@ -0,0 +1,68 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.buscenter.api.busfleet; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import java.util.Date; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-buscenter(车队管理) <br/> |
|||
* File: BusFleetQuery.java <br/> |
|||
* Class: com.yxt.anrui.buscenter.api.busfleet.BusFleetQuery <br/> |
|||
* Description: 车队管理 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 13:41:57 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "车队管理 查询条件", description = "车队管理 查询条件") |
|||
public class BusFleetQuery implements Query { |
|||
|
|||
@ApiModelProperty("创建组织名称") |
|||
private String orgName; |
|||
@ApiModelProperty("车队名称") |
|||
private String fleetName; |
|||
|
|||
@ApiModelProperty("开始日期") |
|||
private String attachmentStartDate; |
|||
@ApiModelProperty("结束日期") |
|||
private String attachmentEndDate; |
|||
|
|||
private String userSid; |
|||
private String orgPath; |
|||
private String menuUrl; |
|||
private String menuSid; |
|||
} |
@ -0,0 +1,72 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.buscenter.api.busfleet; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import java.util.Date; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-buscenter(车队管理) <br/> |
|||
* File: BusFleetVo.java <br/> |
|||
* Class: com.yxt.anrui.buscenter.api.busfleet.BusFleetVo <br/> |
|||
* Description: 车队管理 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 13:41:57 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "车队管理 视图数据对象", description = "车队管理 视图数据对象") |
|||
public class BusFleetVo implements Vo { |
|||
|
|||
private String sid; |
|||
|
|||
@ApiModelProperty("创建组织名称") |
|||
private String createOrgName; |
|||
@ApiModelProperty("车队名称") |
|||
private String fleetName; |
|||
@ApiModelProperty("联系人") |
|||
private String contacts; |
|||
@ApiModelProperty("联系电话") |
|||
private String contactNumber; |
|||
@ApiModelProperty("车辆台数") |
|||
private Integer carNum; |
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("开始日期") |
|||
private Date attachmentStartDate; // 开始日期
|
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("结束日期") |
|||
private Date attachmentEndDate; // 结束日期
|
|||
} |
@ -0,0 +1,61 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.buscenter.biz.busfleet; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
import com.yxt.anrui.buscenter.api.busfleet.BusFleet; |
|||
import com.yxt.anrui.buscenter.api.busfleet.BusFleetVo; |
|||
import org.apache.ibatis.annotations.Update; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-buscenter(车队管理) <br/> |
|||
* File: BusFleetMapper.java <br/> |
|||
* Class: com.yxt.anrui.buscenter.biz.busfleet.BusFleetMapper <br/> |
|||
* Description: 车队管理. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 13:41:58 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface BusFleetMapper extends BaseMapper<BusFleet> { |
|||
|
|||
IPage<BusFleetVo> selectPageVo(IPage<BusFleet> page, @Param(Constants.WRAPPER) Wrapper<BusFleet> qw); |
|||
|
|||
@Update("update bus_fleet set isDelete = 1 where sid = #{sid}") |
|||
void updateIsDel(String sid); |
|||
} |
@ -0,0 +1,11 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.anrui.buscenter.biz.busfleet.BusFleetMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.anrui.buscenter.api.busfleet.BusFleetVo"> |
|||
SELECT * FROM bus_fleet bf |
|||
LEFT JOIN anrui_portal.sys_organization as u ON bf.createOrgSid = u.sid |
|||
<where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,91 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.buscenter.biz.busfleet; |
|||
|
|||
import com.yxt.anrui.buscenter.api.busfleet.*; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* Project: anrui-buscenter(车队管理) <br/> |
|||
* File: BusFleetFeignFallback.java <br/> |
|||
* Class: com.yxt.anrui.buscenter.biz.busfleet.BusFleetRest <br/> |
|||
* Description: 车队管理. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 13:41:58 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "车队管理") |
|||
@RestController("com.yxt.anrui.buscenter.biz.busfleet.BusFleetRest") |
|||
@RequestMapping("v1/fleetManagement") |
|||
public class BusFleetRest implements BusFleetFeign { |
|||
|
|||
@Autowired |
|||
private BusFleetService busFleetService; |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<BusFleetVo>> listPage(@RequestBody PagerQuery<BusFleetQuery> pq){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<BusFleetVo> pv = busFleetService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean save(@RequestBody BusFleetDto dto){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
busFleetService.saveOrUpdateDto(dto); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean saveBusiness(BusFleetNewDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
busFleetService.saveBusiness(dto); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean delBySids(@RequestBody String[] sids){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
busFleetService.updateIsDel(sids); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<BusFleetDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
BusFleetDetailsVo vo = busFleetService.fetchDetailsVoBySid(sid); |
|||
return rb.success().setData(vo); |
|||
} |
|||
} |
@ -0,0 +1,230 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.buscenter.biz.busfleet; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.anrui.buscenter.api.busbillfile.BusAttachTypeEnum; |
|||
import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFileEnum; |
|||
import com.yxt.anrui.buscenter.api.busfile.BusFile; |
|||
import com.yxt.anrui.buscenter.api.busfile.BusFileDto; |
|||
import com.yxt.anrui.buscenter.api.busfleet.*; |
|||
import com.yxt.anrui.buscenter.biz.busfile.BusFileService; |
|||
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; |
|||
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|||
import com.yxt.anrui.riskcenter.api.loanappendix.LoanAppendix; |
|||
import com.yxt.anrui.riskcenter.api.loanaudit.LoanAuditVo; |
|||
import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum; |
|||
import com.yxt.common.base.config.component.FileUploadComponent; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
|
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-buscenter(车队管理) <br/> |
|||
* File: BusFleetService.java <br/> |
|||
* Class: com.yxt.anrui.buscenter.biz.busfleet.BusFleetService <br/> |
|||
* Description: 车队管理 业务逻辑. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 13:41:58 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class BusFleetService extends MybatisBaseService<BusFleetMapper, BusFleet> { |
|||
|
|||
@Autowired |
|||
private SysUserFeign sysUserFeign; |
|||
@Autowired |
|||
private FileUploadComponent fileUploadComponent; |
|||
@Autowired |
|||
private BusFileService busFileService; |
|||
|
|||
public PagerVo<BusFleetVo> listPageVo(PagerQuery<BusFleetQuery> pq) { |
|||
BusFleetQuery query = pq.getParams(); |
|||
QueryWrapper<BusFleet> qw = new QueryWrapper<>(); |
|||
//========================================数据授权开始
|
|||
if (StringUtils.isNotBlank(query.getMenuUrl())) { |
|||
PrivilegeQuery privilegeQuery = new PrivilegeQuery(); |
|||
privilegeQuery.setOrgPath(query.getOrgPath()); |
|||
privilegeQuery.setMenuUrl(query.getMenuUrl()); |
|||
privilegeQuery.setMenuSid(query.getMenuSid()); |
|||
privilegeQuery.setUserSid(query.getUserSid()); |
|||
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); |
|||
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) { |
|||
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
|
|||
String orgSidPath = query.getOrgPath(); |
|||
orgSidPath = orgSidPath + "/"; |
|||
int i1 = orgSidPath.indexOf("/"); |
|||
int i2 = orgSidPath.indexOf("/", i1 + 1); |
|||
int i3 = orgSidPath.indexOf("/", i2 + 1); |
|||
int i4 = orgSidPath.indexOf("/", i3 + 1); |
|||
String orgLevelKey = defaultIdReltBean.getData(); |
|||
if ("1".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i1); |
|||
qw.like("u.orgSidPath", orgSidPath); |
|||
} else if ("2".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i2); |
|||
qw.like("u.orgSidPath", orgSidPath); |
|||
} else if ("3".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i3); |
|||
qw.like("u.orgSidPath", orgSidPath); |
|||
} else if ("4".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i4); |
|||
qw.like("u.orgSidPath", orgSidPath); |
|||
} else if ("5".equals(orgLevelKey)) { |
|||
qw.eq("bf.createBySid", query.getUserSid()); |
|||
} else { |
|||
PagerVo<BusFleetVo> p = new PagerVo<>(); |
|||
return p; |
|||
} |
|||
} else { |
|||
PagerVo<BusFleetVo> p = new PagerVo<>(); |
|||
return p; |
|||
} |
|||
} |
|||
qw.eq("bf.isDelete", 0); |
|||
if (StringUtils.isNotBlank(query.getOrgName())) { |
|||
qw.like("bf.createOrgName", query.getOrgName()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getFleetName())) { |
|||
qw.like("bf.fleetName", query.getFleetName()); |
|||
} |
|||
String attachmentStartDate = query.getAttachmentStartDate(); |
|||
String attachmentEndDate = query.getAttachmentEndDate(); |
|||
qw.apply(StringUtils.isNotEmpty(attachmentStartDate), "date_format (bf.attachmentStartDate,'%Y-%m-%d') >= date_format('" + attachmentStartDate + "','%Y-%m-%d')"). |
|||
apply(StringUtils.isNotEmpty(attachmentEndDate), "date_format (bf.attachmentEndDate,'%Y-%m-%d') <= date_format('" + attachmentEndDate + "','%Y-%m-%d')" |
|||
); |
|||
IPage<BusFleet> page = PagerUtil.queryToPage(pq); |
|||
IPage<BusFleetVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<BusFleetVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
public void saveOrUpdateDto(BusFleetDto dto) { |
|||
String dtoSid = dto.getSid(); |
|||
List<String> urls = dto.getUrls(); |
|||
if (StringUtils.isBlank(dtoSid)) { |
|||
String sid = this.insertByDto(dto); |
|||
for (String url : urls) { |
|||
String filePath = url.replace(fileUploadComponent.getUrlPrefix(), ""); |
|||
BusFile busFile = new BusFile(); |
|||
busFile.setLinkSid(sid); |
|||
busFile.setAttachType(BusAttachTypeEnum.GKXY.getAttachType()); |
|||
busFile.setFilePath(filePath); |
|||
busFileService.save(busFile); |
|||
} |
|||
return; |
|||
} |
|||
this.updateByDto(dto); |
|||
busFileService.delByLinkSidAndType(dtoSid,BusAttachTypeEnum.GKXY.getAttachType()); |
|||
for (String url : urls) { |
|||
String filePath = url.replace(fileUploadComponent.getUrlPrefix(), ""); |
|||
BusFile busFile = new BusFile(); |
|||
busFile.setLinkSid(dtoSid); |
|||
busFile.setAttachType(BusAttachTypeEnum.GKXY.getAttachType()); |
|||
busFile.setFilePath(filePath); |
|||
busFileService.save(busFile); |
|||
} |
|||
} |
|||
|
|||
public String insertByDto(BusFleetDto dto) { |
|||
BusFleet entity = new BusFleet(); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.insert(entity); |
|||
return entity.getSid(); |
|||
} |
|||
|
|||
public void updateByDto(BusFleetDto dto) { |
|||
String dtoSid = dto.getSid(); |
|||
if (StringUtils.isBlank(dtoSid)) { |
|||
return; |
|||
} |
|||
BusFleet entity = fetchBySid(dtoSid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
} |
|||
|
|||
public BusFleetDetailsVo fetchDetailsVoBySid(String sid) { |
|||
BusFleet entity = fetchBySid(sid); |
|||
BusFleetDetailsVo vo = new BusFleetDetailsVo(); |
|||
BeanUtil.copyProperties(entity, vo); |
|||
List<BusFileDto> gkxys = busFileService.selByLinkSidAndType(sid, BusAttachTypeEnum.GKXY.getAttachType()); |
|||
ArrayList<String> gkxy = new ArrayList<>(); |
|||
for (BusFileDto busFileDto : gkxys) { |
|||
String url = fileUploadComponent.getUrlPrefix() + busFileDto.getFilePath(); |
|||
gkxy.add(url); |
|||
} |
|||
vo.setUrls(gkxy); |
|||
List<BusFileDto> xgywbxs = busFileService.selByLinkSidAndType(sid, BusAttachTypeEnum.XGYWBX.getAttachType()); |
|||
ArrayList<String> xgywbx = new ArrayList<>(); |
|||
for (BusFileDto busFileDto : xgywbxs) { |
|||
String url = fileUploadComponent.getUrlPrefix() + busFileDto.getFilePath(); |
|||
xgywbx.add(url); |
|||
} |
|||
vo.setBusinessUrls(xgywbx); |
|||
return vo; |
|||
} |
|||
|
|||
public void updateIsDel(String[] sids) { |
|||
for (String sid : sids) { |
|||
baseMapper.updateIsDel(sid); |
|||
} |
|||
} |
|||
|
|||
public void saveBusiness(BusFleetNewDto dto) { |
|||
BusFleetDto busFleetDto = new BusFleetDto(); |
|||
BusFleet busFleet = fetchBySid(dto.getSid()); |
|||
BeanUtil.copyProperties(busFleet,busFleetDto); |
|||
busFleetDto.setBusinessInsurance(dto.getInsurance()); |
|||
busFleetDto.setBusinessillegally(dto.getIllegally()); |
|||
busFleetDto.setBusinessRemarks(dto.getRemarks()); |
|||
List<String> urls = dto.getUrls(); |
|||
busFileService.delByLinkSidAndType(dto.getSid(), BusAttachTypeEnum.XGYWBX.getAttachType()); |
|||
for (String url : urls) { |
|||
String filePath = url.replace(fileUploadComponent.getUrlPrefix(), ""); |
|||
BusFile busFile = new BusFile(); |
|||
busFile.setLinkSid(dto.getSid()); |
|||
busFile.setAttachType(BusAttachTypeEnum.XGYWBX.getAttachType()); |
|||
busFile.setFilePath(filePath); |
|||
busFileService.save(busFile); |
|||
} |
|||
this.updateByDto(busFleetDto); |
|||
} |
|||
} |
@ -0,0 +1,76 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.api.scmactivity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import java.util.Date; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmActivity.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.scmactivity.ScmActivity <br/> |
|||
* Description: 营销活动管理. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:42 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "营销活动管理", description = "营销活动管理") |
|||
@TableName("scm_activity") |
|||
public class ScmActivity extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("创建人姓名") |
|||
private String createByName; // 创建人姓名
|
|||
@ApiModelProperty("活动名称") |
|||
private String activityName; // 活动名称
|
|||
@ApiModelProperty("活动地点") |
|||
private String activityAddress; // 活动地点
|
|||
@ApiModelProperty("活动内容") |
|||
private String activityContent; // 活动内容
|
|||
@ApiModelProperty("活动总结") |
|||
private String activitySummary; // 活动总结
|
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("开始日期") |
|||
private Date activityStartDate; // 开始日期
|
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("结束日期") |
|||
private Date activityEndDate; // 结束日期
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 创建组织sid
|
|||
@ApiModelProperty("创建组织名称") |
|||
private String createOrgName; // 创建组织名称
|
|||
|
|||
} |
@ -0,0 +1,87 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.api.scmactivity; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmActivityVo.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.scmactivity.ScmActivityVo <br/> |
|||
* Description: 营销活动管理 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:43 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "营销活动管理 视图数据详情", description = "营销活动管理 视图数据详情") |
|||
public class ScmActivityDetailsVo implements Vo { |
|||
|
|||
private String sid; // sid
|
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("创建人sid") |
|||
private String createBySid; |
|||
@ApiModelProperty("创建人姓名") |
|||
private String createByName; // 创建人姓名
|
|||
@ApiModelProperty("活动名称") |
|||
private String activityName; // 活动名称
|
|||
@ApiModelProperty("活动地点") |
|||
private String activityAddress; // 活动地点
|
|||
@ApiModelProperty("活动内容") |
|||
private String activityContent; // 活动内容
|
|||
@ApiModelProperty("活动总结") |
|||
private String activitySummary; // 活动总结
|
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("开始日期") |
|||
private Date activityStartDate; // 开始日期
|
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("结束日期") |
|||
private Date activityEndDate; // 结束日期
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 创建组织sid
|
|||
@ApiModelProperty("创建组织名称") |
|||
private String createOrgName; // 创建组织名称
|
|||
@ApiModelProperty |
|||
private List<String> urls = new ArrayList<>(); |
|||
|
|||
} |
@ -0,0 +1,86 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.api.scmactivity; |
|||
|
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmActivityDto.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.scmactivity.ScmActivityDto <br/> |
|||
* Description: 营销活动管理 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:43 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "营销活动管理 数据传输对象", description = "营销活动管理 数据传输对象") |
|||
public class ScmActivityDto implements Dto { |
|||
|
|||
private String sid; // sid
|
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("创建人sid") |
|||
private String createBySid; |
|||
@ApiModelProperty("创建人姓名") |
|||
private String createByName; // 创建人姓名
|
|||
@ApiModelProperty("活动名称") |
|||
private String activityName; // 活动名称
|
|||
@ApiModelProperty("活动地点") |
|||
private String activityAddress; // 活动地点
|
|||
@ApiModelProperty("活动内容") |
|||
private String activityContent; // 活动内容
|
|||
@ApiModelProperty("活动总结") |
|||
private String activitySummary; // 活动总结
|
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("开始日期") |
|||
private Date activityStartDate; // 开始日期
|
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("结束日期") |
|||
private Date activityEndDate; // 结束日期
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 创建组织sid
|
|||
@ApiModelProperty("创建组织名称") |
|||
private String createOrgName; // 创建组织名称
|
|||
@ApiModelProperty |
|||
private List<String> urls = new ArrayList<>(); |
|||
} |
@ -0,0 +1,77 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.api.scmactivity; |
|||
|
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmActivityFeign.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.scmactivity.ScmActivityFeign <br/> |
|||
* Description: 营销活动管理. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:43 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "营销活动管理") |
|||
@FeignClient( |
|||
contextId = "anrui-scm-ScmActivity", |
|||
name = "anrui-scm", |
|||
path = "v1/marketingActivities") |
|||
public interface ScmActivityFeign { |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
@ResponseBody |
|||
public ResultBean<PagerVo<ScmActivityVo>> listPage(@RequestBody PagerQuery<ScmActivityQuery> pq); |
|||
|
|||
@ApiOperation("新增或修改") |
|||
@PostMapping("/saveOrUpdate") |
|||
@ResponseBody |
|||
public ResultBean save(@RequestBody ScmActivityDto dto); |
|||
|
|||
@ApiOperation("根据sid删除记录") |
|||
@DeleteMapping("/delBySids") |
|||
@ResponseBody |
|||
public ResultBean delBySids(@RequestBody String[] sids); |
|||
|
|||
@ApiOperation("根据SID获取一条记录") |
|||
@GetMapping("/gteInitBySid/{sid}") |
|||
@ResponseBody |
|||
public ResultBean<ScmActivityDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid); |
|||
} |
@ -0,0 +1,67 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.api.scmactivity; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import java.util.Date; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmActivityQuery.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.scmactivity.ScmActivityQuery <br/> |
|||
* Description: 营销活动管理 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:42 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "营销活动管理 查询条件", description = "营销活动管理 查询条件") |
|||
public class ScmActivityQuery implements Query { |
|||
|
|||
@ApiModelProperty("创建组织名称") |
|||
private String orgName; |
|||
@ApiModelProperty("活动名称") |
|||
private String activityName; // 活动名称
|
|||
@ApiModelProperty("开始日期") |
|||
private String activityStartDate; // 开始日期
|
|||
@ApiModelProperty("结束日期") |
|||
private String activityEndDate; // 结束日期
|
|||
|
|||
private String userSid; |
|||
private String orgPath; |
|||
private String menuUrl; |
|||
private String menuSid; |
|||
} |
@ -0,0 +1,68 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.api.scmactivity; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import java.util.Date; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmActivityVo.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.scmactivity.ScmActivityVo <br/> |
|||
* Description: 营销活动管理 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:43 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "营销活动管理 视图数据对象", description = "营销活动管理 视图数据对象") |
|||
public class ScmActivityVo implements Vo { |
|||
|
|||
private String sid; // sid
|
|||
|
|||
@ApiModelProperty("创建组织名称") |
|||
private String createOrgName; |
|||
@ApiModelProperty("活动名称") |
|||
private String activityName; // 活动名称
|
|||
@ApiModelProperty("活动地点") |
|||
private String activityAddress; |
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("开始日期") |
|||
private Date activityStartDate; // 开始日期
|
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("结束日期") |
|||
private Date activityEndDate; // 结束日期
|
|||
} |
@ -0,0 +1,73 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.api.scminteract; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import java.util.Date; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmInteract.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.scminteract.ScmInteract <br/> |
|||
* Description: 厂家沟通管理. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:43 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "厂家沟通管理", description = "厂家沟通管理") |
|||
@TableName("scm_interact") |
|||
public class ScmInteract extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("创建人姓名") |
|||
private String createByName; // 创建人姓名
|
|||
@ApiModelProperty("厂家名称") |
|||
private String manufactorName; // 厂家名称
|
|||
@ApiModelProperty("对接人") |
|||
private String contacts; // 对接人
|
|||
@ApiModelProperty("沟通事宜") |
|||
private String interactContent; // 沟通事宜
|
|||
@ApiModelProperty("沟通结果") |
|||
private String interactResult; // 沟通结果
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
@ApiModelProperty("沟通日期") |
|||
private Date interactDate; // 沟通日期
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 创建组织sid
|
|||
@ApiModelProperty("创建组织名称") |
|||
private String createOrgName; // 创建组织名称
|
|||
|
|||
} |
@ -0,0 +1,83 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.api.scminteract; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmInteractVo.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.scminteract.ScmInteractVo <br/> |
|||
* Description: 厂家沟通管理 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:43 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "厂家沟通管理 视图数据详情", description = "厂家沟通管理 视图数据详情") |
|||
public class ScmInteractDetailsVo implements Vo { |
|||
|
|||
private String sid; // sid
|
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("创建人sid") |
|||
private String createBySid; |
|||
@ApiModelProperty("创建人姓名") |
|||
private String createByName; // 创建人姓名
|
|||
@ApiModelProperty("厂家名称") |
|||
private String manufactorName; // 厂家名称
|
|||
@ApiModelProperty("对接人") |
|||
private String contacts; // 对接人
|
|||
@ApiModelProperty("沟通事宜") |
|||
private String interactContent; // 沟通事宜
|
|||
@ApiModelProperty("沟通结果") |
|||
private String interactResult; // 沟通结果
|
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("沟通日期") |
|||
private Date interactDate; // 沟通日期
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 创建组织sid
|
|||
@ApiModelProperty("创建组织名称") |
|||
private String createOrgName; // 创建组织名称
|
|||
@ApiModelProperty |
|||
private List<String> urls = new ArrayList<>(); |
|||
} |
@ -0,0 +1,83 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.api.scminteract; |
|||
|
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmInteractDto.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.scminteract.ScmInteractDto <br/> |
|||
* Description: 厂家沟通管理 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:43 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "厂家沟通管理 数据传输对象", description = "厂家沟通管理 数据传输对象") |
|||
public class ScmInteractDto implements Dto { |
|||
|
|||
private String sid; // sid
|
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("创建人sid") |
|||
private String createBySid; |
|||
@ApiModelProperty("创建人姓名") |
|||
private String createByName; // 创建人姓名
|
|||
@ApiModelProperty("厂家名称") |
|||
private String manufactorName; // 厂家名称
|
|||
@ApiModelProperty("对接人") |
|||
private String contacts; // 对接人
|
|||
@ApiModelProperty("沟通事宜") |
|||
private String interactContent; // 沟通事宜
|
|||
@ApiModelProperty("沟通结果") |
|||
private String interactResult; // 沟通结果
|
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("沟通日期") |
|||
private Date interactDate; // 沟通日期
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 创建组织sid
|
|||
@ApiModelProperty("创建组织名称") |
|||
private String createOrgName; // 创建组织名称
|
|||
@ApiModelProperty |
|||
private List<String> urls = new ArrayList<>(); |
|||
} |
@ -0,0 +1,77 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.api.scminteract; |
|||
|
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmInteractFeign.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.scminteract.ScmInteractFeign <br/> |
|||
* Description: 厂家沟通管理. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:43 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "厂家沟通管理") |
|||
@FeignClient( |
|||
contextId = "anrui-scm-ScmInteract", |
|||
name = "anrui-scm", |
|||
path = "v1/manufactorInteract") |
|||
public interface ScmInteractFeign { |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
@ResponseBody |
|||
public ResultBean<PagerVo<ScmInteractVo>> listPage(@RequestBody PagerQuery<ScmInteractQuery> pq); |
|||
|
|||
@ApiOperation("新增或修改") |
|||
@PostMapping("/saveOrUpdate") |
|||
@ResponseBody |
|||
public ResultBean save(@RequestBody ScmInteractDto dto); |
|||
|
|||
@ApiOperation("根据sid删除记录") |
|||
@DeleteMapping("/delBySids") |
|||
@ResponseBody |
|||
public ResultBean delBySids(@RequestBody String[] sids); |
|||
|
|||
@ApiOperation("根据SID获取一条记录") |
|||
@GetMapping("/gteInitBySid/{sid}") |
|||
@ResponseBody |
|||
public ResultBean<ScmInteractDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid); |
|||
} |
@ -0,0 +1,66 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.api.scminteract; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import java.util.Date; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmInteractQuery.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.scminteract.ScmInteractQuery <br/> |
|||
* Description: 厂家沟通管理 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:43 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "厂家沟通管理 查询条件", description = "厂家沟通管理 查询条件") |
|||
public class ScmInteractQuery implements Query { |
|||
|
|||
@ApiModelProperty("厂家名称") |
|||
private String manufactorName; // 厂家名称
|
|||
@ApiModelProperty("沟通日期") |
|||
private String interactDateStartDate; // 沟通日期
|
|||
private String interactDateEndDate; // 沟通日期
|
|||
@ApiModelProperty("创建组织名称") |
|||
private String orgName; // 创建组织名称
|
|||
|
|||
private String userSid; |
|||
private String orgPath; |
|||
private String menuUrl; |
|||
private String menuSid; |
|||
} |
@ -0,0 +1,67 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.api.scminteract; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import java.util.Date; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmInteractVo.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.scminteract.ScmInteractVo <br/> |
|||
* Description: 厂家沟通管理 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:43 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "厂家沟通管理 视图数据对象", description = "厂家沟通管理 视图数据对象") |
|||
public class ScmInteractVo implements Vo { |
|||
|
|||
private String sid; // sid
|
|||
|
|||
@ApiModelProperty("创建组织名称") |
|||
private String createOrgName; |
|||
@ApiModelProperty("厂家名称") |
|||
private String manufactorName; // 厂家名称
|
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
@ApiModelProperty("沟通日期") |
|||
private Date interactDate; |
|||
@ApiModelProperty("对接人") |
|||
private String contacts; // 对接人
|
|||
@ApiModelProperty("沟通事宜") |
|||
private String interactContent; // 沟通事宜
|
|||
} |
@ -0,0 +1,61 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.biz.scmactivity; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
import com.yxt.anrui.scm.api.scmactivity.ScmActivity; |
|||
import com.yxt.anrui.scm.api.scmactivity.ScmActivityVo; |
|||
import org.apache.ibatis.annotations.Update; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmActivityMapper.java <br/> |
|||
* Class: com.yxt.anrui.scm.biz.scmactivity.ScmActivityMapper <br/> |
|||
* Description: 营销活动管理. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:43 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface ScmActivityMapper extends BaseMapper<ScmActivity> { |
|||
|
|||
IPage<ScmActivityVo> selectPageVo(IPage<ScmActivity> page, @Param(Constants.WRAPPER) Wrapper<ScmActivity> qw); |
|||
|
|||
@Update("update scm_activity set isDelete = 1 where sid = #{sid}") |
|||
void updateIsDel(String sid); |
|||
} |
@ -0,0 +1,11 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.anrui.scm.biz.scmactivity.ScmActivityMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmactivity.ScmActivityVo"> |
|||
SELECT * FROM scm_activity sa |
|||
LEFT JOIN anrui_portal.sys_organization as u ON sa.createOrgSid = u.sid |
|||
<where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,92 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.biz.scmactivity; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
import com.yxt.anrui.scm.api.scmactivity.ScmActivity; |
|||
import com.yxt.anrui.scm.api.scmactivity.ScmActivityQuery; |
|||
import com.yxt.anrui.scm.api.scmactivity.ScmActivityVo; |
|||
import com.yxt.anrui.scm.api.scmactivity.ScmActivityDetailsVo; |
|||
import com.yxt.anrui.scm.api.scmactivity.ScmActivityDto; |
|||
import com.yxt.anrui.scm.api.scmactivity.ScmActivityFeign; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmActivityFeignFallback.java <br/> |
|||
* Class: com.yxt.anrui.scm.biz.scmactivity.ScmActivityRest <br/> |
|||
* Description: 营销活动管理. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:43 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "营销活动管理") |
|||
@RestController |
|||
@RequestMapping("v1/marketingActivities") |
|||
public class ScmActivityRest implements ScmActivityFeign { |
|||
|
|||
@Autowired |
|||
private ScmActivityService scmActivityService; |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<ScmActivityVo>> listPage(@RequestBody PagerQuery<ScmActivityQuery> pq){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<ScmActivityVo> pv = scmActivityService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean save(@RequestBody ScmActivityDto dto){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
scmActivityService.saveOrUpdateDto(dto); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean delBySids(@RequestBody String[] sids){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
scmActivityService.updateIsDel(sids); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<ScmActivityDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
ScmActivityDetailsVo vo = scmActivityService.fetchDetailsVoBySid(sid); |
|||
return rb.success().setData(vo); |
|||
} |
|||
} |
@ -0,0 +1,204 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.biz.scmactivity; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.anrui.buscenter.api.busbillfile.BusAttachTypeEnum; |
|||
import com.yxt.anrui.buscenter.api.busfile.BusFile; |
|||
import com.yxt.anrui.buscenter.api.busfleet.BusFleetVo; |
|||
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; |
|||
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|||
import com.yxt.anrui.scm.api.scmfile.ScmFile; |
|||
import com.yxt.anrui.scm.api.scmfile.ScmFileVo; |
|||
import com.yxt.anrui.scm.biz.scmfile.ScmFileService; |
|||
import com.yxt.common.base.config.component.FileUploadComponent; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.anrui.scm.api.scmactivity.ScmActivity; |
|||
import com.yxt.anrui.scm.api.scmactivity.ScmActivityQuery; |
|||
import com.yxt.anrui.scm.api.scmactivity.ScmActivityVo; |
|||
import com.yxt.anrui.scm.api.scmactivity.ScmActivityDetailsVo; |
|||
import com.yxt.anrui.scm.api.scmactivity.ScmActivityDto; |
|||
import com.yxt.anrui.scm.api.scmactivity.ScmActivityFeign; |
|||
|
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmActivityService.java <br/> |
|||
* Class: com.yxt.anrui.scm.biz.scmactivity.ScmActivityService <br/> |
|||
* Description: 营销活动管理 业务逻辑. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:43 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class ScmActivityService extends MybatisBaseService<ScmActivityMapper, ScmActivity> { |
|||
|
|||
@Autowired |
|||
private SysUserFeign sysUserFeign; |
|||
@Autowired |
|||
private FileUploadComponent fileUploadComponent; |
|||
@Autowired |
|||
private ScmFileService scmFileService; |
|||
|
|||
public PagerVo<ScmActivityVo> listPageVo(PagerQuery<ScmActivityQuery> pq) { |
|||
ScmActivityQuery query = pq.getParams(); |
|||
QueryWrapper<ScmActivity> qw = new QueryWrapper<>(); |
|||
//========================================数据授权开始
|
|||
if (StringUtils.isNotBlank(query.getMenuUrl())) { |
|||
PrivilegeQuery privilegeQuery = new PrivilegeQuery(); |
|||
privilegeQuery.setOrgPath(query.getOrgPath()); |
|||
privilegeQuery.setMenuUrl(query.getMenuUrl()); |
|||
privilegeQuery.setMenuSid(query.getMenuSid()); |
|||
privilegeQuery.setUserSid(query.getUserSid()); |
|||
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); |
|||
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) { |
|||
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
|
|||
String orgSidPath = query.getOrgPath(); |
|||
orgSidPath = orgSidPath + "/"; |
|||
int i1 = orgSidPath.indexOf("/"); |
|||
int i2 = orgSidPath.indexOf("/", i1 + 1); |
|||
int i3 = orgSidPath.indexOf("/", i2 + 1); |
|||
int i4 = orgSidPath.indexOf("/", i3 + 1); |
|||
String orgLevelKey = defaultIdReltBean.getData(); |
|||
if ("1".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i1); |
|||
qw.like("u.orgSidPath", orgSidPath); |
|||
} else if ("2".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i2); |
|||
qw.like("u.orgSidPath", orgSidPath); |
|||
} else if ("3".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i3); |
|||
qw.like("u.orgSidPath", orgSidPath); |
|||
} else if ("4".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i4); |
|||
qw.like("u.orgSidPath", orgSidPath); |
|||
} else if ("5".equals(orgLevelKey)) { |
|||
qw.eq("sa.createBySid", query.getUserSid()); |
|||
} else { |
|||
PagerVo<ScmActivityVo> p = new PagerVo<>(); |
|||
return p; |
|||
} |
|||
} else { |
|||
PagerVo<ScmActivityVo> p = new PagerVo<>(); |
|||
return p; |
|||
} |
|||
} |
|||
qw.eq("sa.isDelete", 0); |
|||
if (StringUtils.isNotBlank(query.getOrgName())) { |
|||
qw.like("sa.createOrgName", query.getOrgName()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getActivityName())) { |
|||
qw.like("sa.activityName", query.getActivityName()); |
|||
} |
|||
String activityStartDate = query.getActivityStartDate(); |
|||
String activityEndDate = query.getActivityEndDate(); |
|||
qw.apply(StringUtils.isNotEmpty(activityStartDate), "date_format (sa.activityStartDate,'%Y-%m-%d') >= date_format('" + activityStartDate + "','%Y-%m-%d')"). |
|||
apply(StringUtils.isNotEmpty(activityEndDate), "date_format (sa.activityEndDate,'%Y-%m-%d') <= date_format('" + activityEndDate + "','%Y-%m-%d')" |
|||
); |
|||
IPage<ScmActivity> page = PagerUtil.queryToPage(pq); |
|||
IPage<ScmActivityVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<ScmActivityVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
public void saveOrUpdateDto(ScmActivityDto dto) { |
|||
String dtoSid = dto.getSid(); |
|||
List<String> urls = dto.getUrls(); |
|||
if (StringUtils.isBlank(dtoSid)) { |
|||
String sid = this.insertByDto(dto); |
|||
for (String url : urls) { |
|||
String filePath = url.replace(fileUploadComponent.getUrlPrefix(), ""); |
|||
ScmFile scmFile = new ScmFile(); |
|||
scmFile.setLinkSid(sid); |
|||
scmFile.setFilePath(filePath); |
|||
scmFileService.save(scmFile); |
|||
} |
|||
return; |
|||
} |
|||
this.updateByDto(dto); |
|||
scmFileService.delByMainSid(dtoSid); |
|||
for (String url : urls) { |
|||
String filePath = url.replace(fileUploadComponent.getUrlPrefix(), ""); |
|||
ScmFile scmFile = new ScmFile(); |
|||
scmFile.setLinkSid(dtoSid); |
|||
scmFile.setFilePath(filePath); |
|||
scmFileService.save(scmFile); |
|||
} |
|||
} |
|||
|
|||
public String insertByDto(ScmActivityDto dto) { |
|||
ScmActivity entity = new ScmActivity(); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.insert(entity); |
|||
return entity.getSid(); |
|||
} |
|||
|
|||
public void updateByDto(ScmActivityDto dto) { |
|||
String dtoSid = dto.getSid(); |
|||
if (StringUtils.isBlank(dtoSid)) { |
|||
return; |
|||
} |
|||
ScmActivity entity = fetchBySid(dtoSid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
} |
|||
|
|||
public ScmActivityDetailsVo fetchDetailsVoBySid(String sid) { |
|||
ScmActivity entity = fetchBySid(sid); |
|||
ScmActivityDetailsVo vo = new ScmActivityDetailsVo(); |
|||
BeanUtil.copyProperties(entity, vo); |
|||
List<ScmFileVo> scmFileVos = scmFileService.fetchByMainSid(sid); |
|||
List<String> urls = new ArrayList<>(); |
|||
for (ScmFileVo scmFileVo : scmFileVos) { |
|||
String url = fileUploadComponent.getUrlPrefix() + scmFileVo.getFilePath(); |
|||
urls.add(url); |
|||
} |
|||
vo.setUrls(urls); |
|||
return vo; |
|||
} |
|||
|
|||
public void updateIsDel(String[] sids) { |
|||
for (String sid : sids) { |
|||
baseMapper.updateIsDel(sid); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,61 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.biz.scminteract; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
import com.yxt.anrui.scm.api.scminteract.ScmInteract; |
|||
import com.yxt.anrui.scm.api.scminteract.ScmInteractVo; |
|||
import org.apache.ibatis.annotations.Update; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmInteractMapper.java <br/> |
|||
* Class: com.yxt.anrui.scm.biz.scminteract.ScmInteractMapper <br/> |
|||
* Description: 厂家沟通管理. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:43 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface ScmInteractMapper extends BaseMapper<ScmInteract> { |
|||
|
|||
IPage<ScmInteractVo> selectPageVo(IPage<ScmInteract> page, @Param(Constants.WRAPPER) Wrapper<ScmInteract> qw); |
|||
|
|||
@Update("update scm_interact set isDelete = 1 where sid = #{sid}") |
|||
void updateIsDel(String sid); |
|||
} |
@ -0,0 +1,11 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.anrui.scm.biz.scminteract.ScmInteractMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scminteract.ScmInteractVo"> |
|||
SELECT * FROM scm_interact si |
|||
LEFT JOIN anrui_portal.sys_organization as u ON si.createOrgSid = u.sid |
|||
<where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,92 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.biz.scminteract; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
import com.yxt.anrui.scm.api.scminteract.ScmInteract; |
|||
import com.yxt.anrui.scm.api.scminteract.ScmInteractQuery; |
|||
import com.yxt.anrui.scm.api.scminteract.ScmInteractVo; |
|||
import com.yxt.anrui.scm.api.scminteract.ScmInteractDetailsVo; |
|||
import com.yxt.anrui.scm.api.scminteract.ScmInteractDto; |
|||
import com.yxt.anrui.scm.api.scminteract.ScmInteractFeign; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmInteractFeignFallback.java <br/> |
|||
* Class: com.yxt.anrui.scm.biz.scminteract.ScmInteractRest <br/> |
|||
* Description: 厂家沟通管理. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:43 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "厂家沟通管理") |
|||
@RestController |
|||
@RequestMapping("v1/manufactorInteract") |
|||
public class ScmInteractRest implements ScmInteractFeign { |
|||
|
|||
@Autowired |
|||
private ScmInteractService scmInteractService; |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<ScmInteractVo>> listPage(@RequestBody PagerQuery<ScmInteractQuery> pq){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<ScmInteractVo> pv = scmInteractService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean save(@RequestBody ScmInteractDto dto){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
scmInteractService.saveOrUpdateDto(dto); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean delBySids(@RequestBody String[] sids){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
scmInteractService.updateIsDel(sids); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<ScmInteractDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
ScmInteractDetailsVo vo = scmInteractService.fetchDetailsVoBySid(sid); |
|||
return rb.success().setData(vo); |
|||
} |
|||
} |
@ -0,0 +1,202 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.biz.scminteract; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; |
|||
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|||
import com.yxt.anrui.scm.api.scmactivity.ScmActivityVo; |
|||
import com.yxt.anrui.scm.api.scmfile.ScmFile; |
|||
import com.yxt.anrui.scm.api.scmfile.ScmFileVo; |
|||
import com.yxt.anrui.scm.biz.scmfile.ScmFileService; |
|||
import com.yxt.common.base.config.component.FileUploadComponent; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.anrui.scm.api.scminteract.ScmInteract; |
|||
import com.yxt.anrui.scm.api.scminteract.ScmInteractQuery; |
|||
import com.yxt.anrui.scm.api.scminteract.ScmInteractVo; |
|||
import com.yxt.anrui.scm.api.scminteract.ScmInteractDetailsVo; |
|||
import com.yxt.anrui.scm.api.scminteract.ScmInteractDto; |
|||
import com.yxt.anrui.scm.api.scminteract.ScmInteractFeign; |
|||
|
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-scm(销售支持业务) <br/> |
|||
* File: ScmInteractService.java <br/> |
|||
* Class: com.yxt.anrui.scm.biz.scminteract.ScmInteractService <br/> |
|||
* Description: 厂家沟通管理 业务逻辑. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2024-10-14 17:20:43 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class ScmInteractService extends MybatisBaseService<ScmInteractMapper, ScmInteract> { |
|||
|
|||
@Autowired |
|||
private SysUserFeign sysUserFeign; |
|||
@Autowired |
|||
private FileUploadComponent fileUploadComponent; |
|||
@Autowired |
|||
private ScmFileService scmFileService; |
|||
|
|||
public PagerVo<ScmInteractVo> listPageVo(PagerQuery<ScmInteractQuery> pq) { |
|||
ScmInteractQuery query = pq.getParams(); |
|||
QueryWrapper<ScmInteract> qw = new QueryWrapper<>(); |
|||
//========================================数据授权开始
|
|||
if (StringUtils.isNotBlank(query.getMenuUrl())) { |
|||
PrivilegeQuery privilegeQuery = new PrivilegeQuery(); |
|||
privilegeQuery.setOrgPath(query.getOrgPath()); |
|||
privilegeQuery.setMenuUrl(query.getMenuUrl()); |
|||
privilegeQuery.setMenuSid(query.getMenuSid()); |
|||
privilegeQuery.setUserSid(query.getUserSid()); |
|||
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); |
|||
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) { |
|||
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
|
|||
String orgSidPath = query.getOrgPath(); |
|||
orgSidPath = orgSidPath + "/"; |
|||
int i1 = orgSidPath.indexOf("/"); |
|||
int i2 = orgSidPath.indexOf("/", i1 + 1); |
|||
int i3 = orgSidPath.indexOf("/", i2 + 1); |
|||
int i4 = orgSidPath.indexOf("/", i3 + 1); |
|||
String orgLevelKey = defaultIdReltBean.getData(); |
|||
if ("1".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i1); |
|||
qw.like("u.orgSidPath", orgSidPath); |
|||
} else if ("2".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i2); |
|||
qw.like("u.orgSidPath", orgSidPath); |
|||
} else if ("3".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i3); |
|||
qw.like("u.orgSidPath", orgSidPath); |
|||
} else if ("4".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i4); |
|||
qw.like("u.orgSidPath", orgSidPath); |
|||
} else if ("5".equals(orgLevelKey)) { |
|||
qw.eq("si.createBySid", query.getUserSid()); |
|||
} else { |
|||
PagerVo<ScmInteractVo> p = new PagerVo<>(); |
|||
return p; |
|||
} |
|||
} else { |
|||
PagerVo<ScmInteractVo> p = new PagerVo<>(); |
|||
return p; |
|||
} |
|||
} |
|||
qw.eq("si.isDelete", 0); |
|||
if (StringUtils.isNotBlank(query.getOrgName())) { |
|||
qw.like("si.createOrgName", query.getOrgName()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getManufactorName())) { |
|||
qw.like("si.manufactorName", query.getManufactorName()); |
|||
} |
|||
String interactDateStart = query.getInteractDateStartDate(); |
|||
String interactDateEnd = query.getInteractDateEndDate(); |
|||
qw.apply(StringUtils.isNotEmpty(interactDateStart), "date_format (si.interactDate,'%Y-%m-%d') >= date_format('" + interactDateStart + "','%Y-%m-%d')"). |
|||
apply(StringUtils.isNotEmpty(interactDateEnd), "date_format (si.interactDate,'%Y-%m-%d') <= date_format('" + interactDateEnd + "','%Y-%m-%d')" |
|||
); |
|||
IPage<ScmInteract> page = PagerUtil.queryToPage(pq); |
|||
IPage<ScmInteractVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<ScmInteractVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
public void saveOrUpdateDto(ScmInteractDto dto){ |
|||
String dtoSid = dto.getSid(); |
|||
List<String> urls = dto.getUrls(); |
|||
if (StringUtils.isBlank(dtoSid)) { |
|||
String sid = this.insertByDto(dto); |
|||
for (String url : urls) { |
|||
String filePath = url.replace(fileUploadComponent.getUrlPrefix(), ""); |
|||
ScmFile scmFile = new ScmFile(); |
|||
scmFile.setLinkSid(sid); |
|||
scmFile.setFilePath(filePath); |
|||
scmFileService.save(scmFile); |
|||
} |
|||
return; |
|||
} |
|||
this.updateByDto(dto); |
|||
scmFileService.delByMainSid(dtoSid); |
|||
for (String url : urls) { |
|||
String filePath = url.replace(fileUploadComponent.getUrlPrefix(), ""); |
|||
ScmFile scmFile = new ScmFile(); |
|||
scmFile.setLinkSid(dtoSid); |
|||
scmFile.setFilePath(filePath); |
|||
scmFileService.save(scmFile); |
|||
} |
|||
} |
|||
|
|||
public String insertByDto(ScmInteractDto dto){ |
|||
ScmInteract entity = new ScmInteract(); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.insert(entity); |
|||
return entity.getSid(); |
|||
} |
|||
|
|||
public void updateByDto(ScmInteractDto dto){ |
|||
String dtoSid = dto.getSid(); |
|||
if (StringUtils.isBlank(dtoSid)) { |
|||
return; |
|||
} |
|||
ScmInteract entity = fetchBySid(dtoSid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
} |
|||
|
|||
public ScmInteractDetailsVo fetchDetailsVoBySid(String sid){ |
|||
ScmInteract entity = fetchBySid(sid); |
|||
ScmInteractDetailsVo vo = new ScmInteractDetailsVo(); |
|||
BeanUtil.copyProperties(entity, vo); |
|||
List<ScmFileVo> scmFileVos = scmFileService.fetchByMainSid(sid); |
|||
List<String> urls = new ArrayList<>(); |
|||
for (ScmFileVo scmFileVo : scmFileVos) { |
|||
String url = fileUploadComponent.getUrlPrefix() + scmFileVo.getFilePath(); |
|||
urls.add(url); |
|||
} |
|||
vo.setUrls(urls); |
|||
return vo; |
|||
} |
|||
|
|||
public void updateIsDel(String[] sids) { |
|||
for (String sid : sids) { |
|||
baseMapper.updateIsDel(sid); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,253 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export function typeValues(data) { |
|||
return request({ |
|||
url: '/portal/v1/dictcommons/typeValues', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 获取所有分公司
|
|||
export function selectOrgSidList(data) { |
|||
return request({ |
|||
url: '/portal/v1/sysorganization/selectOrgSidList', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 根据当前登录人orgSidPath(全路径sid)查询分公司
|
|||
export function getOrgSidByPath(data) { |
|||
return request({ |
|||
url: '/portal/v1/sysstafforg/getOrgSidByPath', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 根据分公司sid查询分公司名称
|
|||
export function fetchBySid(sid) { |
|||
return request({ |
|||
url: 'portal/v1/sysorganization/fetchBySid/' + sid, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 根据当前登录用户sid获取本分公司下的销售部门和销售专员
|
|||
export function selectOrgList(data) { |
|||
return request({ |
|||
url: '/portal/v1/sysorganization/selectOrgList', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 根据当前登录用户全路径sidPath获取本分公司下的资方信息
|
|||
export function selectListByOrgPath(data) { |
|||
return request({ |
|||
url: '/riskcenter/v1/loanfinbank/selectListByOrgPath', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 根据当前登录用户的分公司sid获取本分公司下的车型信息
|
|||
export function selModelByUseOrgSid(data) { |
|||
return request({ |
|||
url: '/base/basevehmodelconfig/selModelByUseOrgSid', |
|||
method: 'post', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 根据当前登录用户的全路径sidPath、用户sid、客户类型(01个人、02企业)等获取当前登录用户下的客户信息
|
|||
export function selectCustomerList(data) { |
|||
return request({ |
|||
url: '/crm/v1/crmcustomertemp/selectCustomerList', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 根据当前登录用户的全路径sidPath获取分公司下的客户信息
|
|||
export function pickCustomer(data) { |
|||
return request({ |
|||
url: '/riskcenter/v1/loansubletapply/pickCustomer', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 当前用户创建申请时判断该用户是否有该菜单的操作权限
|
|||
export function selectHaveMessage(data) { |
|||
return request({ |
|||
url: '/portal/v1/sysuser/selectHaveMessage ', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 根据当前登录用户的角色获取菜单分页列表页面右上角按钮的隐藏
|
|||
export function getButtonPermissions(data) { |
|||
return request({ |
|||
url: '/portal/v1/sysfunction/getButtonPermissions', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 根据分公司sid获取该分公司下的所有供应商
|
|||
export function getGysByOrgSid(data) { |
|||
return request({ |
|||
url: '/base/v1/basemanufacturer/getGysByOrgSid', |
|||
method: 'post', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 根据分公司sid获取该分公司下的所有供应商
|
|||
export function getGysTypeByOrgSid(data) { |
|||
return request({ |
|||
url: '/base/v1/basemanufacturer/getGysTypeByOrgSid', |
|||
method: 'post', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 根据分公司全路径sid和车型sid获取合格证公告型号
|
|||
export function getAnnounceList(data) { |
|||
return request({ |
|||
url: '/base/v1/basevehmodelannouncementmodel/getAnnounceList', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 根据分公司全路径sid、当前登录用户sid、是否打包获取已备案(有效期内)的产品政策信息
|
|||
export function selectList(data) { |
|||
return request({ |
|||
url: '/riskcenter/v1/LoanFinPolicy/selectList', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 获取产品政策下的其它融信息,或分公司下备案通过的其它融
|
|||
export function selectListByOther(data) { |
|||
return request({ |
|||
url: '/riskcenter/v1/LoanFinOtherPolicy/selectList', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 销售订单--编辑、详情初始化
|
|||
export function fetchDetails(data) { |
|||
return request({ |
|||
url: '/buscenter/v1/bussalesorder/fetchDetailsBySid/' + data, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 根据部门sid获取该部门主管人员
|
|||
export function selectMangerByDeptSid(data) { |
|||
return request({ |
|||
url: '/base/v1/basedistributorapply/selectMangerByDeptSid', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 根据分公司全路径Sid获取
|
|||
export function selectInvoingByOrgPath(data) { |
|||
return request({ |
|||
url: '/riskcenter/v1/loancustomerrecord/selectInvoingByOrgPath', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 获取集团所有在职人员
|
|||
export function selectStaffListss() { |
|||
return request({ |
|||
url: '/portal/v1/sysstaffinfo/selectStaffListss', |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 根据分公司orgPath和账号类型(对公或个人,必传)获取银行账号信息
|
|||
export function listByPayment(data) { |
|||
return request({ |
|||
url: '/fin/v1/finmanufacturerbank/listByPayment', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 根据用户sid、分公司orgPath、账号类型(可不传)获取本分公司下的银行账号
|
|||
export function selAccountByOrgSid(data) { |
|||
return request({ |
|||
url: '/fin/v1/finmanufacturerbank/selAccountByOrgSid', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 根据当前登录用户的全路径查询相应部门下的所有人
|
|||
export function selAllByOrgSidPath(data) { |
|||
return request({ |
|||
url: '/portal/v1/sysstafforg/selAllByOrgSidPath', |
|||
method: 'post', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 根据当前登录用户分公司sid获取本分公司下所有用户(一个用户若兼职多个部门则会多次出现)
|
|||
export function getGressionUserList(data) { |
|||
return request({ |
|||
url: '/portal/v1/sysstaffinfo/getGressionUserList', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 车型配置详细信息
|
|||
export function selectExiCarConfig(data) { |
|||
return request({ |
|||
url: '/base/v1/basevehicle/selectExiCarConfig', |
|||
method: 'post', |
|||
params: { |
|||
modelSid: data.modelSid, |
|||
configSid: data.configSid, |
|||
vehModelConfigSid: data.vehModelConfigSid |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 获取集团法务部所有人员
|
|||
export function getLegalStaffS(data) { |
|||
return request({ |
|||
url: '/riskcenter/v1/LoanCaseProgress/getLegalStaffS', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 根据资方sid获取开户行信息
|
|||
export function fetchListByBankSid(data) { |
|||
return request({ |
|||
url: '/riskcenter/v1/loanfinopenbank/fetchListByBankSid', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
@ -0,0 +1,62 @@ |
|||
import request from '@/utils/request' |
|||
// 厂家沟通
|
|||
export default { |
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
// baseURL: "http://127.0.0.1:4523/m1/613533-0-default",
|
|||
url: '/scm/v1/manufactorInteract/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
saveOrUpdate: function(data) { |
|||
return request({ |
|||
// baseURL: "http://127.0.0.1:4523/m1/613533-0-default",
|
|||
url: '/scm/v1/manufactorInteract/saveOrUpdate', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
saveResult: function(data) { |
|||
return request({ |
|||
// baseURL: "http://127.0.0.1:4523/m1/613533-0-default",
|
|||
url: '/scm/v1/manufactorInteract/saveResult', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
init: function(data) { |
|||
return request({ |
|||
// baseURL: "http://127.0.0.1:4523/m1/613533-0-default",
|
|||
url: '/scm/v1/manufactorInteract/gteInitBySid/' + data, |
|||
method: 'get', |
|||
|
|||
}) |
|||
}, |
|||
|
|||
deleteBySids: function(data) { |
|||
return request({ |
|||
// baseURL: "http://127.0.0.1:4523/m1/613533-0-default",
|
|||
url: '/scm/v1/manufactorInteract/delBySids', |
|||
method: 'DELETE', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
} |
@ -0,0 +1,62 @@ |
|||
import request from '@/utils/request' |
|||
// 营销活动
|
|||
export default { |
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
// baseURL: "http://127.0.0.1:4523/m1/613533-0-default",
|
|||
url: '/scm/v1/marketingActivities/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
saveOrUpdate: function(data) { |
|||
return request({ |
|||
// baseURL: "http://127.0.0.1:4523/m1/613533-0-default",
|
|||
url: '/scm/v1/marketingActivities/saveOrUpdate', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
saveResult: function(data) { |
|||
return request({ |
|||
// baseURL: "http://127.0.0.1:4523/m1/613533-0-default",
|
|||
url: '/scm/v1/marketingActivities/saveResult', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
init: function(data) { |
|||
return request({ |
|||
// baseURL: "http://127.0.0.1:4523/m1/613533-0-default",
|
|||
url: '/scm/v1/marketingActivities/gteInitBySid/' + data, |
|||
method: 'get', |
|||
|
|||
}) |
|||
}, |
|||
|
|||
deleteBySids: function(data) { |
|||
return request({ |
|||
// baseURL: "http://127.0.0.1:4523/m1/613533-0-default",
|
|||
url: '/scm/v1/marketingActivities/delBySids', |
|||
method: 'DELETE', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
} |
@ -0,0 +1,344 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--列表页面--> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="厂家沟通管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
|||
<!--Start查询列表部分--> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" class="tab-header"> |
|||
<el-form-item label="分公司"> |
|||
<el-input v-model="listQuery.params.orgName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="厂家名称"> |
|||
<el-input v-model="listQuery.params.manufactorName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="沟通日期"> |
|||
<el-date-picker v-model="listQuery.params.interactDateStartDate" value-format="yyyy-MM-dd" |
|||
format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.interactDateEndDate" value-format="yyyy-MM-dd" |
|||
format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
<div class="listtop"> |
|||
<div class="tit">厂家沟通列表</div> |
|||
</div> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" |
|||
@selection-change="handleSelectionChange"> |
|||
<el-table-column type="selection" align="center" width="50" /> |
|||
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" /> |
|||
<el-table-column label="操作" width="80" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="toInfo(scope.row)">详情</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="createOrgName" label="分公司" align="center" /> |
|||
<el-table-column prop="manufactorName" label="厂家名称" align="center" /> |
|||
<el-table-column prop="interactDate" label="沟通日期" align="center" /> |
|||
<el-table-column prop="contacts" label="对接人" align="center" /> |
|||
<el-table-column prop="interactContent" label="沟通事宜" align="center" /> |
|||
</el-table> |
|||
</div> |
|||
<!--End 主页面主要部分--> |
|||
<div class="pages"> |
|||
<div class="tit" /> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" |
|||
:limit.sync="listQuery.size" class="pagination" @pagination="getList" /> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
</div> |
|||
</div> |
|||
<!--新增及修改 --> |
|||
<manufactorInteractAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" |
|||
@reloadlist="getList" /> |
|||
<!--详情--> |
|||
<manufactorInteractInfo v-show="viewState == 4" ref="divInfo" @doback="resetState" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import req from '@/api/manufactorInteract/manufactorInteract' |
|||
import manufactorInteractAdd from './manufactorInteractAdd' |
|||
import manufactorInteractInfo from './manufactorInteractInfo' |
|||
|
|||
export default { |
|||
name: 'ManufactorInteract', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar, |
|||
manufactorInteractAdd, |
|||
manufactorInteractInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
btnList: [{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'plus', |
|||
btnKey: 'toAdd', |
|||
btnLabel: '新增' |
|||
}, |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'plus', |
|||
btnKey: 'toEdit', |
|||
btnLabel: '编辑' |
|||
}, |
|||
{ |
|||
type: 'danger', |
|||
size: 'small', |
|||
icon: 'del', |
|||
btnKey: 'doDel', |
|||
btnLabel: '删除' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
|||
tableKey: 0, |
|||
listLoading: false, |
|||
list: [], |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"userSid": "", |
|||
"menuUrl": "", |
|||
"orgPath": "", |
|||
"orgName": "", |
|||
"manufactorName": "", |
|||
"interactDateStartDate": "", |
|||
"interactDateEndDate": "" |
|||
} |
|||
}, |
|||
sids: [], |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.getList() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'toAdd': |
|||
this.toAdd() |
|||
break |
|||
case 'toEdit': |
|||
this.toEdit() |
|||
break |
|||
case 'doDel': |
|||
this.doDel() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
row.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
|
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|||
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.listQuery.params.menuUrl = this.$route.path |
|||
req.listPage(this.listQuery).then(response => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"userSid": "", |
|||
"menuUrl": "", |
|||
"orgPath": "", |
|||
"orgName": "", |
|||
"manufactorName": "", |
|||
"interactDateStartDate": "", |
|||
"interactDateEndDate": "" |
|||
} |
|||
} |
|||
this.getList() |
|||
}, |
|||
toAdd() { |
|||
this.viewState = 2 |
|||
this.$refs['divAdd'].showAdd() |
|||
}, |
|||
toEdit() { |
|||
|
|||
if (this.sids.length != 1) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择一条记录进行操作' |
|||
}) |
|||
return |
|||
} |
|||
|
|||
this.viewState = 3 |
|||
this.$refs['divAdd'].showEdit(this.sids[0]) |
|||
}, |
|||
doDel() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择至少一条记录进行删除操作' |
|||
}) |
|||
return |
|||
} |
|||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|||
this.$confirm(tip, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: 'Loading', |
|||
spinner: 'el-icon-loading', |
|||
background: 'rgba(0, 0, 0, 0.7)' |
|||
}) |
|||
req.deleteBySids(this.sids).then(resp => { |
|||
if (resp.success) { |
|||
this.$message({ |
|||
type: 'success', |
|||
message: resp.msg, |
|||
showClose: true |
|||
}) |
|||
} |
|||
this.getList() |
|||
loading.close() |
|||
}).catch(e => { |
|||
loading.close() |
|||
}) |
|||
}).catch(() => {}) |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
}, |
|||
toInfo(row) { |
|||
|
|||
this.viewState = 4 |
|||
this.$refs['divInfo'].showDetail(row.sid) |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 130px !important; |
|||
align-items: center; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 115px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group { |
|||
display: inline; |
|||
line-height: 1px; |
|||
vertical-align: middle; |
|||
} |
|||
</style> |
@ -0,0 +1,249 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 厂家名称</div> |
|||
<el-form-item prop="manufactorName"><el-input v-model="formobj.manufactorName" clearable placeholder="" |
|||
class="addinputInfo addinputw" /></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">沟通日期</div> |
|||
<el-form-item> <el-date-picker v-model="formobj.interactDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" |
|||
type="date" class="addinputInfo addinputw" placeholder="选择日期"></el-date-picker></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 对接人</div> |
|||
<el-form-item prop="contacts"><el-input v-model="formobj.contacts" clearable placeholder="" |
|||
class="addinputInfo addinputw" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">沟通事宜</div> |
|||
<el-form-item><el-input v-model="formobj.interactContent" clearable placeholder="" |
|||
class="addinputInfo addinputw" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">沟通结果</div> |
|||
<el-form-item><el-input v-model="formobj.interactResult" clearable placeholder="" |
|||
class="addinputInfo addinputw" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><el-input v-model="formobj.remarks" clearable placeholder="" |
|||
class="addinputInfo addinputw" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">附件</div> |
|||
<el-form-item> |
|||
<upload-img ref="uploadImg" class="addinputw addinputInfo" v-model="imgList" :limit="1" bucket="map" |
|||
:upload-data="{ type: '0001' }" @change="backData" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/manufactorInteract/manufactorInteract' |
|||
import uploadImg from '@/components/uploadFile/uploadImg' |
|||
import { |
|||
getOrgSidByPath, |
|||
fetchBySid |
|||
} from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
name: 'ManufactorInteractAdd', |
|||
components: { |
|||
uploadImg |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
submitdisabled: false, |
|||
formobj: { |
|||
"sid": "", |
|||
"manufactorName": "", |
|||
"interactDate": "", |
|||
"contacts": "", |
|||
"interactContent": "", |
|||
"interactResult": "", |
|||
"remarks": "", |
|||
"urls": [], |
|||
"createBySid": window.sessionStorage.getItem('userSid'), |
|||
"createByName": window.sessionStorage.getItem('name'), |
|||
"createOrgSid": "", |
|||
"createOrgName": "" |
|||
}, |
|||
rules: { |
|||
manufactorName: [{ |
|||
required: true, |
|||
message: '厂家名称不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
contacts: [{ |
|||
required: true, |
|||
message: '对接人不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
}, |
|||
imgList: [] |
|||
} |
|||
}, |
|||
methods: { |
|||
|
|||
init() { |
|||
|
|||
getOrgSidByPath({ |
|||
orgPath: window.sessionStorage.getItem('defaultOrgPath') |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj.createOrgSid = resp.data |
|||
fetchBySid(resp.data).then((respsone) => { |
|||
if (respsone.success) { |
|||
this.formobj.createOrgName = respsone.data.name |
|||
} |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
backData(value) { |
|||
|
|||
console.log('backData》》》》', value) |
|||
|
|||
this.formobj.urls = [] |
|||
for (var i = 0; i < value.length; i++) { |
|||
this.formobj.urls.push(value[i].url) |
|||
} |
|||
|
|||
}, |
|||
showAdd() { |
|||
this.viewTitle = '【新增】厂家沟通' |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.init() |
|||
}, |
|||
showEdit(sid) { |
|||
this.viewTitle = '【编辑】厂家沟通' |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.init() |
|||
req.init(sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
this.imgList = [] |
|||
for (var i = 0; i < this.formobj.urls.length; i++) { |
|||
this.imgList.push({ |
|||
url: this.formobj.urls[i] |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
saveOrUpdate() { |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.saveOrUpdate(this.formobj).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '保存成功' |
|||
}) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = { |
|||
"sid": "", |
|||
"manufactorName": "", |
|||
"interactDate": "", |
|||
"contacts": "", |
|||
"interactContent": "", |
|||
"interactResult": "", |
|||
"remarks": "", |
|||
"urls": [], |
|||
"createBySid": window.sessionStorage.getItem('userSid'), |
|||
"createByName": window.sessionStorage.getItem('name'), |
|||
"createOrgSid": "", |
|||
"createOrgName": "" |
|||
} |
|||
this.submitdisabled = false |
|||
this.imgList = [] |
|||
this.$emit('doback') |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 130px !important; |
|||
align-items: center; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 115px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group { |
|||
display: inline; |
|||
line-height: 1px; |
|||
vertical-align: middle; |
|||
} |
|||
</style> |
@ -0,0 +1,112 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">厂家名称</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.manufactorName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">沟通日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.interactDate }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">对接人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.contacts }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">沟通事宜</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.interactContent }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">沟通结果</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.interactResult }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">附件</div> |
|||
<el-form-item> |
|||
<template slot-scope="scope"> |
|||
<span v-for="(item,index) in formobj.urls" :key="index" class="addinputInfo"> |
|||
<el-popover placement="left" trigger="click" width="300"> |
|||
<img :src="item" width="100%" /> |
|||
<img slot="reference" :src="item" :alt="item" |
|||
style="max-height: 70px;max-width: 70px; padding: 5px" /> |
|||
</el-popover> |
|||
</span> |
|||
</template> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/manufactorInteract/manufactorInteract' |
|||
|
|||
export default { |
|||
name: 'ManufactorInteractInfo', |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
submitdisabled: false, |
|||
formobj: {}, |
|||
} |
|||
}, |
|||
methods: { |
|||
showDetail(sid) { |
|||
this.viewTitle = '厂家沟通详情' |
|||
req.init(sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = { |
|||
|
|||
} |
|||
this.submitdisabled = false |
|||
this.$emit('doback') |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.span-sty { |
|||
width: 160px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 150px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 150px !important; |
|||
width: calc(100% - 145px); |
|||
} |
|||
</style> |
@ -0,0 +1,346 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--列表页面--> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="营销活动管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
|||
<!--Start查询列表部分--> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" class="tab-header"> |
|||
<el-form-item label="分公司"> |
|||
<el-input v-model="listQuery.params.orgName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="活动名称"> |
|||
<el-input v-model="listQuery.params.activityName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="活动日期"> |
|||
<el-date-picker v-model="listQuery.params.activityStartDate" value-format="yyyy-MM-dd" |
|||
format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.activityEndDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" |
|||
type="date" placeholder="选择日期"></el-date-picker> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
<div class="listtop"> |
|||
<div class="tit">营销活动列表</div> |
|||
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" |
|||
:limit.sync="listQuery.size" class="pagination" @pagination="getList" /> --> |
|||
</div> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" |
|||
@selection-change="handleSelectionChange"> |
|||
<el-table-column type="selection" align="center" width="50" /> |
|||
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" /> |
|||
<el-table-column label="操作" width="80" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="toInfo(scope.row)">详情</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="createOrgName" label="分公司" align="center" /> |
|||
<el-table-column prop="activityName" label="活动名称" align="center" /> |
|||
<el-table-column prop="activityStartDate" label="开始日期" align="center" /> |
|||
<el-table-column prop="activityEndDate" label="结束日期" align="center" /> |
|||
<el-table-column prop="activityAddress" label="地点" align="center" /> |
|||
</el-table> |
|||
</div> |
|||
<!--End 主页面主要部分--> |
|||
<div class="pages"> |
|||
<div class="tit" /> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" |
|||
:limit.sync="listQuery.size" class="pagination" @pagination="getList" /> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
</div> |
|||
</div> |
|||
<!--新增及修改 --> |
|||
<marketingActivitiesAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" |
|||
@reloadlist="getList" /> |
|||
<!--详情--> |
|||
<marketingActivitiesInfo v-show="viewState == 4" ref="divInfo" @doback="resetState" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import req from '@/api/marketingActivities/marketingActivities' |
|||
import marketingActivitiesAdd from './marketingActivitiesAdd' |
|||
import marketingActivitiesInfo from './marketingActivitiesInfo' |
|||
|
|||
export default { |
|||
name: 'MarketingActivities', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar, |
|||
marketingActivitiesAdd, |
|||
marketingActivitiesInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
btnList: [{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'plus', |
|||
btnKey: 'toAdd', |
|||
btnLabel: '新增' |
|||
}, |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'plus', |
|||
btnKey: 'toEdit', |
|||
btnLabel: '编辑' |
|||
}, |
|||
{ |
|||
type: 'danger', |
|||
size: 'small', |
|||
icon: 'del', |
|||
btnKey: 'doDel', |
|||
btnLabel: '删除' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
|||
tableKey: 0, |
|||
listLoading: false, |
|||
list: [], |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"userSid": "", |
|||
"menuUrl": "", |
|||
"orgPath": "", |
|||
"orgName": "", |
|||
"activityName": "", |
|||
"activityStartDate": "", |
|||
"activityEndDate": "" |
|||
} |
|||
}, |
|||
sids: [], |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.getList() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'toAdd': |
|||
this.toAdd() |
|||
break |
|||
case 'toEdit': |
|||
this.toEdit() |
|||
break |
|||
case 'doDel': |
|||
this.doDel() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
row.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
|
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|||
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.listQuery.params.menuUrl = this.$route.path |
|||
req.listPage(this.listQuery).then(response => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"userSid": "", |
|||
"menuUrl": "", |
|||
"orgPath": "", |
|||
"orgName": "", |
|||
"activityName": "", |
|||
"activityStartDate": "", |
|||
"activityEndDate": "" |
|||
} |
|||
} |
|||
this.getList() |
|||
}, |
|||
toAdd() { |
|||
this.viewState = 2 |
|||
this.$refs['divAdd'].showAdd() |
|||
}, |
|||
toEdit() { |
|||
|
|||
if (this.sids.length != 1) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择一条记录进行操作' |
|||
}) |
|||
return |
|||
} |
|||
|
|||
this.viewState = 3 |
|||
this.$refs['divAdd'].showEdit(this.sids[0]) |
|||
}, |
|||
doDel() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择至少一条记录进行删除操作' |
|||
}) |
|||
return |
|||
} |
|||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|||
this.$confirm(tip, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: 'Loading', |
|||
spinner: 'el-icon-loading', |
|||
background: 'rgba(0, 0, 0, 0.7)' |
|||
}) |
|||
req.deleteBySids(this.sids).then(resp => { |
|||
if (resp.success) { |
|||
this.$message({ |
|||
type: 'success', |
|||
message: resp.msg, |
|||
showClose: true |
|||
}) |
|||
} |
|||
this.getList() |
|||
loading.close() |
|||
}).catch(e => { |
|||
loading.close() |
|||
}) |
|||
}).catch(() => {}) |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
}, |
|||
toInfo(row) { |
|||
|
|||
this.viewState = 4 |
|||
this.$refs['divInfo'].showDetail(row.sid) |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 130px !important; |
|||
align-items: center; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 115px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group { |
|||
display: inline; |
|||
line-height: 1px; |
|||
vertical-align: middle; |
|||
} |
|||
</style> |
@ -0,0 +1,255 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 活动名称</div> |
|||
<el-form-item prop="activityName"><el-input v-model="formobj.activityName" clearable placeholder="" |
|||
class="addinputInfo addinputw" /></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">活动开始日期</div> |
|||
<el-form-item> <el-date-picker v-model="formobj.activityStartDate" value-format="yyyy-MM-dd" |
|||
format="yyyy-MM-dd" type="date" class="addinputInfo addinputw" |
|||
placeholder="选择日期"></el-date-picker></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">活动结束日期</div> |
|||
<el-form-item> <el-date-picker v-model="formobj.activityEndDate" value-format="yyyy-MM-dd" |
|||
format="yyyy-MM-dd" type="date" class="addinputInfo addinputw" |
|||
placeholder="选择日期"></el-date-picker></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">活动地点</div> |
|||
<el-form-item><el-input v-model="formobj.activityAddress" clearable placeholder="" |
|||
class="addinputInfo addinputw" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">活动内容</div> |
|||
<el-form-item><el-input v-model="formobj.activityContent" clearable placeholder="" |
|||
class="addinputInfo addinputw" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">活动总结</div> |
|||
<el-form-item><el-input v-model="formobj.activitySummary" clearable placeholder="" |
|||
class="addinputInfo addinputw" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><el-input v-model="formobj.remarks" clearable placeholder="" |
|||
class="addinputInfo addinputw" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">附件</div> |
|||
<el-form-item> |
|||
<upload-img ref="uploadImg" class="addinputw addinputInfo" v-model="imgList" :limit="1" bucket="map" |
|||
:upload-data="{ type: '0001' }" @change="backData" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/marketingActivities/marketingActivities' |
|||
import uploadImg from '@/components/uploadFile/uploadImg' |
|||
import { |
|||
getOrgSidByPath, |
|||
fetchBySid |
|||
} from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
name: 'MarketingActivitiesAdd', |
|||
components: { |
|||
uploadImg |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
submitdisabled: false, |
|||
formobj: { |
|||
"sid": "", |
|||
"activityName": "", |
|||
"activityStartDate": "", |
|||
"activityEndDate": "", |
|||
"activityAddress": "", |
|||
"activityContent": "", |
|||
"activitySummary": "", |
|||
"remarks": "", |
|||
"urls": [], |
|||
"createBySid": window.sessionStorage.getItem('userSid'), |
|||
"createByName": window.sessionStorage.getItem('name'), |
|||
"createOrgSid": "", |
|||
"createOrgName": "" |
|||
}, |
|||
rules: { |
|||
activityName: [{ |
|||
required: true, |
|||
message: '活动名称不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
}, |
|||
imgList: [] |
|||
} |
|||
}, |
|||
methods: { |
|||
|
|||
init() { |
|||
|
|||
getOrgSidByPath({ |
|||
orgPath: window.sessionStorage.getItem('defaultOrgPath') |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj.createOrgSid = resp.data |
|||
fetchBySid(resp.data).then((respsone) => { |
|||
if (respsone.success) { |
|||
this.formobj.createOrgName = respsone.data.name |
|||
} |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
backData(value) { |
|||
|
|||
console.log('backData》》》》', value) |
|||
|
|||
this.formobj.urls = [] |
|||
for (var i = 0; i < value.length; i++) { |
|||
this.formobj.urls.push(value[i].url) |
|||
} |
|||
|
|||
}, |
|||
showAdd() { |
|||
this.viewTitle = '【新增】营销活动' |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.init() |
|||
}, |
|||
showEdit(sid) { |
|||
this.viewTitle = '【编辑】营销活动' |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.init() |
|||
req.init(sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
this.imgList = [] |
|||
for (var i = 0; i < this.formobj.urls.length; i++) { |
|||
this.imgList.push({ |
|||
url: this.formobj.urls[i] |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
saveOrUpdate() { |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.saveOrUpdate(this.formobj).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '保存成功' |
|||
}) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = { |
|||
"sid": "", |
|||
"activityName": "", |
|||
"activityStartDate": "", |
|||
"activityEndDate": "", |
|||
"activityAddress": "", |
|||
"activityContent": "", |
|||
"activitySummary": "", |
|||
"remarks": "", |
|||
"urls": [], |
|||
"createBySid": window.sessionStorage.getItem('userSid'), |
|||
"createByName": window.sessionStorage.getItem('name'), |
|||
"createOrgSid": "", |
|||
"createOrgName": "" |
|||
} |
|||
this.submitdisabled = false |
|||
this.imgList = [] |
|||
this.$emit('doback') |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 130px !important; |
|||
align-items: center; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 115px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group { |
|||
display: inline; |
|||
line-height: 1px; |
|||
vertical-align: middle; |
|||
} |
|||
</style> |
@ -0,0 +1,118 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">活动名称</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.activityName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">活动开始日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.activityStartDate }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">活动结束日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.activityEndDate }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">活动地点</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.activityAddress }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">活动内容</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.activityContent }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">活动总结</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.activitySummary }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">附件</div> |
|||
<el-form-item> |
|||
<template slot-scope="scope"> |
|||
<span v-for="(item,index) in formobj.urls" :key="index" class="addinputInfo"> |
|||
<el-popover placement="left" trigger="click" width="300"> |
|||
<img :src="item" width="100%" /> |
|||
<img slot="reference" :src="item" :alt="item" |
|||
style="max-height: 70px;max-width: 70px; padding: 5px" /> |
|||
</el-popover> |
|||
</span> |
|||
</template> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/marketingActivities/marketingActivities' |
|||
|
|||
export default { |
|||
name: 'MarketingActivitiesInfo', |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
submitdisabled: false, |
|||
formobj: {}, |
|||
} |
|||
}, |
|||
methods: { |
|||
showDetail(sid) { |
|||
this.viewTitle = '营销活动详情' |
|||
req.init(sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = { |
|||
|
|||
} |
|||
this.submitdisabled = false |
|||
this.$emit('doback') |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.span-sty { |
|||
width: 160px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 150px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 150px !important; |
|||
width: calc(100% - 145px); |
|||
} |
|||
</style> |
Loading…
Reference in new issue