Browse Source

Merge remote-tracking branch 'origin/master'

master
fanzongzhe 2 years ago
parent
commit
c9e47821af
  1. 7
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleoutapply/BaseVehicleOutApplyVoNew.java
  2. 20
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleoutapply/BaseVehicleOutApplyService.java
  3. 4
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busarrearscarryvehicledetails/BusArrearsCarryVehicleDetailsFeign.java
  4. 5
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busarrearscarryvehicledetails/BusArrearsCarryVehicleDetailsFeignFallback.java
  5. 13
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorder/app/order/AppBusSalesOrderVo.java
  6. 2
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicledetails/BusArrearsCarryVehicleDetailsMapper.java
  7. 17
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicledetails/BusArrearsCarryVehicleDetailsMapper.xml
  8. 5
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicledetails/BusArrearsCarryVehicleDetailsRest.java
  9. 7
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicledetails/BusArrearsCarryVehicleDetailsService.java
  10. 11
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderMapper.java
  11. 135
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderMapper.xml
  12. 146
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java
  13. 5
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderreturnvehapply/BusSalesOrderReturnVehApplyService.java
  14. 17
      anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangcaigou/cheliangcaigou.vue
  15. 105
      anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangxiaoshou/cheliangxiaoshoutaizhang.vue
  16. 17
      anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangguanli.vue
  17. 17
      anrui-scm/anrui-scm-ui/src/views/supplychain/changjiaxitong/manufacturers.vue
  18. 10
      anrui-system-ui/src/views/RoleAdminister/RoleAdminister.vue

7
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleoutapply/BaseVehicleOutApplyVoNew.java

@ -125,5 +125,12 @@ public class BaseVehicleOutApplyVoNew implements Vo {
private String distributorPriceAll; private String distributorPriceAll;
@ApiModelProperty("开票类型") @ApiModelProperty("开票类型")
private String kpType; private String kpType;
@ApiModelProperty("业务sid")
private String busSid;
@ApiModelProperty("出库类型")
private String ckType;
@ApiModelProperty("欠款时长(天)")
private String qkDate;
} }

20
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleoutapply/BaseVehicleOutApplyService.java

@ -32,6 +32,11 @@ import com.yxt.anrui.base.api.basevehicle.BaseVehicle;
import com.yxt.anrui.base.api.basevehicleout.BaseVehicleOutVo; import com.yxt.anrui.base.api.basevehicleout.BaseVehicleOutVo;
import com.yxt.anrui.base.api.basevehicleoutapply.*; import com.yxt.anrui.base.api.basevehicleoutapply.*;
import com.yxt.anrui.base.biz.basevehicle.BaseVehicleService; import com.yxt.anrui.base.biz.basevehicle.BaseVehicleService;
import com.yxt.anrui.buscenter.api.busarrearscarryvehicleapply.BusArrearsCarryVehicleApplyFeign;
import com.yxt.anrui.buscenter.api.busarrearscarryvehicledetails.BusArrearsCarryVehicleDetailsFeign;
import com.yxt.anrui.buscenter.api.busdeliveredapply.BusDeliveredApplyDetailQuery;
import com.yxt.anrui.buscenter.api.busdeliveredapply.BusDeliveredApplyDetailVo;
import com.yxt.anrui.buscenter.api.busdeliveredapply.BusDeliveredApplyFeign;
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder; import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder;
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign; import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign;
import com.yxt.anrui.fin.api.finvehicleinvoice.FinVehicleInvoice; import com.yxt.anrui.fin.api.finvehicleinvoice.FinVehicleInvoice;
@ -79,6 +84,12 @@ public class BaseVehicleOutApplyService extends MybatisBaseService<BaseVehicleOu
private LoanSolutionsFeign loanSolutionsFeign; private LoanSolutionsFeign loanSolutionsFeign;
@Autowired @Autowired
private FinVehicleInvoiceFeign finVehicleInvoiceFeign; private FinVehicleInvoiceFeign finVehicleInvoiceFeign;
@Autowired
private BusArrearsCarryVehicleApplyFeign busArrearsCarryVehicleApplyFeign;
@Autowired
private BusArrearsCarryVehicleDetailsFeign busArrearsCarryVehicleDetailsFeign;
@Autowired
private BusDeliveredApplyFeign busDeliveredApplyFeign;
private QueryWrapper<BaseVehicleOutApply> createQueryWrapper(BaseVehicleOutApplyQueryNew params) { private QueryWrapper<BaseVehicleOutApply> createQueryWrapper(BaseVehicleOutApplyQueryNew params) {
QueryWrapper<BaseVehicleOutApply> qw = new QueryWrapper<>(); QueryWrapper<BaseVehicleOutApply> qw = new QueryWrapper<>();
@ -187,6 +198,15 @@ public class BaseVehicleOutApplyService extends MybatisBaseService<BaseVehicleOu
if (finVehicleInvoice != null) { if (finVehicleInvoice != null) {
record.setKpType(finVehicleInvoice.getBusinessState()); record.setKpType(finVehicleInvoice.getBusinessState());
} }
//出库类型
Integer i = busArrearsCarryVehicleDetailsFeign.selByVinSidAndYBJ(vinSid).getData();
if (i > 0){
record.setCkType("欠款出库");
//欠款时长(天)
String saleDate = record.getSaleDate();
}else {
record.setCkType("正常出库");
}
} }
PagerVo<BaseVehicleOutApplyVoNew> p = PagerUtil.pageToVo(pagging, null); PagerVo<BaseVehicleOutApplyVoNew> p = PagerUtil.pageToVo(pagging, null);
//p.setTotal(countTotal); //p.setTotal(countTotal);

4
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busarrearscarryvehicledetails/BusArrearsCarryVehicleDetailsFeign.java

@ -62,4 +62,8 @@ public interface BusArrearsCarryVehicleDetailsFeign {
@ApiOperation("获取一条记录") @ApiOperation("获取一条记录")
@GetMapping("/fetchSid/{sid}") @GetMapping("/fetchSid/{sid}")
public ResultBean<BusArrearsCarryVehicleDetailsVo> fetchSid(@PathVariable("sid") String sid); public ResultBean<BusArrearsCarryVehicleDetailsVo> fetchSid(@PathVariable("sid") String sid);
@ApiOperation("根据车辆sid和已办结流程状态查询是否为欠款提车")
@GetMapping("/selByVinSidAndYBJ/{vinSid}")
ResultBean<Integer> selByVinSidAndYBJ(String vinSid);
} }

5
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busarrearscarryvehicledetails/BusArrearsCarryVehicleDetailsFeignFallback.java

@ -66,4 +66,9 @@ public class BusArrearsCarryVehicleDetailsFeignFallback implements BusArrearsCar
public ResultBean<BusArrearsCarryVehicleDetailsVo> fetchSid(String sid) { public ResultBean<BusArrearsCarryVehicleDetailsVo> fetchSid(String sid) {
return null; return null;
} }
@Override
public ResultBean<Integer> selByVinSidAndYBJ(String vinSid) {
return null;
}
} }

13
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorder/app/order/AppBusSalesOrderVo.java

@ -184,4 +184,17 @@ public class AppBusSalesOrderVo implements Vo {
private String factoryDiscount; private String factoryDiscount;
@ApiModelProperty("中介返利") @ApiModelProperty("中介返利")
private String distributorPriceAll; private String distributorPriceAll;
@ApiModelProperty("单台指导价")
private String guildPrice;
@ApiModelProperty("单台成交价")
private String finalPrice;
@ApiModelProperty("中介人1")
private String distributorName;
@ApiModelProperty("单车中介服务费")
private String distributorPrice;
@ApiModelProperty("中介人2")
private String distributorNameTwo;
@ApiModelProperty("单车中介服务费2")
private String distributorPriceTwo;
} }

2
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicledetails/BusArrearsCarryVehicleDetailsMapper.java

@ -70,4 +70,6 @@ public interface BusArrearsCarryVehicleDetailsMapper extends BaseMapper<BusArrea
List<String> selectByApplySidOne(String sid); List<String> selectByApplySidOne(String sid);
List<AdCarListVo> selectByApplySidVehicle(String sid); List<AdCarListVo> selectByApplySidVehicle(String sid);
int selByVinSidAndYBJ(String vinSid);
} }

17
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicledetails/BusArrearsCarryVehicleDetailsMapper.xml

@ -35,11 +35,24 @@
</select> </select>
<select id="selectByApplySidOne" resultType="java.lang.String"> <select id="selectByApplySidOne" resultType="java.lang.String">
select RIGHT(vinNo,8) from bus_arrears_carry_vehicle_details where applySid = #{sid} select RIGHT (vinNo, 8)
from bus_arrears_carry_vehicle_details
where applySid = #{sid}
</select> </select>
<select id="selectByApplySidVehicle" <select id="selectByApplySidVehicle"
resultType="com.yxt.anrui.buscenter.api.busarrearscarryvehicleapply.AdCarListVo"> resultType="com.yxt.anrui.buscenter.api.busarrearscarryvehicleapply.AdCarListVo">
select vinSid as carSid,vinNo as vin from bus_arrears_carry_vehicle_details where applySid = #{sid} select vinSid as carSid, vinNo as vin
from bus_arrears_carry_vehicle_details
where applySid = #{sid}
</select>
<select id="selByVinSidAndYBJ" resultType="int">
SELECT COUNT(bacvd.*)
FROM bus_arrears_carry_vehicle_details bacvd
LEFT JOIN bus_arrears_carry_vehicle_apply bacva
ON bacvd.`applySid` = bacva.`sid`
WHERE bacvd.`vinSid` = #{vinSid}
AND bacva.`nodeState` = "已办结"
</select> </select>
</mapper> </mapper>

5
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicledetails/BusArrearsCarryVehicleDetailsRest.java

@ -91,5 +91,10 @@ public class BusArrearsCarryVehicleDetailsRest implements BusArrearsCarryVehicle
return rb.success().setData(vo); return rb.success().setData(vo);
} }
@Override
public ResultBean<Integer> selByVinSidAndYBJ(String vinSid) {
return busArrearsCarryVehicleDetailsService.selByVinSidAndYBJ(vinSid);
}
} }

7
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicledetails/BusArrearsCarryVehicleDetailsService.java

@ -8,6 +8,7 @@ import com.yxt.anrui.buscenter.api.busarrearscarryvehicledetails.BusArrearsCarry
import com.yxt.anrui.buscenter.api.busarrearscarryvehicledetails.BusArrearsCarryVehicleDetailsDto; import com.yxt.anrui.buscenter.api.busarrearscarryvehicledetails.BusArrearsCarryVehicleDetailsDto;
import com.yxt.anrui.buscenter.api.busarrearscarryvehicledetails.BusArrearsCarryVehicleDetailsQuery; import com.yxt.anrui.buscenter.api.busarrearscarryvehicledetails.BusArrearsCarryVehicleDetailsQuery;
import com.yxt.anrui.buscenter.api.busarrearscarryvehicledetails.BusArrearsCarryVehicleDetailsVo; import com.yxt.anrui.buscenter.api.busarrearscarryvehicledetails.BusArrearsCarryVehicleDetailsVo;
import com.yxt.common.core.result.ResultBean;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import com.yxt.common.base.service.MybatisBaseService; import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil; import com.yxt.common.base.utils.PagerUtil;
@ -140,4 +141,10 @@ public class BusArrearsCarryVehicleDetailsService extends MybatisBaseService<Bus
public List<AdCarListVo> selectByApplySidVehicle(String sid) { public List<AdCarListVo> selectByApplySidVehicle(String sid) {
return baseMapper.selectByApplySidVehicle(sid); return baseMapper.selectByApplySidVehicle(sid);
} }
public ResultBean<Integer> selByVinSidAndYBJ(String vinSid) {
ResultBean rb = ResultBean.fireFail();
int i = baseMapper.selByVinSidAndYBJ(vinSid);
return rb.success().setData(i);
}
} }

11
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderMapper.java

@ -74,7 +74,9 @@ public interface BusSalesOrderMapper extends BaseMapper<BusSalesOrder> {
* @param qw * @param qw
* @return * @return
*/ */
IPage<AppBusSalesOrderVo> getSaleOrders(IPage<BusSalesOrder> page, @Param(Constants.WRAPPER) QueryWrapper<BusSalesOrder> qw, @Param("name") String name,@Param("typeState")String typeState); IPage<AppBusSalesOrderVo> getSaleOrders(IPage<BusSalesOrder> page, @Param(Constants.WRAPPER) QueryWrapper<BusSalesOrder> qw, @Param("name") String name, @Param("typeState") String typeState);
IPage<AppBusSalesOrderVo> getSaleOrdersByOrgPath(IPage<BusSalesOrder> page, @Param(Constants.WRAPPER) QueryWrapper<BusSalesOrder> qw, @Param("name") String name, @Param("typeState") String typeState, @Param("vinNo") String vinNo, @Param("orderingNo") String orderingNo);
/** /**
* 根据销售订单sid查询车型信息 * 根据销售订单sid查询车型信息
@ -193,18 +195,19 @@ public interface BusSalesOrderMapper extends BaseMapper<BusSalesOrder> {
OrderRemarksVo getOrderRemarksInfo(String saleOrderSid); OrderRemarksVo getOrderRemarksInfo(String saleOrderSid);
BusSalesOrdeVo selectTemporaryNo(@Param("vehSid") String vehSid,@Param("contractNo") String contractNo); BusSalesOrdeVo selectTemporaryNo(@Param("vehSid") String vehSid, @Param("contractNo") String contractNo);
/** /**
* 根据车辆sid查询销售订单的数据 * 根据车辆sid查询销售订单的数据
*
* @param vinSid 车辆sid * @param vinSid 车辆sid
* @return * @return
*/ */
BusSaleOrderVehicleOutVo selectOrderOne(String vinSid); BusSaleOrderVehicleOutVo selectOrderOne(String vinSid);
IPage<AppRovalContractPageVo> selectByStaffSid(IPage<AppRovalContractPageVo> page,@Param(Constants.WRAPPER) QueryWrapper<AppRovalContractPageVo> qw); IPage<AppRovalContractPageVo> selectByStaffSid(IPage<AppRovalContractPageVo> page, @Param(Constants.WRAPPER) QueryWrapper<AppRovalContractPageVo> qw);
List<String> selectBusinessSid(@Param("userSid") String userSid, @Param("useOrgSid") String useOrgSid,@Param(Constants.WRAPPER) QueryWrapper<BaseVehicle> qw); List<String> selectBusinessSid(@Param("userSid") String userSid, @Param("useOrgSid") String useOrgSid, @Param(Constants.WRAPPER) QueryWrapper<BaseVehicle> qw);
List<String> selectQKBusinessSid(@Param("userSid") String userSid, @Param("useOrgSid") String useOrgSid); List<String> selectQKBusinessSid(@Param("userSid") String userSid, @Param("useOrgSid") String useOrgSid);

135
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderMapper.xml

@ -39,8 +39,56 @@
</update> </update>
<!--app查询销售订单列表--> <!--app查询销售订单列表-->
<select id="getSaleOrders" resultType="com.yxt.anrui.buscenter.api.bussalesorder.app.order.AppBusSalesOrderVo"> <select id="getSaleOrders" resultType="com.yxt.anrui.buscenter.api.bussalesorder.app.order.AppBusSalesOrderVo">
SELECT DISTINCT SELECT bo.sid as saleOrderSid,
bo.sid AS saleOrderSid, bo.billNo as saleOrderId,
bo.customerClassKey as customerType,
bo.customerSid,
bo.customerName,
bo.customerPhoto as customerImage,
bo.mobile,
bo.payType as carPurchaseType,
bo.payTypeKey as carPurchaseKey,
bd.depositAll,
bo.nodeState as saleOrderState,
DATE_FORMAT(bo.createDate, '%Y-%m-%d') as createdDate,
case bo.isInsurance
when 0 then '否'
when 1 then '是' end as insuranceInfo,
if(bo.nodeState = '已办结', true, false) as showStopBtn,
bo.nodeState is null as showUpdateBtn,
bo.nodeState is null as showDeleteBtn,
0 as showFinancialBtn,
bo.type,
bo.contractNo as contractId,
bo.staffName as saler,
bo.procDefId,
bo.procInstId
FROM bus_sales_order bo
left join bus_sales_order_price bp on bp.salesOrderSid = bo.sid
left join bus_sales_order_deposit bd on bd.salesOrderSid = bo.sid
<where>
${ew.sqlSegment}
<if test="name != null and name != ''">
and concat(IFNULL(bo.customerName
, '')
, IFNULL(bo.staffName
, '')
, ifnull(bo.billNo
, '')) LIKE concat('%'
, #{name}
, '%')
</if>
<if test="typeState != null and typeState != ''">
and LENGTH(bo.nodeState)
>0
</if>
</where>
order by bo.id desc
</select>
<select id="getSaleOrdersByOrgPath"
resultType="com.yxt.anrui.buscenter.api.bussalesorder.app.order.AppBusSalesOrderVo">
SELECT bo.sid AS saleOrderSid,
bo.billNo AS saleOrderId, bo.billNo AS saleOrderId,
bo.customerClassKey AS customerType, bo.customerClassKey AS customerType,
bo.customerSid, bo.customerSid,
@ -52,18 +100,10 @@
bd.depositAll, bd.depositAll,
bo.nodeState AS saleOrderState, bo.nodeState AS saleOrderState,
DATE_FORMAT(bo.createDate, '%Y-%m-%d') AS createdDate, DATE_FORMAT(bo.createDate, '%Y-%m-%d') AS createdDate,
CASE CASE bo.isInsurance
bo.isInsurance WHEN 0 THEN '否'
WHEN 0 WHEN 1 THEN '是' END AS insuranceInfo,
THEN '否' IF(bo.nodeState = '已办结', TRUE, FALSE) AS showStopBtn,
WHEN 1
THEN '是'
END AS insuranceInfo,
IF(
bo.nodeState = '已办结',
TRUE,
FALSE
) AS showStopBtn,
bo.nodeState IS NULL AS showUpdateBtn, bo.nodeState IS NULL AS showUpdateBtn,
bo.nodeState IS NULL AS showDeleteBtn, bo.nodeState IS NULL AS showDeleteBtn,
0 AS showFinancialBtn, 0 AS showFinancialBtn,
@ -72,37 +112,36 @@
bo.staffName AS saler, bo.staffName AS saler,
bo.procDefId, bo.procDefId,
bo.procInstId, bo.procInstId,
bo.useOrgSid,
bo.useOrgName,
bo.purchaseSystemName,
bo.orgName,
bm.modelName,
bsos.distributorPriceAll,
ls.`factoryDiscount`, ls.`factoryDiscount`,
GROUP_CONCAT( GROUP_CONCAT(IF(ov.`linkNo` = '', NULL, ov.`linkNo`)) AS vinNo,
IF(bsov.linkNo = '', NULL, bsov.linkNo)
) AS vinNo,
GROUP_CONCAT( GROUP_CONCAT(
IF( IF(
bsov.orderingNo = '', ov.orderingNo = '',
NULL, NULL,
bsov.orderingNo ov.orderingNo
) )
) AS orderingNo ) AS orderingNo,
FROM bm.guildPrice,
bus_sales_order bo bm.finalPrice,
LEFT JOIN bus_sales_order_price bp bsos.distributorName,
ON bp.salesOrderSid = bo.sid bsos.distributorPrice,
LEFT JOIN bus_sales_order_deposit bd bsos.distributorNameTwo,
ON bd.salesOrderSid = bo.sid bsos.distributorPriceTwo,
LEFT JOIN bus_sales_order_model bm bm.modelName,
ON bm.salesOrderSid = bo.sid bo.useOrgName,
LEFT JOIN bus_sales_order_vehicle bsov bo.purchaseSystemName,
ON bsov.salesOrderSid = bo.sid bo.orgName
LEFT JOIN bus_sales_order_submit bsos FROM bus_sales_order bo
ON bsos.salesOrderSid = bo.sid LEFT JOIN bus_sales_order_price bp ON bp.salesOrderSid = bo.sid
LEFT JOIN bus_sales_order_deposit bd ON bd.salesOrderSid = bo.sid
LEFT JOIN bus_sales_order_vehicle ov ON ov.salesOrderSid=bo.sid
LEFT JOIN anrui_riskcenter.`loan_solutions` ls LEFT JOIN anrui_riskcenter.`loan_solutions` ls
ON ls.`salesOrderSid` = bo.sid ON ls.`salesOrderSid` = bo.sid
LEFT JOIN `bus_sales_vehicle_order` bso ON bo.sid = bso.salesOrderSid
LEFT JOIN bus_sales_order_submit bsos
ON bsos.salesOrderSid = bo.sid
LEFT JOIN bus_sales_order_model bm
ON bm.salesOrderSid = bo.sid
<where> <where>
${ew.sqlSegment} ${ew.sqlSegment}
<if test="name != null and name != ''"> <if test="name != null and name != ''">
@ -119,6 +158,22 @@
and LENGTH(bo.nodeState) and LENGTH(bo.nodeState)
>0 >0
</if> </if>
GROUP BY bo.sid
<if test="vinNo != null and vinNo != '' and orderingNo != null and orderingNo != ''">
HAVING vinNo like concat('%',#{vinNo},'%')
AND orderingNo like concat('%',#{orderingNo},'%')
</if>
<if test="vinNo != null and vinNo != ''">
<if test="orderingNo == null or orderingNo == ''">
HAVING vinNo like concat('%',#{vinNo},'%')
</if>
</if>
<if test="vinNo == null or vinNo == ''">
<if test="orderingNo != null and orderingNo != ''">
HAVING orderingNo like concat('%',#{orderingNo},'%')
</if>
</if>
</where> </where>
order by bo.id desc order by bo.id desc
</select> </select>
@ -478,6 +533,8 @@
</select> </select>
<select id="selectByContractNos" resultType="com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder"> <select id="selectByContractNos" resultType="com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder">
select * from bus_sales_order where contractNo = #{contractNo} select *
from bus_sales_order
where contractNo = #{contractNo}
</select> </select>
</mapper> </mapper>

146
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java

@ -1295,7 +1295,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
baseBrandMitQuery.setOrgSid(busSalesOrder.getUseOrgSid()); baseBrandMitQuery.setOrgSid(busSalesOrder.getUseOrgSid());
baseBrandMitQuery.setBrandSid(busSalesOrderModel.getBrandSid()); baseBrandMitQuery.setBrandSid(busSalesOrderModel.getBrandSid());
List<String> deptSidList = Arrays.asList(busSalesOrder.getOrgSidPath().split("/")); List<String> deptSidList = Arrays.asList(busSalesOrder.getOrgSidPath().split("/"));
String deptSid = deptSidList.get(deptSidList.size()-1); String deptSid = deptSidList.get(deptSidList.size() - 1);
baseBrandMitQuery.setDeptSid(deptSid); baseBrandMitQuery.setDeptSid(deptSid);
ResultBean<String> resultBean1 = baseBrandletpricepowimitFeign.getMoney(baseBrandMitQuery); ResultBean<String> resultBean1 = baseBrandletpricepowimitFeign.getMoney(baseBrandMitQuery);
if (resultBean1.getSuccess()) { if (resultBean1.getSuccess()) {
@ -1325,7 +1325,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
baseBrandMitQuery.setOrgSid(busSalesOrder.getUseOrgSid()); baseBrandMitQuery.setOrgSid(busSalesOrder.getUseOrgSid());
baseBrandMitQuery.setBrandSid(busSalesOrderModel.getBrandSid()); baseBrandMitQuery.setBrandSid(busSalesOrderModel.getBrandSid());
deptSidList = Arrays.asList(busSalesOrder.getOrgSidPath().split("/")); deptSidList = Arrays.asList(busSalesOrder.getOrgSidPath().split("/"));
deptSid = deptSidList.get(deptSidList.size()-1); deptSid = deptSidList.get(deptSidList.size() - 1);
baseBrandMitQuery.setDeptSid(deptSid); baseBrandMitQuery.setDeptSid(deptSid);
ResultBean<String> resultBean2 = baseBrandletpricepowimitFeign.getMoney(baseBrandMitQuery); ResultBean<String> resultBean2 = baseBrandletpricepowimitFeign.getMoney(baseBrandMitQuery);
if (resultBean2.getSuccess()) { if (resultBean2.getSuccess()) {
@ -1464,7 +1464,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
return rb.setMsg("请填写意见"); return rb.setMsg("请填写意见");
} }
BusSalesOrder busSalesOrder = fetchBySid(query.getBusinessSid()); BusSalesOrder busSalesOrder = fetchBySid(query.getBusinessSid());
if(busSalesOrder == null){ if (busSalesOrder == null) {
FlowTaskVo flowTaskVo = new FlowTaskVo(); FlowTaskVo flowTaskVo = new FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo); BeanUtil.copyProperties(query, flowTaskVo);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo); ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo);
@ -1472,10 +1472,10 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
return rb.setMsg(resultBean.getMsg()); return rb.setMsg(resultBean.getMsg());
} }
return rb.success().setMsg("该销售订单不存在,流程已终止"); return rb.success().setMsg("该销售订单不存在,流程已终止");
}else{ } else {
String businessTaskId = busSalesOrder.getTaskId(); String businessTaskId = busSalesOrder.getTaskId();
if (StringUtils.isNotBlank(businessTaskId)) { if (StringUtils.isNotBlank(businessTaskId)) {
if(query.getUserSid().equals(busSalesOrder.getCreateBySid())){ if (query.getUserSid().equals(busSalesOrder.getCreateBySid())) {
FlowTaskVo flowTaskVo = new FlowTaskVo(); FlowTaskVo flowTaskVo = new FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo); BeanUtil.copyProperties(query, flowTaskVo);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo); ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo);
@ -1531,7 +1531,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
} }
return rb.success().setData(resultBean.getData()); return rb.success().setData(resultBean.getData());
}else{ } else {
if (businessTaskId.equals(query.getTaskId())) { if (businessTaskId.equals(query.getTaskId())) {
FlowTaskVo flowTaskVo = new FlowTaskVo(); FlowTaskVo flowTaskVo = new FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo); BeanUtil.copyProperties(query, flowTaskVo);
@ -2356,7 +2356,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
orderInfo.setReadyCarList(appReadyCarList); orderInfo.setReadyCarList(appReadyCarList);
boolean isCheck = isCheck2(map, appReadyCarList); boolean isCheck = isCheck2(map, appReadyCarList);
boolean isCheck3 = isCheck3(appReadyCarList); boolean isCheck3 = isCheck3(appReadyCarList);
if(isCheck3){ if (isCheck3) {
orderInfo.setNotice("选择的数据中包含已作废的数据,请进行确认"); orderInfo.setNotice("选择的数据中包含已作废的数据,请进行确认");
} }
if (isCheck) { if (isCheck) {
@ -2445,9 +2445,9 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
String orderId = order.getOrderId(); String orderId = order.getOrderId();
//根据订单sid查询订单是否已作废 //根据订单sid查询订单是否已作废
ResultBean<BusVehicleOrderVo> busVehicleOrderResultBean = busVehicleOrderFeign.fetchBySid(order.getSid()); ResultBean<BusVehicleOrderVo> busVehicleOrderResultBean = busVehicleOrderFeign.fetchBySid(order.getSid());
if(busVehicleOrderResultBean.getData() != null){ if (busVehicleOrderResultBean.getData() != null) {
BusVehicleOrderVo busVehicleOrderVo = busVehicleOrderResultBean.getData(); BusVehicleOrderVo busVehicleOrderVo = busVehicleOrderResultBean.getData();
if("已作废".equals(busVehicleOrderVo.getOrderStatus())){ if ("已作废".equals(busVehicleOrderVo.getOrderStatus())) {
isCheck = true; isCheck = true;
break; break;
} }
@ -3198,7 +3198,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
//验证所选采购订单的车辆是否发生了变化 //验证所选采购订单的车辆是否发生了变化
boolean isCheck = isCheck2(map, appReadyCarList); boolean isCheck = isCheck2(map, appReadyCarList);
boolean isCheck3 = isCheck3(appReadyCarList); boolean isCheck3 = isCheck3(appReadyCarList);
if(isCheck3){ if (isCheck3) {
isVehicleOrder = false; isVehicleOrder = false;
} }
if (isCheck) { if (isCheck) {
@ -3244,7 +3244,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
AppOrderDetailsVo vo = new AppOrderDetailsVo(); AppOrderDetailsVo vo = new AppOrderDetailsVo();
vo = baseMapper.getSaleOrderDetails(sid); vo = baseMapper.getSaleOrderDetails(sid);
if(StringUtils.isNotBlank(busSalesOrder.getNodeState())){ if (StringUtils.isNotBlank(busSalesOrder.getNodeState())) {
vo.setShowShareAndComment(true); vo.setShowShareAndComment(true);
} }
vo.setBusSalesOrderSid(sid); vo.setBusSalesOrderSid(sid);
@ -4690,7 +4690,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
} }
} }
//如果创建人与部门主管一样,则自动到下一环节。 //如果创建人与部门主管一样,则自动到下一环节。
if(busSalesOrder.get().getCreateBySid().equals(nextNodeUserSids_)){ if (busSalesOrder.get().getCreateBySid().equals(nextNodeUserSids_)) {
busSalesOrderOne = fetchBySid(businessSid); busSalesOrderOne = fetchBySid(businessSid);
bv = new BusinessVariables(); bv = new BusinessVariables();
bv.setModelId(busSalesOrderOne.getProcDefId()); bv.setModelId(busSalesOrderOne.getProcDefId());
@ -4934,14 +4934,14 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
String temporaryNum = String.format("%02d", i + 1); String temporaryNum = String.format("%02d", i + 1);
String temporaryNo = commonContract.getContractNo() + temporaryNum; String temporaryNo = commonContract.getContractNo() + temporaryNum;
String temporaryName = ""; String temporaryName = "";
if(vinListsVo.getVinNo() != null){ if (vinListsVo.getVinNo() != null) {
temporaryName = appOrderDetailsVo.getName()+vinListsVo.getVinNo(); temporaryName = appOrderDetailsVo.getName() + vinListsVo.getVinNo();
}else{ } else {
temporaryName = appOrderDetailsVo.getName()+temporaryNo; temporaryName = appOrderDetailsVo.getName() + temporaryNo;
} }
//更新临时号 //更新临时号
ResultBean busSalesOrderResultBean = busSalesOrderVehicleService.updateTemporaryNo(salesOrderVinSid, temporaryNo,temporaryName); ResultBean busSalesOrderResultBean = busSalesOrderVehicleService.updateTemporaryNo(salesOrderVinSid, temporaryNo, temporaryName);
} }
} else { } else {
for (int i = 0; i < vinList.size(); i++) { for (int i = 0; i < vinList.size(); i++) {
@ -4949,7 +4949,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
String salesOrderVinSid = vinList.get(i).getSid(); String salesOrderVinSid = vinList.get(i).getSid();
String temporaryNum = String.format("%02d", i + 1); String temporaryNum = String.format("%02d", i + 1);
//更新临时号 //更新临时号
ResultBean busSalesOrderResultBean = busSalesOrderVehicleService.updateTemporaryNo(salesOrderVinSid, temporaryNum,""); ResultBean busSalesOrderResultBean = busSalesOrderVehicleService.updateTemporaryNo(salesOrderVinSid, temporaryNum, "");
} }
} }
@ -5376,10 +5376,10 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
variables.put("orderNames", orderNames); variables.put("orderNames", orderNames);
//增加抄送内部引荐人 //增加抄送内部引荐人
BusSalesOrderSubmit salesOrderSubmit = busSalesOrderSubmitService.selectBySaleOrderSid(busSalesOrder.getSid()); BusSalesOrderSubmit salesOrderSubmit = busSalesOrderSubmitService.selectBySaleOrderSid(busSalesOrder.getSid());
if(salesOrderSubmit != null){ if (salesOrderSubmit != null) {
if(StringUtils.isNotBlank(salesOrderSubmit.getUserSid())){ if (StringUtils.isNotBlank(salesOrderSubmit.getUserSid())) {
//抄送中增加抄送内部引荐人 //抄送中增加抄送内部引荐人
variables.put("sendRecommendSid",salesOrderSubmit.getUserSid()); variables.put("sendRecommendSid", salesOrderSubmit.getUserSid());
} }
} }
return variables; return variables;
@ -5723,7 +5723,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
privilegeQuery.setMenuUrl(pagerQuery.getMenuUrl()); privilegeQuery.setMenuUrl(pagerQuery.getMenuUrl());
privilegeQuery.setUserSid(pagerQuery.getUserSid()); privilegeQuery.setUserSid(pagerQuery.getUserSid());
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery);
if(StringUtils.isNotBlank(defaultIdReltBean.getData())){ if (StringUtils.isNotBlank(defaultIdReltBean.getData())) {
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人) //数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
String orgSidPath = pagerQuery.getOrgPath(); String orgSidPath = pagerQuery.getOrgPath();
orgSidPath = orgSidPath + "/"; orgSidPath = orgSidPath + "/";
@ -5744,81 +5744,71 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
} else if ("4".equals(orgLevelKey)) { } else if ("4".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i4); orgSidPath = orgSidPath.substring(0, i4);
qw.like("bo.orgSidPath", orgSidPath); qw.like("bo.orgSidPath", orgSidPath);
} else if("5".equals(orgLevelKey)){ } else if ("5".equals(orgLevelKey)) {
qw.eq("bo.createBySid",pagerQuery.getUserSid()); qw.eq("bo.createBySid", pagerQuery.getUserSid());
}else{ } else {
PagerVo<AppBusSalesOrderVo> p = new PagerVo<>(); PagerVo<AppBusSalesOrderVo> p = new PagerVo<>();
return p; return p;
} }
}else{ } else {
PagerVo<AppBusSalesOrderVo> p = new PagerVo<>(); PagerVo<AppBusSalesOrderVo> p = new PagerVo<>();
return p; return p;
} }
//======================= //=======================
//节点状态 //节点状态
if(StringUtils.isNotBlank(pagerQuery.getNodeState())){ if (StringUtils.isNotBlank(pagerQuery.getNodeState())) {
qw.like("bo.nodeState",pagerQuery.getNodeState()); qw.like("bo.nodeState", pagerQuery.getNodeState());
} }
//车型 //车型
if(StringUtils.isNotBlank(pagerQuery.getModelName())){ if (StringUtils.isNotBlank(pagerQuery.getModelName())) {
qw.like("bm.modelName",pagerQuery.getModelName()); qw.like("bm.modelName", pagerQuery.getModelName());
} }
//合同编号 //合同编号
if(StringUtils.isNotBlank(pagerQuery.getContractNo())){ if (StringUtils.isNotBlank(pagerQuery.getContractNo())) {
qw.like("bo.contractNo",pagerQuery.getContractNo()); qw.like("bo.contractNo", pagerQuery.getContractNo());
} }
//发起人 //发起人
if(StringUtils.isNotBlank(pagerQuery.getCreateByName())){ if (StringUtils.isNotBlank(pagerQuery.getCreateByName())) {
qw.like("bo.staffName",pagerQuery.getCreateByName()); qw.like("bo.staffName", pagerQuery.getCreateByName());
} }
//发起部门 //发起部门
if(StringUtils.isNotBlank(pagerQuery.getCreateByDept())){ if (StringUtils.isNotBlank(pagerQuery.getCreateByDept())) {
qw.like("bo.orgName",pagerQuery.getCreateByDept()); qw.like("bo.orgName", pagerQuery.getCreateByDept());
} }
//销售类型 //销售类型
if(StringUtils.isNotBlank(pagerQuery.getSaleTypeKey())){ if (StringUtils.isNotBlank(pagerQuery.getSaleTypeKey())) {
qw.eq("bo.payTypeKey",pagerQuery.getSaleTypeKey()); qw.eq("bo.payTypeKey", pagerQuery.getSaleTypeKey());
} }
//销售人员 //销售人员
if (StringUtils.isNotBlank(pagerQuery.getSaler())){ if (StringUtils.isNotBlank(pagerQuery.getSaler())) {
qw.like("bo.staffName",pagerQuery.getSaler()); qw.like("bo.staffName", pagerQuery.getSaler());
} }
//客户名称 //客户名称
if (StringUtils.isNotBlank(pagerQuery.getCustomerName())){ if (StringUtils.isNotBlank(pagerQuery.getCustomerName())) {
qw.like("bo.customerName",pagerQuery.getCustomerName()); qw.like("bo.customerName", pagerQuery.getCustomerName());
} }
//采购系统 //采购系统
if (StringUtils.isNotBlank(pagerQuery.getPurchaseSystemName())){ if (StringUtils.isNotBlank(pagerQuery.getPurchaseSystemName())) {
qw.like("bo.purchaseSystemName",pagerQuery.getPurchaseSystemName()); qw.like("bo.purchaseSystemName", pagerQuery.getPurchaseSystemName());
} }
//销售部门 //销售部门
if (StringUtils.isNotBlank(pagerQuery.getOrgName())){ if (StringUtils.isNotBlank(pagerQuery.getOrgName())) {
qw.like("bo.orgName",pagerQuery.getOrgName()); qw.like("bo.orgName", pagerQuery.getOrgName());
} }
//中介返利 //中介返利
if (StringUtils.isNotBlank(pagerQuery.getDistributorPriceAll())){ if (StringUtils.isNotBlank(pagerQuery.getDistributorPriceAll())) {
qw.like("bsos.distributorPriceAll",pagerQuery.getDistributorPriceAll()); qw.like("bsos.distributorPriceAll", pagerQuery.getDistributorPriceAll());
} }
//分公司名称 //分公司名称
if (StringUtils.isNotBlank(pagerQuery.getUseOrgName())){ if (StringUtils.isNotBlank(pagerQuery.getUseOrgName())) {
qw.like("bo.useOrgName",pagerQuery.getUseOrgName()); qw.like("bo.useOrgName", pagerQuery.getUseOrgName());
} }
//贴息 //贴息
if (StringUtils.isNotBlank(pagerQuery.getFactoryDiscount())){ if (StringUtils.isNotBlank(pagerQuery.getFactoryDiscount())) {
qw.like("ls.factoryDiscount",pagerQuery.getFactoryDiscount()); qw.like("ls.factoryDiscount", pagerQuery.getFactoryDiscount());
}
//根据销售订单sid分组
qw.groupBy("bo.sid");
//车架号
if (StringUtils.isNotBlank(pagerQuery.getVinNo())){
qw.having("vinNo LIKE %",pagerQuery.getVinNo(),"%");
}
//排产订单编号
if (StringUtils.isNotBlank(pagerQuery.getOrderingNo())){
qw.having("orderingNo LIKE %",pagerQuery.getOrderingNo(),"%");
} }
String typeState = "getSaleOrdersByOrgPath";//查询接口的标识 String typeState = "getSaleOrdersByOrgPath";//查询接口的标识
IPage<AppBusSalesOrderVo> pagging = baseMapper.getSaleOrders(page, qw, pq.getParams().getName(), typeState); IPage<AppBusSalesOrderVo> pagging = baseMapper.getSaleOrdersByOrgPath(page, qw, pq.getParams().getName(), typeState, pagerQuery.getVinNo(), pagerQuery.getOrderingNo());
for (AppBusSalesOrderVo record : pagging.getRecords()) { for (AppBusSalesOrderVo record : pagging.getRecords()) {
record.setShowStopBtn(false); record.setShowStopBtn(false);
record.setShowContractBtn(false); record.setShowContractBtn(false);
@ -6110,18 +6100,18 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
BusSalesOrderModel busSalesOrderModel = busSalesOrderModelService.selectByOrderSid(busSalesOrder.getSid()); BusSalesOrderModel busSalesOrderModel = busSalesOrderModelService.selectByOrderSid(busSalesOrder.getSid());
dataMap.put("vehModel", busSalesOrderModel.getModelName()); dataMap.put("vehModel", busSalesOrderModel.getModelName());
//车架号 //车架号
String vinNo = ""; String vinNo = "";
List<BusSalesOrderVehicle> busSalesOrderVehicles = busSalesOrderVehicleService.selectByOrderSid(sid); List<BusSalesOrderVehicle> busSalesOrderVehicles = busSalesOrderVehicleService.selectByOrderSid(sid);
if (!busSalesOrderVehicles.isEmpty()){ if (!busSalesOrderVehicles.isEmpty()) {
for (BusSalesOrderVehicle busSalesOrderVehicle : busSalesOrderVehicles) { for (BusSalesOrderVehicle busSalesOrderVehicle : busSalesOrderVehicles) {
vinNo = vinNo + busSalesOrderVehicle.getLinkNo() + ","; vinNo = vinNo + busSalesOrderVehicle.getLinkNo() + ",";
} }
} }
if (StringUtils.isNotBlank(vinNo)){ if (StringUtils.isNotBlank(vinNo)) {
dataMap.put("vinNo",vinNo.substring(0,vinNo.length() - 1)); dataMap.put("vinNo", vinNo.substring(0, vinNo.length() - 1));
dataMap.put("isxsVinNo","是"); dataMap.put("isxsVinNo", "是");
}else { } else {
dataMap.put("isxsVinNo","否"); dataMap.put("isxsVinNo", "否");
} }
//销售指导价 //销售指导价
BusSalesOrderPrice busSalesOrderPrice = busSalesOrderPriceService.selectBySalesOrderSid(busSalesOrder.getSid()); BusSalesOrderPrice busSalesOrderPrice = busSalesOrderPriceService.selectBySalesOrderSid(busSalesOrder.getSid());
@ -6139,10 +6129,10 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
//订金结转 //订金结转
BusSalesOrderDeposit busSalesOrderDeposit = busSalesOrderDepositService.selectByOrderSid(busSalesOrder.getSid()); BusSalesOrderDeposit busSalesOrderDeposit = busSalesOrderDepositService.selectByOrderSid(busSalesOrder.getSid());
String depositTypeKey = busSalesOrderDeposit.getDepositTypeKey(); String depositTypeKey = busSalesOrderDeposit.getDepositTypeKey();
if ("02".equals(depositTypeKey)){ if ("02".equals(depositTypeKey)) {
String djjzs = ""; String djjzs = "";
List<BusDepositFictitious> listByDepositSid = busDepositFictitiousService.getListByDepositSid(busSalesOrderDeposit.getSid()); List<BusDepositFictitious> listByDepositSid = busDepositFictitiousService.getListByDepositSid(busSalesOrderDeposit.getSid());
if (!listByDepositSid.isEmpty()){ if (!listByDepositSid.isEmpty()) {
for (BusDepositFictitious busDepositFictitious : listByDepositSid) { for (BusDepositFictitious busDepositFictitious : listByDepositSid) {
String depositBillNo = busDepositFictitious.getDepositBillNo(); String depositBillNo = busDepositFictitious.getDepositBillNo();
BusDeposit busDeposit = busDepositService.selectByBillNo(depositBillNo); BusDeposit busDeposit = busDepositService.selectByBillNo(depositBillNo);
@ -6152,7 +6142,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
} }
dataMap.put("djjz", djjzs); dataMap.put("djjz", djjzs);
dataMap.put("isxsDjjz", "是"); dataMap.put("isxsDjjz", "是");
}else { } else {
dataMap.put("isxsDjjz", "否"); dataMap.put("isxsDjjz", "否");
} }
//是否赠送客户物品 //是否赠送客户物品
@ -6654,9 +6644,9 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
} }
//查询是否存在应收未收款项 //查询是否存在应收未收款项
ResultBean<List<String>> listResultBean = finUncollectedReceivablesDetailedFeign.selectByCreateBySidOne(userSid); ResultBean<List<String>> listResultBean = finUncollectedReceivablesDetailedFeign.selectByCreateBySidOne(userSid);
if(!listResultBean.getData().isEmpty()){ if (!listResultBean.getData().isEmpty()) {
listResultBean.getData().removeAll(Collections.singleton(null)); listResultBean.getData().removeAll(Collections.singleton(null));
qw.notIn("bv.sid",listResultBean.getData()); qw.notIn("bv.sid", listResultBean.getData());
} }
List<String> stringList = baseMapper.selectBusinessSid(userSid, useOrgSid, qw); List<String> stringList = baseMapper.selectBusinessSid(userSid, useOrgSid, qw);
stringList.removeAll(Collections.singleton(null)); stringList.removeAll(Collections.singleton(null));
@ -6690,15 +6680,15 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。 //流程中的参数赋值、若有网关,则赋值网关中判断的字段。
Map<String, Object> variables = getOrderMap(busSalesOrder); Map<String, Object> variables = getOrderMap(busSalesOrder);
String modelId = busSalesOrder.getProcDefId(); String modelId = busSalesOrder.getProcDefId();
if(StringUtils.isBlank(modelId)){ if (StringUtils.isBlank(modelId)) {
modelId = ProcDefEnum.SALESORDER.getProDefId(); modelId = ProcDefEnum.SALESORDER.getProDefId();
} }
FlowableQuery flowableQuery = new FlowableQuery(); FlowableQuery flowableQuery = new FlowableQuery();
flowableQuery.setModelId(modelId); flowableQuery.setModelId(modelId);
flowableQuery.setMap(variables); flowableQuery.setMap(variables);
flowableQuery.setTaskDefKey(busSalesOrder.getNodeId()); flowableQuery.setTaskDefKey(busSalesOrder.getNodeId());
ResultBean<List<Map<String,Object>>> yuyanTest = flowTaskFeign.yuyanTest(flowableQuery); ResultBean<List<Map<String, Object>>> yuyanTest = flowTaskFeign.yuyanTest(flowableQuery);
List<Map<String,Object>> S = yuyanTest.getData(); List<Map<String, Object>> S = yuyanTest.getData();
return rb.success().setData(yuyanTest.getData()); return rb.success().setData(yuyanTest.getData());
} }

