104 changed files with 2378 additions and 223 deletions
@ -0,0 +1,25 @@ |
|||
package com.yxt.anrui.base.api.basemanufacturerbank; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/9/19 14:07 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class BaseManActualVo implements Vo { |
|||
private static final long serialVersionUID = -8356553970394175402L; |
|||
@ApiModelProperty("厂家销售通路") |
|||
private String accountName; |
|||
|
|||
@ApiModelProperty("开户行") |
|||
private String depositBank; |
|||
|
|||
@ApiModelProperty("收款银行账号") |
|||
private String bankAccount; |
|||
|
|||
|
|||
} |
@ -0,0 +1,42 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.base.api.basevehicle; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
@ApiModel(value = "专项返利分配选择车辆 查询条件", description = "专项返利分配选择车辆 查询条件") |
|||
public class BaseSpecialRebateDisGetVehQuery implements Query { |
|||
|
|||
@ApiModelProperty("品牌sid") |
|||
private String brandSid; // 品牌sid
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 创建组织sid
|
|||
} |
@ -0,0 +1,58 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.base.api.basevehicle; |
|||
|
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@ApiModel(value = "专项返利分配选择车辆 视图数据对象", description = "专项返利分配选择车辆 视图数据对象") |
|||
public class BaseSpecialRebateDisGetVehVo implements Query { |
|||
|
|||
@ApiModelProperty("车型sid") |
|||
private String modelSid; // 车型sid
|
|||
@ApiModelProperty("车型名称") |
|||
private String modelName; // 车型名称
|
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("厂家结算价") |
|||
private String costPrice; // 厂家结算价
|
|||
@ApiModelProperty("入库日期") |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date priceDate; |
|||
@ApiModelProperty("销售日期") |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date salesDate; |
|||
@ApiModelProperty(value = "买断日期") |
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
private Date solidDate; |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.anrui.base.api.basevehicleactualpay; |
|||
|
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/9/19 11:49 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class BaseVehicleActualPay extends BaseEntity { |
|||
private static final long serialVersionUID = -3051690321206077883L; |
|||
|
|||
@ApiModelProperty(value = "车辆未售买断申请sid") |
|||
private String vehicleActualSid; |
|||
@ApiModelProperty(value = "付款方式") |
|||
private String paymentType; |
|||
@ApiModelProperty(value = "付款方式key") |
|||
private String paymentTypeKey; |
|||
@ApiModelProperty(value = "厂家销售通路") |
|||
private String actualPay; |
|||
@ApiModelProperty(value = "开户行") |
|||
private String bank; |
|||
|
|||
@ApiModelProperty("收款银行账号") |
|||
private String receivingAccount; |
|||
@ApiModelProperty("付款金额") |
|||
private BigDecimal payAccount; |
|||
@ApiModelProperty("付款备注") |
|||
private String payRemark; |
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.yxt.anrui.base.api.basevehicleactualpay; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/9/19 11:52 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class BaseVehicleActualPayDto implements Dto { |
|||
private static final long serialVersionUID = -7136887711471736748L; |
|||
|
|||
@ApiModelProperty(value = "付款方式") |
|||
@NotBlank(message = "付款方式不能为空") |
|||
private String paymentType; |
|||
@ApiModelProperty(value = "付款方式key") |
|||
@NotBlank(message = "付款方式不能为空") |
|||
private String paymentTypeKey; |
|||
@ApiModelProperty(value = "厂家销售通路") |
|||
@NotBlank(message = "厂家销售通路不能为空") |
|||
private String actualPay; |
|||
@ApiModelProperty(value = "开户行") |
|||
@NotBlank(message = "开户行不能为空") |
|||
private String bank; |
|||
|
|||
@ApiModelProperty("收款银行账号") |
|||
@NotBlank(message = "收款银行账号不能为空") |
|||
private String receivingAccount; |
|||
@ApiModelProperty("付款金额") |
|||
@NotBlank(message = "付款金额不能为空") |
|||
private String payAccount; |
|||
@ApiModelProperty("付款备注") |
|||
private String payRemark; |
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.yxt.anrui.base.api.basevehicleactualpay; |
|||
|
|||
import com.yxt.anrui.base.api.basevehicleactualdetails.BaseVehicleActualDetailsFeignFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/9/19 11:57 |
|||
* @Description |
|||
*/ |
|||
@FeignClient( |
|||
contextId = "anrui-base-BaseVehicleActualPay", |
|||
name = "anrui-base", |
|||
path = "v1/basevehicleactualpay", |
|||
fallback = BaseVehicleActualPayFeignFallback.class) |
|||
public interface BaseVehicleActualPayFeign { |
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.yxt.anrui.base.api.basevehicleactualpay; |
|||
|
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/9/19 11:58 |
|||
* @Description |
|||
*/ |
|||
@Component |
|||
public class BaseVehicleActualPayFeignFallback { |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.anrui.base.api.basevehicleactualpay; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/9/19 13:36 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class BaseVehicleActualPayVo implements Vo { |
|||
private static final long serialVersionUID = 7103772117018168626L; |
|||
|
|||
@ApiModelProperty(value = "付款方式") |
|||
private String paymentType; |
|||
@ApiModelProperty(value = "付款方式key") |
|||
private String paymentTypeKey; |
|||
@ApiModelProperty(value = "厂家销售通路") |
|||
private String actualPay; |
|||
@ApiModelProperty(value = "开户行") |
|||
private String bank; |
|||
|
|||
@ApiModelProperty("收款银行账号") |
|||
private String receivingAccount; |
|||
@ApiModelProperty("付款金额") |
|||
private String payAccount; |
|||
@ApiModelProperty("付款备注") |
|||
private String payRemark; |
|||
|
|||
private String sid; |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.yxt.anrui.base.biz.basevehicleactualpay; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPay; |
|||
import com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPayVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/9/19 11:55 |
|||
* @Description |
|||
*/ |
|||
@Mapper |
|||
public interface BaseVehicleActualPayMapper extends BaseMapper<BaseVehicleActualPay> { |
|||
List<BaseVehicleActualPay> selectBySaleSid(String sid); |
|||
|
|||
int deleteBySaleSid(String sid); |
|||
|
|||
List<BaseVehicleActualPayVo> detailsList(String sid); |
|||
|
|||
int deleteByActualSid(String s); |
|||
} |
@ -0,0 +1,34 @@ |
|||
<?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.base.biz.basevehicleactualpay.BaseVehicleActualPayMapper"> |
|||
<select id="selectBySaleSid" resultType="com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPay"> |
|||
select * |
|||
from base_vehicle_actual_pay |
|||
where vehicleActualSid = #{sid} |
|||
</select> |
|||
|
|||
<delete id="deleteBySaleSid"> |
|||
delete |
|||
from base_vehicle_actual_pay |
|||
where vehicleActualSid = #{sid} |
|||
</delete> |
|||
|
|||
<select id="detailsList" resultType="com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPayVo"> |
|||
select sid, |
|||
paymentType, |
|||
paymentTypeKey, |
|||
actualPay, |
|||
bank, |
|||
receivingAccount, |
|||
payAccount, |
|||
payRemark |
|||
from base_vehicle_actual_pay |
|||
where vehicleActualSid = #{sid} |
|||
</select> |
|||
|
|||
<delete id="deleteByActualSid"> |
|||
delete |
|||
from base_vehicle_actual_pay |
|||
where vehicleActualSid = #{s} |
|||
</delete> |
|||
</mapper> |
@ -0,0 +1,16 @@ |
|||
package com.yxt.anrui.base.biz.basevehicleactualpay; |
|||
|
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/9/19 11:54 |
|||
* @Description |
|||
*/ |
|||
@Api(tags = "车辆未售买断管理") |
|||
@RequestMapping("v1/basevehicleactualsales") |
|||
@Controller |
|||
public class BaseVehicleActualPayRest { |
|||
} |
@ -0,0 +1,61 @@ |
|||
package com.yxt.anrui.base.biz.basevehicleactualpay; |
|||
|
|||
import com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPay; |
|||
import com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPayDto; |
|||
import com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPayVo; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.StringUtils; |
|||
import org.springframework.beans.BeanUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/9/19 11:55 |
|||
* @Description |
|||
*/ |
|||
@Service |
|||
public class BaseVehicleActualPayService extends MybatisBaseService<BaseVehicleActualPayMapper, BaseVehicleActualPay> { |
|||
|
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void saveDetails(List<BaseVehicleActualPayDto> detailsPayList, String sid) { |
|||
BaseVehicleActualPay baseVehicleActualPay = null; |
|||
for (BaseVehicleActualPayDto dto : detailsPayList) { |
|||
baseVehicleActualPay = new BaseVehicleActualPay(); |
|||
BeanUtils.copyProperties(dto, baseVehicleActualPay, "sid"); |
|||
baseVehicleActualPay.setVehicleActualSid(sid); |
|||
if(StringUtils.isNotBlank(dto.getPayAccount())){ |
|||
baseVehicleActualPay.setPayAccount(new BigDecimal(dto.getPayAccount())); |
|||
} |
|||
save(baseVehicleActualPay); |
|||
} |
|||
} |
|||
|
|||
public List<BaseVehicleActualPay> selectBySaleSid(String sid) { |
|||
return baseMapper.selectBySaleSid(sid); |
|||
} |
|||
|
|||
public void deleteBySaleSid(String sid) { |
|||
baseMapper.deleteBySaleSid(sid); |
|||
} |
|||
|
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void updateListByReturnSid(String sid, List<BaseVehicleActualPayDto> detailsPayList) { |
|||
saveDetails(detailsPayList, sid); |
|||
} |
|||
|
|||
public List<BaseVehicleActualPayVo> detailsList(String sid) { |
|||
return baseMapper.detailsList(sid); |
|||
} |
|||
|
|||
public void deleteByActualSid(String[] sidsList) { |
|||
List<String> stringList = Arrays.asList(sidsList); |
|||
for (int i = 0; i < stringList.size(); i++) { |
|||
baseMapper.deleteByActualSid(stringList.get(i)); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,44 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.api.scmspecialrebate; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@ApiModel(value = "专项返利分配选择车辆 查询条件", description = "专项返利分配选择车辆 查询条件") |
|||
public class ScmSpecialRebateDisGetVehQuery implements Query { |
|||
|
|||
@ApiModelProperty("品牌sid") |
|||
private String brandSid; // 品牌sid
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 创建组织sid
|
|||
} |
@ -0,0 +1,59 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.api.scmspecialrebate; |
|||
|
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@ApiModel(value = "专项返利分配选择车辆 视图数据对象", description = "专项返利分配选择车辆 视图数据对象") |
|||
public class ScmSpecialRebateDisGetVehVo implements Query { |
|||
|
|||
@ApiModelProperty("车型sid") |
|||
private String modelSid; // 车型sid
|
|||
@ApiModelProperty("车型名称") |
|||
private String modelName; // 车型名称
|
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("厂家结算价") |
|||
private String costPrice; // 厂家结算价
|
|||
@ApiModelProperty("入库日期") |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date priceDate; |
|||
@ApiModelProperty("销售日期") |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date salesDate; |
|||
@ApiModelProperty(value = "买断日期") |
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
private Date solidDate; |
|||
} |
@ -0,0 +1,64 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.api.scmvehinventorymonth; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: aaa(aaa) <br/> |
|||
* File: ScmVehInventorymonthQuery.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.api.scmvehinventorymonth.ScmVehInventorymonthQuery <br/> |
|||
* Description: 月度盘库 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-09-16 15:52:05 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "月度盘库 查询条件", description = "月度盘库 查询条件") |
|||
public class AppScmVehInventorymonthQuery implements Query { |
|||
|
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
@ApiModelProperty("报告编号/创建人") |
|||
private String names; |
|||
@ApiModelProperty("创建日期") |
|||
private String date; |
|||
@ApiModelProperty("盘库报告sid") |
|||
private String reportSid; |
|||
@ApiModelProperty("盘库结果") |
|||
private String state; |
|||
@ApiModelProperty("使用组织名称") |
|||
private String useOrgSid; |
|||
|
|||
} |
@ -0,0 +1,80 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.api.scmvehinventorymonth; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: aaa(aaa) <br/> |
|||
* File: ScmVehInventorymonthVo.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.api.scmvehinventorymonth.ScmVehInventorymonthVo <br/> |
|||
* Description: 月度盘库 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-09-16 15:52:05 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "月度盘库 视图数据对象", description = "月度盘库 视图数据对象") |
|||
public class AppScmVehInventorymonthVo implements Vo { |
|||
|
|||
private String sid; // sid
|
|||
|
|||
@ApiModelProperty("编号(yyyyMMdd)") |
|||
private String billNo; // 编号(yyyyMMdd)
|
|||
@ApiModelProperty("创建组织") |
|||
private String createOrgSid; // 创建组织
|
|||
@ApiModelProperty("创建组织名称") |
|||
private String createOrgName; // 创建组织名称
|
|||
@ApiModelProperty("使用组织") |
|||
private String useOrgSid; // 使用组织
|
|||
@ApiModelProperty("使用组织名称") |
|||
private String useOrgName; // 使用组织名称
|
|||
@ApiModelProperty("剩余盘库记录数量") |
|||
private String surplusNumber; |
|||
@ApiModelProperty("盘库记录总数数量") |
|||
private String totalNumber; |
|||
@ApiModelProperty("盘亏数量") |
|||
private String lossNumber; |
|||
@ApiModelProperty("盘损数量") |
|||
private String damageNumber; |
|||
@ApiModelProperty("盘盈数量") |
|||
private String profitNumber; |
|||
@ApiModelProperty("实盘数量") |
|||
private String actualNumber; |
|||
@ApiModelProperty("是否显示生成报告按钮 剩余盘库记录=0时显示") |
|||
private Boolean showBtn; |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,65 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.biz.scmvehinventorymonth; |
|||
|
|||
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.scmvehinventorymonth.ScmVehInventorymonth; |
|||
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthVo; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: aaa(aaa) <br/> |
|||
* File: ScmVehInventorymonthMapper.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.biz.scmvehinventorymonth.ScmVehInventorymonthMapper <br/> |
|||
* Description: 月度盘库. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-09-16 15:52:05 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface ScmVehInventorymonthMapper extends BaseMapper<ScmVehInventorymonth> { |
|||
|
|||
//@Update("update scm_veh_inventorymonth set name=#{msg} where id=#{id}")
|
|||
//IPage<ScmVehInventorymonthVo> voPage(IPage<ScmVehInventorymonth> page, @Param(Constants.WRAPPER) QueryWrapper<ScmVehInventorymonth> qw);
|
|||
|
|||
IPage<ScmVehInventorymonthVo> selectPageVo(IPage<ScmVehInventorymonth> page, @Param(Constants.WRAPPER) Wrapper<ScmVehInventorymonth> qw); |
|||
|
|||
List<ScmVehInventorymonthVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<ScmVehInventorymonth> qw); |
|||
|
|||
@Select("select * from scm_veh_inventorymonth") |
|||
List<ScmVehInventorymonthVo> selectListVo(); |
|||
} |
@ -0,0 +1,13 @@ |
|||
<?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.scmvehinventorymonth.ScmVehInventorymonthMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthVo"> |
|||
SELECT * FROM scm_veh_inventorymonth <where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
|
|||
<select id="selectListAllVo" resultType="com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthVo"> |
|||
SELECT * FROM scm_veh_inventorymonth <where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,106 @@ |
|||
package com.yxt.anrui.scm.biz.scmvehinventorymonth; /********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
|
|||
|
|||
import com.yxt.anrui.scm.api.scmvehinventorymonth.*; |
|||
import com.yxt.anrui.scm.biz.scmvehinventorymonth.ScmVehInventorymonthService; |
|||
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; |
|||
|
|||
/** |
|||
* Project: aaa(aaa) <br/> |
|||
* File: ScmVehInventorymonthFeignFallback.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.biz.scmvehinventorymonth.ScmVehInventorymonthRest <br/> |
|||
* Description: 月度盘库. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-09-16 15:52:05 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "月度盘库") |
|||
@RestController("com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthRest") |
|||
@RequestMapping("v1/scmvehinventorymonth") |
|||
public class ScmVehInventorymonthRest implements ScmVehInventorymonthFeign { |
|||
|
|||
@Autowired |
|||
private ScmVehInventorymonthService scmVehInventorymonthService; |
|||
|
|||
@Override |
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<ScmVehInventorymonthVo>> listPage(@RequestBody PagerQuery<ScmVehInventorymonthQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<ScmVehInventorymonthVo> pv = scmVehInventorymonthService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
@Override |
|||
@ApiOperation("新增或修改") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody ScmVehInventorymonthDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
scmVehInventorymonthService.saveOrUpdateDto(dto); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
@ApiOperation("根据sid批量删除") |
|||
@PostMapping("/delBySids") |
|||
public ResultBean delBySids(@RequestBody String[] sids) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
scmVehInventorymonthService.delBySids(sids); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
@ApiOperation("根据SID获取一条记录") |
|||
@GetMapping("/fetchDetailsBySid/{sid}") |
|||
public ResultBean<ScmVehInventorymonthDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
ScmVehInventorymonthDetailsVo vo = scmVehInventorymonthService.fetchDetailsVoBySid(sid); |
|||
return rb.success().setData(vo); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean getInventoryRecords(String userSid) { |
|||
return scmVehInventorymonthService.getInventoryRecords(userSid); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<AppScmVehInventorymonthVo>> getCarInventoryReportList(PagerQuery<AppScmVehInventorymonthQuery> pagerQuery) { |
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,170 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.biz.scmvehinventorymonth; |
|||
|
|||
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.base.api.basevehicle.AppScmInventoryRecordsVo; |
|||
import com.yxt.anrui.base.api.basevehicle.BaseVehicleFeign; |
|||
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg; |
|||
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|||
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|||
import com.yxt.anrui.portal.api.sysuser.SysUserVo; |
|||
import com.yxt.anrui.scm.api.scmvehicleinventory.ScmVehicleInventory; |
|||
import com.yxt.anrui.scm.biz.scmvehicleinventory.ScmVehicleInventoryService; |
|||
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.scmvehinventorymonth.ScmVehInventorymonth; |
|||
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthQuery; |
|||
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthVo; |
|||
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthDetailsVo; |
|||
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthDto; |
|||
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthFeign; |
|||
|
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: aaa(aaa) <br/> |
|||
* File: ScmVehInventorymonthService.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.biz.scmvehinventorymonth.ScmVehInventorymonthService <br/> |
|||
* Description: 月度盘库 业务逻辑. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-09-16 15:52:05 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class ScmVehInventorymonthService extends MybatisBaseService<ScmVehInventorymonthMapper, ScmVehInventorymonth> { |
|||
|
|||
@Autowired |
|||
SysStaffOrgFeign sysStaffOrgFeign; |
|||
@Autowired |
|||
BaseVehicleFeign baseVehicleFeign; |
|||
@Autowired |
|||
SysUserFeign sysUserFeign; |
|||
@Autowired |
|||
ScmVehicleInventoryService scmVehicleInventoryService; |
|||
|
|||
|
|||
private QueryWrapper<ScmVehInventorymonth> createQueryWrapper(ScmVehInventorymonthQuery query) { |
|||
// todo: 这里根据具体业务调整查询条件
|
|||
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
|||
QueryWrapper<ScmVehInventorymonth> qw = new QueryWrapper<>(); |
|||
return qw; |
|||
} |
|||
|
|||
public PagerVo<ScmVehInventorymonthVo> listPageVo(PagerQuery<ScmVehInventorymonthQuery> pq) { |
|||
ScmVehInventorymonthQuery query = pq.getParams(); |
|||
QueryWrapper<ScmVehInventorymonth> qw = createQueryWrapper(query); |
|||
IPage<ScmVehInventorymonth> page = PagerUtil.queryToPage(pq); |
|||
IPage<ScmVehInventorymonthVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<ScmVehInventorymonthVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
public void saveOrUpdateDto(ScmVehInventorymonthDto dto) { |
|||
String dtoSid = dto.getSid(); |
|||
if (StringUtils.isBlank(dtoSid)) { |
|||
this.insertByDto(dto); |
|||
return; |
|||
} |
|||
this.updateByDto(dto); |
|||
} |
|||
|
|||
public void insertByDto(ScmVehInventorymonthDto dto) { |
|||
ScmVehInventorymonth entity = new ScmVehInventorymonth(); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.insert(entity); |
|||
} |
|||
|
|||
public void updateByDto(ScmVehInventorymonthDto dto) { |
|||
String dtoSid = dto.getSid(); |
|||
if (StringUtils.isBlank(dtoSid)) { |
|||
return; |
|||
} |
|||
ScmVehInventorymonth entity = fetchBySid(dtoSid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
} |
|||
|
|||
public ScmVehInventorymonthDetailsVo fetchDetailsVoBySid(String sid) { |
|||
ScmVehInventorymonth entity = fetchBySid(sid); |
|||
ScmVehInventorymonthDetailsVo vo = new ScmVehInventorymonthDetailsVo(); |
|||
BeanUtil.copyProperties(entity, vo); |
|||
return vo; |
|||
} |
|||
|
|||
@Transactional(rollbackFor = Exception.class) |
|||
public ResultBean getInventoryRecords(String userSid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
String useOrgSid = sysStaffOrgFeign.getPathSidByUserSid(userSid).getData(); |
|||
SysUserVo sysUserVo = sysUserFeign.fetchBySid(userSid).getData(); |
|||
SysStaffOrg sysStaffOrg = sysStaffOrgFeign.getOrgByStaffSid(sysUserVo.getStaffSid()).getData(); |
|||
boolean inventoryState = scmVehicleInventoryService.getInventoryState(userSid); |
|||
if (inventoryState) { |
|||
return rb.setMsg("盘库记录生成失败,记录存在未确认数据"); |
|||
} |
|||
List<AppScmInventoryRecordsVo> list = baseVehicleFeign.selectInventoryRecords(userSid).getData(); |
|||
ScmVehInventorymonth scmVehInventorymonth = new ScmVehInventorymonth(); |
|||
scmVehInventorymonth.setBillNo(""); |
|||
scmVehInventorymonth.setCreateOrgSid(useOrgSid); |
|||
scmVehInventorymonth.setCreateOrgName(sysStaffOrg.getOrgName()); |
|||
scmVehInventorymonth.setUseOrgSid(useOrgSid); |
|||
scmVehInventorymonth.setUseOrgName(sysStaffOrg.getOrgName()); |
|||
save(scmVehInventorymonth); |
|||
list.removeAll(Collections.singleton(null)); |
|||
if (!list.isEmpty()) { |
|||
for (AppScmInventoryRecordsVo appScmInventoryRecordsVo : list) { |
|||
ScmVehicleInventory scmVehicleInventory = new ScmVehicleInventory(); |
|||
scmVehicleInventory.setVinNo(appScmInventoryRecordsVo.getVin()); |
|||
scmVehicleInventory.setMainSid(scmVehInventorymonth.getSid()); |
|||
scmVehicleInventory.setLocation(appScmInventoryRecordsVo.getWarehouse()); |
|||
scmVehicleInventory.setLocationSid(appScmInventoryRecordsVo.getWarehouseSid()); |
|||
scmVehicleInventory.setInventoryState("无"); |
|||
scmVehicleInventory.setInventoryStateKey(""); |
|||
scmVehicleInventory.setCreateOrgSid(useOrgSid); |
|||
scmVehicleInventory.setUseOrgSid(useOrgSid); |
|||
scmVehicleInventoryService.save(scmVehicleInventory); |
|||
} |
|||
} else { |
|||
return rb.setMsg("暂无需要盘库记录"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
} |
@ -0,0 +1,65 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.biz.scmvehinventoryreport; |
|||
|
|||
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.scmvehinventoryreport.ScmVehInventoryreport; |
|||
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportVo; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: aaa(aaa) <br/> |
|||
* File: ScmVehInventoryreportMapper.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.biz.scmvehinventoryreport.ScmVehInventoryreportMapper <br/> |
|||
* Description: 盘库报告. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-09-16 15:52:05 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface ScmVehInventoryreportMapper extends BaseMapper<ScmVehInventoryreport> { |
|||
|
|||
//@Update("update scm_veh_inventoryreport set name=#{msg} where id=#{id}")
|
|||
//IPage<ScmVehInventoryreportVo> voPage(IPage<ScmVehInventoryreport> page, @Param(Constants.WRAPPER) QueryWrapper<ScmVehInventoryreport> qw);
|
|||
|
|||
IPage<ScmVehInventoryreportVo> selectPageVo(IPage<ScmVehInventoryreport> page, @Param(Constants.WRAPPER) Wrapper<ScmVehInventoryreport> qw); |
|||
|
|||
List<ScmVehInventoryreportVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<ScmVehInventoryreport> qw); |
|||
|
|||
@Select("select * from scm_veh_inventoryreport") |
|||
List<ScmVehInventoryreportVo> selectListVo(); |
|||
} |
@ -0,0 +1,13 @@ |
|||
<?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.scmvehinventoryreport.ScmVehInventoryreportMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportVo"> |
|||
SELECT * FROM scm_veh_inventoryreport <where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
|
|||
<select id="selectListAllVo" resultType="com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportVo"> |
|||
SELECT * FROM scm_veh_inventoryreport <where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,100 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.biz.scmvehinventoryreport; |
|||
|
|||
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.scmvehinventoryreport.ScmVehInventoryreport; |
|||
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportQuery; |
|||
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportVo; |
|||
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportDetailsVo; |
|||
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportDto; |
|||
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportFeign; |
|||
|
|||
/** |
|||
* Project: aaa(aaa) <br/> |
|||
* File: ScmVehInventoryreportFeignFallback.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.biz.scmvehinventoryreport.ScmVehInventoryreportRest <br/> |
|||
* Description: 盘库报告. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-09-16 15:52:05 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "盘库报告") |
|||
@RestController("com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportRest") |
|||
@RequestMapping("v1/scmvehinventoryreport") |
|||
public class ScmVehInventoryreportRest implements ScmVehInventoryreportFeign { |
|||
|
|||
@Autowired |
|||
private ScmVehInventoryreportService scmVehInventoryreportService; |
|||
|
|||
@Override |
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<ScmVehInventoryreportVo>> listPage(@RequestBody PagerQuery<ScmVehInventoryreportQuery> pq){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<ScmVehInventoryreportVo> pv = scmVehInventoryreportService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
@Override |
|||
@ApiOperation("新增或修改") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody ScmVehInventoryreportDto dto){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
scmVehInventoryreportService.saveOrUpdateDto(dto); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
@ApiOperation("根据sid批量删除") |
|||
@PostMapping("/delBySids") |
|||
public ResultBean delBySids(@RequestBody String[] sids){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
scmVehInventoryreportService.delBySids(sids); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
@ApiOperation("根据SID获取一条记录") |
|||
@GetMapping("/fetchDetailsBySid/{sid}") |
|||
public ResultBean<ScmVehInventoryreportDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
ScmVehInventoryreportDetailsVo vo = scmVehInventoryreportService.fetchDetailsVoBySid(sid); |
|||
return rb.success().setData(vo); |
|||
} |
|||
} |
@ -0,0 +1,110 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.scm.biz.scmvehinventoryreport; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
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.scmvehinventoryreport.ScmVehInventoryreport; |
|||
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportQuery; |
|||
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportVo; |
|||
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportDetailsVo; |
|||
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportDto; |
|||
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportFeign; |
|||
|
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: aaa(aaa) <br/> |
|||
* File: ScmVehInventoryreportService.java <br/> |
|||
* Class: com.yxt.anrui.scm.api.biz.scmvehinventoryreport.ScmVehInventoryreportService <br/> |
|||
* Description: 盘库报告 业务逻辑. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-09-16 15:52:05 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class ScmVehInventoryreportService extends MybatisBaseService<ScmVehInventoryreportMapper, ScmVehInventoryreport> { |
|||
private QueryWrapper<ScmVehInventoryreport> createQueryWrapper(ScmVehInventoryreportQuery query) { |
|||
// todo: 这里根据具体业务调整查询条件
|
|||
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
|||
QueryWrapper<ScmVehInventoryreport> qw = new QueryWrapper<>(); |
|||
return qw; |
|||
} |
|||
|
|||
public PagerVo<ScmVehInventoryreportVo> listPageVo(PagerQuery<ScmVehInventoryreportQuery> pq) { |
|||
ScmVehInventoryreportQuery query = pq.getParams(); |
|||
QueryWrapper<ScmVehInventoryreport> qw = createQueryWrapper(query); |
|||
IPage<ScmVehInventoryreport> page = PagerUtil.queryToPage(pq); |
|||
IPage<ScmVehInventoryreportVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<ScmVehInventoryreportVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
public void saveOrUpdateDto(ScmVehInventoryreportDto dto){ |
|||
String dtoSid = dto.getSid(); |
|||
if (StringUtils.isBlank(dtoSid)) { |
|||
this.insertByDto(dto); |
|||
return; |
|||
} |
|||
this.updateByDto(dto); |
|||
} |
|||
|
|||
public void insertByDto(ScmVehInventoryreportDto dto){ |
|||
ScmVehInventoryreport entity = new ScmVehInventoryreport(); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.insert(entity); |
|||
} |
|||
|
|||
public void updateByDto(ScmVehInventoryreportDto dto){ |
|||
String dtoSid = dto.getSid(); |
|||
if (StringUtils.isBlank(dtoSid)) { |
|||
return; |
|||
} |
|||
ScmVehInventoryreport entity = fetchBySid(dtoSid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
} |
|||
|
|||
public ScmVehInventoryreportDetailsVo fetchDetailsVoBySid(String sid){ |
|||
ScmVehInventoryreport entity = fetchBySid(sid); |
|||
ScmVehInventoryreportDetailsVo vo = new ScmVehInventoryreportDetailsVo(); |
|||
BeanUtil.copyProperties(entity, vo); |
|||
return vo; |
|||
} |
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue