Browse Source

移动端销售订单详情完善销售机构字段、保险信息等

zhanglei
dimengzhe 3 years ago
parent
commit
21cc6b9dc6
  1. 7
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorder/app/order/AppOrderDetailsVo.java
  2. 3
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderMapper.xml
  3. 25
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java

7
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorder/app/order/AppOrderDetailsVo.java

@ -42,6 +42,10 @@ public class AppOrderDetailsVo implements Vo {
private String departmentName;
@ApiModelProperty(value = "销售专员")
private String sellerName;
/**
* 在公司入保中国平安保险公司单台车保费预估金额xx万元入保期数x期
* 不在公司入保未在公司入保+备注中的内容
*/
@ApiModelProperty(value = "保险信息")
private String insuranceInfo;
@ApiModelProperty(value = "总优惠")
@ -58,4 +62,7 @@ public class AppOrderDetailsVo implements Vo {
private List<AppOrderDiscountListVo> discountList = new ArrayList<>();
@ApiModelProperty(value = "订金信息")
private AppOrderDepositInfoVo depositInfo;
@ApiModelProperty(value = "销售部门sid")
private String orgSid;
}

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

@ -167,7 +167,8 @@
case bo.type
when 1 then '现车'
when 2 then '采购订单'
when 3 then '排产' end as orderType
when 3 then '排产' end as orderType,
bo.orgSid
from bus_sales_order bo
where sid = #{sid}
</select>

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

@ -93,6 +93,8 @@ import com.yxt.anrui.flowable.api.utils.ProcessStateEnum;
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables;
import com.yxt.anrui.portal.api.dictcommon.DictCommonFeign;
import com.yxt.anrui.portal.api.dictcommon.DictCommonVo;
import com.yxt.anrui.portal.api.sysorganization.SysOrganization;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.app.AppUserOrgInfoVo;
@ -181,6 +183,9 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
@Autowired
private BusVehicleApplyDetailFeign busVehicleApplyDetailFeign;
@Autowired
private SysOrganizationFeign sysOrganizationFeign;
/**
* 构造查询条件
*
@ -2020,6 +2025,26 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
}
AppOrderDetailsVo vo = new AppOrderDetailsVo();
vo = baseMapper.getSaleOrderDetails(sid);
//根据销售部门sid查询分公司名称
ResultBean<String> resultBean = sysStaffOrgFeign.getOrgSidBySid(vo.getOrgSid());
if (!"0".equals(resultBean.getData())) {
//根据分公司sid查询分公司名称
ResultBean<SysOrganization> organizationResultBean = sysOrganizationFeign.selectBySid(resultBean.getData());
if (organizationResultBean.getSuccess()) {
vo.setSalesOrg(organizationResultBean.getData().getName());
}
}
BusSalesOrderInsuranceDetailsVo busSalesOrderInsurance = busSalesOrderInsuranceService.details(sid);
if (busSalesOrderInsurance != null) {
if ("0".equals(busSalesOrder.getIsInsurance())) {
vo.setInsuranceInfo("未在公司入保," + busSalesOrderInsurance.getRemarks());
} else if ("1".equals(busSalesOrder.getIsInsurance())) {
String x = ",";
String x1 = "单台车保费预估金额";
String x2 = "入保期数";
vo.setInsuranceInfo(busSalesOrderInsurance.getInsuranceName() + x + x1 + busSalesOrderInsurance.getInsuranceCarMoney() + "万元" + x + x2 + busSalesOrderInsurance.getInsuranceNum() + "期");
}
}
/***************************车型信息***************************************/
AppOrderModelInfoVo modelInfo = busSalesOrderModelService.selectModel(sid);
//若订单类型为0则为现车,为1采购订单,为2排产

Loading…
Cancel
Save