5
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderreturnvehapply/BusSalesOrderReturnVehApplyService.java

@ -200,10 +200,13 @@ public class BusSalesOrderReturnVehApplyService extends MybatisBaseService<BusSa
BeanUtil.copyProperties(dto, entity, "id", "sid"); BeanUtil.copyProperties(dto, entity, "id", "sid");
entity.setNodeState("待提交"); entity.setNodeState("待提交");
String applyNo = ""; String applyNo = "";
String orgPath = dto.getOrgPath();
String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(orgPath).getData();
if (StringUtils.isNotBlank(dto.getUseOrgSid())) { if (StringUtils.isNotBlank(dto.getUseOrgSid())) {
applyNo = getXSDDTCSQApplyCode(dto.getUseOrgSid()); applyNo = getXSDDTCSQApplyCode(dto.getUseOrgSid());
} else { } else {
SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.getUseOrgByUserSid(dto.getCreateBySid()).getData(); //SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.getUseOrgByUserSid(dto.getCreateBySid()).getData();
SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(useOrgSid).getData();
applyNo = getXSDDTCSQApplyCode(sysOrganizationVo.getSid()); applyNo = getXSDDTCSQApplyCode(sysOrganizationVo.getSid());
entity.setUseOrgSid(sysOrganizationVo.getSid()); entity.setUseOrgSid(sysOrganizationVo.getSid());
entity.setUseOrgName(sysOrganizationVo.getName()); entity.setUseOrgName(sysOrganizationVo.getName());

17
anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangcaigou/cheliangcaigou.vue

@ -178,11 +178,18 @@ export default {
this.$refs['divadd'].showEdit(row) this.$refs['divadd'].showEdit(row)
}, },
handleCancellation(row) { handleCancellation(row) {
req.cancal({ sid: row.sid }).then((res) => { const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
if (res.success) { this.$confirm(tip, '提示', {
this.$message({ showClose: true, type: 'success', message: '操作成功' }) confirmButtonText: '确定',
this.loadList() cancelButtonText: '取消',
} type: 'warning'
}).then(() => {
req.cancal({ sid: row.sid }).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '操作成功' })
this.loadList()
}
})
}) })
}, },
handleLooK(row) { handleLooK(row) {

105
anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangxiaoshou/cheliangxiaoshoutaizhang.vue

@ -80,6 +80,11 @@
<span>{{ scope.row.purchaseSystemName }}</span> <span>{{ scope.row.purchaseSystemName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购类型" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.manPurOrderTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="排产订单编号" align="center" width="130"> <el-table-column label="排产订单编号" align="center" width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.orderingNo }}</span> <span>{{ scope.row.orderingNo }}</span>
@ -90,129 +95,129 @@
<span>{{ scope.row.nodeState }}</span> <span>{{ scope.row.nodeState }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="贴息" align="center" width="90"> <el-table-column label="车型(配置简述)" align="center" width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.factoryDiscount }}</span> <span class="bluezi" @click="handleLook(scope.row)">{{ scope.row.modelName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="中介返利" align="center" width="100"> <el-table-column label="车架号" align="center" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.distributorPriceAll }}</span> <span>{{ scope.row.vinNo }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="开票类型" align="center" width="120"> <el-table-column label="销售部门" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.kpType }}</span> <span>{{ scope.row.orgName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="物料名称" align="center" width="100"> <el-table-column label="销售专员" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.materialName }}</span> <span>{{ scope.row.staffName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="物料编码" align="center" width="100"> <el-table-column label="客户名称" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.materialCode }}</span> <span>{{ scope.row.customerName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="车架号" align="center" width="90"> <el-table-column label="实际购车人" align="center" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span> <span>{{ scope.row.realityBuyCarName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="车型(配置简述)" align="center" width="130"> <el-table-column label="手机号码" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="bluezi" @click="handleLook(scope.row)">{{ scope.row.modelName }}</span> <span>{{ scope.row.mobile }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="内部编码" align="center" width="120"> <el-table-column label="成交价(元)" align="center" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.insideCode }}</span> <span>{{ scope.row.price }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="销售类型" align="center" width="100"> <el-table-column label="贴息" align="center" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.type }}</span> <span>{{ scope.row.factoryDiscount }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购类型" align="center" width="120"> <el-table-column label="销售折让" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.manPurOrderTypeValue }}</span> <span>{{ scope.row.salesAllowance }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="销售日期" align="center" width="100"> <el-table-column label="赠品价值(元)" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.saleDate }}</span> <span>{{ scope.row.giftsDescription }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="成交价(元)" align="center" width="110"> <el-table-column label="中介人1" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.price }}</span> <span>{{ scope.row.middleOne }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="销售部门" align="center" width="100"> <el-table-column label="返利金额1" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.orgName }}</span> <span>{{ scope.row.rebateMoneyOne }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="销售专员" align="center" width="100"> <el-table-column label="中介人2" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.staffName }}</span> <span>{{ scope.row.middleTwo }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="合同编号" align="center" width="100"> <el-table-column label="返利金额2" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.concatNo }}</span> <span>{{ scope.row.rebateMoneyTwo }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实际购车人" align="center" width="140"> <el-table-column label="开票类型" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.realityBuyCarName }}</span> <span>{{ scope.row.kpType }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="客户名称" align="center" width="100"> <el-table-column label="出库类型" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.customerName }}</span> <span>{{ scope.row.ckType }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="手机号码" align="center" width="120"> <el-table-column label="欠款时长(天)" align="center" width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.mobile }}</span> <span>{{ scope.row.qkDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="赠品价值(元)" align="center" width="120"> <el-table-column label="销售类型" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.giftsDescription }}</span> <span>{{ scope.row.type }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="销售折让" align="center" width="120"> <el-table-column label="销售日期" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.salesAllowance }}</span> <span>{{ scope.row.saleDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="中介人1" align="center" width="120"> <el-table-column label="内部引荐人" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.middleOne }}</span> <span>{{ scope.row.innerName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="返利金额1" align="center" width="120"> <el-table-column label="合同编号" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.rebateMoneyOne }}</span> <span>{{ scope.row.concatNo }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="中介人2" align="center" width="120"> <el-table-column label="物料名称" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.middleTwo }}</span> <span>{{ scope.row.materialName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="返利金额2" align="center" width="120"> <el-table-column label="物料编码" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.rebateMoneyTwo }}</span> <span>{{ scope.row.materialCode }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="内部引荐人" align="center" width="120"> <el-table-column label="内部编码" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.innerName }}</span> <span>{{ scope.row.insideCode }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

17
anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangguanli.vue

@ -229,11 +229,18 @@ export default {
this.$refs['divinfo'].showInfo(sid, row) this.$refs['divinfo'].showInfo(sid, row)
}, },
toTermination(row) { toTermination(row) {
req.cancal({ sid: row.sid }).then((res) => { const tip = '请确认是否终止该记录?'
if (res.success) { this.$confirm(tip, '提示', {
this.$message({ showClose: true, type: 'success', message: '操作成功' }) confirmButtonText: '确定',
this.loadList() cancelButtonText: '取消',
} type: 'warning'
}).then(() => {
req.cancal({ sid: row.sid }).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '操作成功' })
this.loadList()
}
})
}) })
}, },
hangleLook(row) { hangleLook(row) {

17
anrui-scm/anrui-scm-ui/src/views/supplychain/changjiaxitong/manufacturers.vue

@ -307,11 +307,18 @@ export default {
}) })
}, },
handCancellation(row) { handCancellation(row) {
req.cancel({ sid: row.sid }).then((res) => { const tip = '请确认是否作废该记录?'
if (res.success) { this.$confirm(tip, '提示', {
this.$message({ showClose: true, type: 'success', message: '操作成功' }) confirmButtonText: '确定',
this.getList() cancelButtonText: '取消',
} type: 'warning'
}).then(() => {
req.cancel({ sid: row.sid }).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '操作成功' })
this.getList()
}
})
}) })
}, },
handleGetCheck(row) { handleGetCheck(row) {

10
anrui-system-ui/src/views/RoleAdminister/RoleAdminister.vue

@ -255,9 +255,11 @@
<tr> <tr>
<td>可操作功能列表</td> <td>可操作功能列表</td>
<td> <td>
<el-tree v-loading="loading" :data="treedata" ref="funTree" show-checkbox accordion node-key="sid" <div style="height:230px;line-height:120px;overflow:auto;overflow-x:hidden;">
:default-checked-keys="checkedId" :props="defaultProps" @check-change="checkchange"> <el-tree v-loading="loading" :data="treedata" ref="funTree" show-checkbox accordion node-key="sid"
</el-tree> :default-checked-keys="checkedId" :props="defaultProps" @check-change="checkchange">
</el-tree>
</div>
</td> </td>
</tr> </tr>
</table> </table>
@ -289,7 +291,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-table :key="tableKey" :data="formobj.tableData" :index="index" border style="width: 100%"> <el-table :key="tableKey" :data="formobj.tableData" :index="index" border style="width: 100%" max-height="300">
<el-table-column type="index" label="序号" :index="index + 1" width="80" align="center"> <el-table-column type="index" label="序号" :index="index + 1" width="80" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="name" label="菜单名称" header-align="center" align="left"> <el-table-column prop="name" label="菜单名称" header-align="center" align="left">

Loading…
Cancel
Save