Browse Source

Merge remote-tracking branch 'origin/master'

master
God 2 years ago
parent
commit
a032184bdd
  1. 2
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basebrandletpricepowimit/BaseBrandMitQuery.java
  2. 7
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basemodelmodprice/flow/GetNodeQuery.java
  3. 1
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basebrandletpricepowimit/BaseBrandletpricepowimitMapper.java
  4. 10
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basebrandletpricepowimit/BaseBrandletpricepowimitMapper.xml
  5. 13
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basebrandletpricepowimit/BaseBrandletpricepowimitService.java
  6. 31
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basemodelmodprice/BaseModelModpriceService.java
  7. 12
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicleapply/BusArrearsCarryVehicleApplyService.java
  8. 128
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdepositvehicle/BusDepositVehicleService.java
  9. 10
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java
  10. 9
      anrui-buscenter/anrui-buscenter-ui/src/api/dictcommons/dictcommons.js
  11. 21
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshourangjia/xiaoshourangjiaAdd.vue
  12. 6
      anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java
  13. 4
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclegression/flowable/GetNodeQuery.java
  14. 7
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionService.java
  15. 14
      anrui-scm/anrui-scm-ui/src/views/cheliang/hegezhengtaizhang/hegezhengtaizhang.vue
  16. 179
      anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangeng.vue
  17. 4
      anrui-scm/anrui-scm-ui/src/views/workFlow/tiaojiaguanliFlow/tiaojiaguanli/tiaojiaDaiBanInfo.vue
  18. 48
      anrui-scm/anrui-scm-ui/src/views/workFlow/weishoumaiduanFlow/weishoumaiduanguanli/weushoumaiduanEdit.vue
  19. 50
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/app/AppService.java

2
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basebrandletpricepowimit/BaseBrandMitQuery.java

@ -18,4 +18,6 @@ public class BaseBrandMitQuery implements Query {
private String roleSid;
@ApiModelProperty("使用组织sid")
private String orgSid;
@ApiModelProperty("部门sid")
private String deptSid;
}

7
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basemodelmodprice/flow/GetNodeQuery.java

@ -5,7 +5,6 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.Map;
/**
* @Author dimengzhe
@ -19,7 +18,7 @@ public class GetNodeQuery implements Query {
@ApiModelProperty(value = "环节定义id")
@NotBlank(message = "参数错误:taskDefKey")
private String taskDefKey;
/*
@ApiModelProperty(value = "不确定是否需要前端传:还是有分支网关的时候传??")
private Map<String, Object> formVariables;*/
@ApiModelProperty("业务sid")
private String businessSid;
}

1
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basebrandletpricepowimit/BaseBrandletpricepowimitMapper.java

@ -66,4 +66,5 @@ public interface BaseBrandletpricepowimitMapper extends BaseMapper<BaseBrandletp
BaseBrandletpricepowimitVo fetchByBrandSidAndUseOrgSid(@Param("brandSid") String brandSid,@Param("useOrgSid") String useOrgSid);
String getMoney(@Param("brandSid") String brandSid, @Param("orgSid") String orgSid, @Param("roleSid") String roleSid);
String getMoneyOne(@Param("brandSid") String brandSid, @Param("orgSid") String orgSid, @Param("roleSid") String roleSid,@Param("deptSid")String deptSid);
}

10
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basebrandletpricepowimit/BaseBrandletpricepowimitMapper.xml

@ -36,4 +36,14 @@
and bb.useOrgSid = #{orgSid}
and br.roleSid = #{roleSid}
</select>
<select id="getMoneyOne" resultType="java.lang.String">
select br.letPrice
from base_brandletpricepowimit bb
left join base_roleletpricepowimit br on bb.sid = br.mainSid
where bb.brandSid = #{brandSid}
and bb.useOrgSid = #{orgSid}
and br.roleSid = #{roleSid}
and br.deptSid = #{deptSid}
</select>
</mapper>

13
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basebrandletpricepowimit/BaseBrandletpricepowimitService.java

@ -196,10 +196,15 @@ public class BaseBrandletpricepowimitService extends MybatisBaseService<BaseBran
String brandSid = query.getBrandSid();
String orgSid = query.getOrgSid();
String roleSid = query.getRoleSid();
String money = baseMapper.getMoney(brandSid, orgSid, roleSid);
if (StringUtils.isBlank(money)) {
return rb;
String deptSid = query.getDeptSid();
String moneyOne = baseMapper.getMoneyOne(brandSid, orgSid, roleSid,deptSid);
if (StringUtils.isBlank(moneyOne)) {
String money = baseMapper.getMoney(brandSid, orgSid, roleSid);
if(StringUtils.isBlank(money)){
return rb;
}
return rb.success().setData(money);
}
return rb.success().setData(money);
return rb.success().setData(moneyOne);
}
}

31
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basemodelmodprice/BaseModelModpriceService.java

@ -26,13 +26,10 @@
package com.yxt.anrui.base.biz.basemodelmodprice;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.text.StrBuilder;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jhlabs.image.OilFilter;
import com.yxt.anrui.base.api.basemodelconfig.BaseModelConfig;
import com.yxt.anrui.base.api.basemodelmodprice.*;
import com.yxt.anrui.base.api.basemodelmodprice.flow.BaseModelModPriceTaskQuery;
import com.yxt.anrui.base.api.basemodelmodprice.flow.GetNodeQuery;
@ -43,7 +40,6 @@ import com.yxt.anrui.base.api.basemodelmodpricemodel.BaseModelModpriceModelDto;
import com.yxt.anrui.base.api.basemodelmodpricemodel.BaseModelModpriceModelVo;
import com.yxt.anrui.base.api.basevehiclemodel.BaseVehicleModel;
import com.yxt.anrui.base.api.basevehmodelconfig.BaseVehmodelConfig;
import com.yxt.anrui.base.api.basevehmodelconfig.BaseVehmodelVo;
import com.yxt.anrui.base.biz.basemodelconfig.BaseModelConfigService;
import com.yxt.anrui.base.biz.basemodelmodpricemodel.BaseModelModpriceModelService;
import com.yxt.anrui.base.biz.basevehiclemodel.BaseVehicleModelService;
@ -71,25 +67,23 @@ import com.yxt.common.core.vo.PagerVo;
import com.yxt.messagecenter.api.message.MessageFeign;
import com.yxt.messagecenter.api.message.MessageFlowVo;
import com.yxt.messagecenter.api.message.MessageFlowableQuery;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.disk.DiskFileItem;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.nio.file.Files;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
@ -366,6 +360,7 @@ public class BaseModelModpriceService extends MybatisBaseService<BaseModelModpri
public ResultBean complete(BusinessVariables bv) {
ResultBean rb = ResultBean.fireFail();
BaseModelModprice baseModelModprice = fetchBySid(bv.getBusinessSid());
bv.setModelId(baseModelModprice.getProcDefId());
List<BaseModelModpriceModelVo> baseModelModpriceModelVos = baseModelModpriceModelService.fetchByMainSid(bv.getBusinessSid());
if (bv.getTaskId().equals(baseModelModprice.getTaskId())) {
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
@ -423,25 +418,23 @@ public class BaseModelModpriceService extends MybatisBaseService<BaseModelModpri
public ResultBean<List<GetNodeVo>> getNextNodesForSubmit(GetNodeQuery query) {
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail();
BaseModelModprice baseModelModprice = fetchBySid(query.getBusinessSid());
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(query, bv);
bv.setModelId(ProcDefEnum.BASEMODELMODPRICE.getProDefId());
bv.setModelId(baseModelModprice.getProcDefId());
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv);
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());
// List<GetNodeVo> voList = resultBean.getData().stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());
return rb.success().setData(voList);
}
public ResultBean<List<GetNodeVo>> getPreviousNodesForReject(GetNodeQuery query) {
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail();
BusinessVariables bv = new BusinessVariables();
BaseModelModprice baseModelModprice = fetchBySid(query.getBusinessSid());
BeanUtil.copyProperties(query, bv);
bv.setModelId(ProcDefEnum.BASEMODELMODPRICE.getProDefId());
bv.setModelId(baseModelModprice.getProcDefId());
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv);
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());
// List<GetNodeVo> voList = resultBean.getData().stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());
return rb.success().setData(voList);
}

12
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicleapply/BusArrearsCarryVehicleApplyService.java

@ -412,7 +412,7 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr
* @param dto
* @return
*/
public ResultBean submitArrearsCarryVehicle(BusArrearsCarryVehicleApplyDto dto) {
/*public ResultBean submitArrearsCarryVehicle(BusArrearsCarryVehicleApplyDto dto) {
String orgSid = checkUserOrg(dto.getUserSid());
String businessSid = "";
if (StringUtils.isBlank(orgSid)) {
@ -445,7 +445,7 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr
}
return resultBean;
}
*/
/**
* 保存流程业务关联表 数据
*
@ -1380,7 +1380,12 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr
}
//尚欠车款大写
if (StringUtils.isNotBlank(subscribtAllResultBean.getData())) {
map.put("DyMoney", TransformMoney.transform(TransformMoney.getDecimalStr(Double.valueOf(sqMoney.toString()).doubleValue())));
if(sqMoney.compareTo(BigDecimal.ZERO) <= 0){
map.put("DyMoney", TransformMoney.transform(TransformMoney.getDecimalStr(Double.valueOf(String.valueOf(BigDecimal.ZERO)).doubleValue())));
}else{
map.put("DyMoney", TransformMoney.transform(TransformMoney.getDecimalStr(Double.valueOf(sqMoney.toString()).doubleValue())));
}
} else {
map.put("DyMoney", TransformMoney.transform(TransformMoney.getDecimalStr(Double.valueOf(String.valueOf(BigDecimal.ZERO)).doubleValue())));
}
@ -1961,6 +1966,7 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr
public ResultBean InitiatorToAnswerInfo(BusinessVariables bv) {
ResultBean rb = ResultBean.fireFail();
BusArrearsCarryVehicleApply busArrearsCarryVehicleApply = fetchBySid(bv.getBusinessSid());
bv.setModelId(busArrearsCarryVehicleApply.getProcDefId());
Map<String, Object> variables = new HashMap<>();
Map<String, Object> appMap = new HashMap<>();
appMap.put("sid", bv.getBusinessSid());

128
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdepositvehicle/BusDepositVehicleService.java

@ -300,7 +300,6 @@ public class BusDepositVehicleService extends MybatisBaseService<BusDepositVehic
if (StringUtils.isNotBlank(busMainDeposit.getNodeState())) {
String createBySid = busMainDeposit.getCreateBySid();
List<String> list = baseMapper.selByUserSid(createBySid);
// Integer count = strings.stream().mapToInt(Integer::valueOf).sum();
vo.setExplain("目前该销售人员已预订" + list.size() + "台车辆");
}
return new ResultBean<AppBusDepositVehicleDetailVo>().success().setData(vo);
@ -319,131 +318,4 @@ public class BusDepositVehicleService extends MybatisBaseService<BusDepositVehic
public List<String> selectVehicleBySid(String customerSid, String modelSid, String configSid, String orgSid) {
return baseMapper.selectVehicleBySid(customerSid,modelSid,configSid,orgSid);
}
/* public ResultBean submitVirtualOrderVehicle(SubmitVirtualOrderVehicleDto dto) {
ResultBean rb = ResultBean.fireFail();
//根据用户sid获取staffSid
ResultBean<SysUserVo> userVoResultBean = sysUserFeign.fetchBySid(dto.getUserSid());
if (!userVoResultBean.getSuccess()) {
return rb.setMsg(userVoResultBean.getMsg());
}
//根据staffSid获取用户的组织全路径
ResultBean<SysStaffOrg> staffOrgResultBean = sysStaffOrgFeign.getOrgByStaffSid(userVoResultBean.getData().getStaffSid());
if (!staffOrgResultBean.getSuccess()) {
return rb.setMsg(staffOrgResultBean.getMsg());
}
//用户的组织全路径
String orgSidPath = staffOrgResultBean.getData().getOrgSidPath();
BusDepositVehicle busDepositVehicle = fetchBySid(dto.getSid());
int r = submitBusinessData(dto, busDepositVehicle);
if (r == 3) {
return rb.setMsg("该申请不存在");
}
if (r == 0) {
return rb.setMsg("操作失败!提交的数据不一致");
}
BusMainDeposit busMainDeposit = busMainDepositService.fetchBySid(dto.getVirtualOrderSid());
if (busMainDeposit != null) {
if (com.yxt.common.base.utils.StringUtils.isNotBlank(busMainDeposit.getNodeState())) {
if (!(busMainDeposit.getNodeState().contains("已办结") || busMainDeposit.getNodeState().contains("已终止") || busMainDeposit.getNodeState().contains("申请"))) {
return rb.setMsg("该申请已存在,请务重复提交!");
}
}
}
//新增修改保存
ResultBean<String> resultBean = busMainDepositService.reserveCarInfo(dto);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
String businessSid = resultBean.getData();
//创建BusinessVariables实体对象
BusinessVariables bv = new BusinessVariables();
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
Map<String, Object> variables = new HashMap<>();
//用户的部门全路径sid
bv.setOrgSidPath(orgSidPath);
//业务sid
bv.setBusinessSid(businessSid);
//用户sid
bv.setUserSid(dto.getUserSid());
bv.setFormVariables(variables);
//若app移动端有此功能,则传递appMap参数
Map<String, Object> appMap = new HashMap<>();
//需和移动端沟通业务sid保存的属性具体值:appMap中sid不是固定的。移动端提供具体字段。
appMap.put("sid", businessSid);
variables.put("app", appMap);
//流程定义id
bv.setModelId(ProcDefEnum.SCMCARTRANSFER.getProDefId());
if (r == 1) {
ResultBean<UpdateFlowFieldVo> voResultBean = flowableFeign.startProcess(bv);
UpdateFlowFieldVo ufVo = voResultBean.getData();
updateFlowFiled(BeanUtil.beanToMap(ufVo));
return voResultBean;
}
if (r == 2) {
// ToDo:驳回到发起人后再次提交
if (StringUtils.isBlank(dto.getInstanceId())) {
return rb.setMsg("参数错误:instanceId");
}
bv.setTaskId(busDepositVehicle.getTaskId());
bv.setTaskDefKey(busDepositVehicle.getNodeId());
bv.setComment(StringUtils.isNotBlank(dto.getComment()) ? dto.getComment() : "重新提交");
bv.setInstanceId(dto.getInstanceId());
return complete(bv);
}
return rb;
}*/
/**
* 判断提交的流程是否被允许
*
* @param dto
* @return
*/
/* private synchronized int submitBusinessData(SubmitVirtualOrderVehicleDto dto, BusDepositVehicle busDepositVehicle) {
int r = 0;
if (StringUtils.isBlank(dto.getSid())) {
r = 1;
} else {
if (busDepositVehicle != null) {
String businessTaskId = busDepositVehicle.getTaskId();
if (StringUtils.isBlank(businessTaskId) && StringUtils.isBlank(dto.getTaskId())) {
//新提交
r = 1;
} else if (StringUtils.isNotBlank(businessTaskId) && businessTaskId.equals(dto.getTaskId())) {
//二次提交//只有数据一致的时候才能进行下一步
r = 2;
}
} else {
r = 3;
}
}
return r;
}*/
/**
* 更新流程相关的状态
*
* @param map
* @return
*/
/* private int updateFlowFiled(Map<String, Object> map) {
return baseMapper.updateFlowFiled(map);
}
public ResultBean complete(BusinessVariables bv) {
ResultBean rb = ResultBean.fireFail();
BusDepositVehicle busDepositVehicle = fetchBySid(bv.getBusinessSid());
if (bv.getTaskId().equals(busDepositVehicle.getTaskId())) {
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.handleProsess(bv);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData()));
return rb.success().setData(resultBean.getData());
} else {
return rb.setMsg("操作失败!提交的数据不一致");
}
}*/
}

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

@ -1294,6 +1294,9 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
baseBrandMitQuery.setRoleSid(roleSid);
baseBrandMitQuery.setOrgSid(busSalesOrder.getUseOrgSid());
baseBrandMitQuery.setBrandSid(busSalesOrderModel.getBrandSid());
List<String> deptSidList = Arrays.asList(busSalesOrder.getOrgSidPath().split("/"));
String deptSid = deptSidList.get(deptSidList.size()-1);
baseBrandMitQuery.setDeptSid(deptSid);
ResultBean<String> resultBean1 = baseBrandletpricepowimitFeign.getMoney(baseBrandMitQuery);
if (resultBean1.getSuccess()) {
String price = resultBean1.getData();
@ -1303,10 +1306,10 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
bigDecimalTwo = bigDecimal2;
bigDecimalOne = bigDecimalOne.add(initBigDecimal);
if (bigDecimalTwo.compareTo(bigDecimalOne) < 0) {
//bigDecimalTwo<bigDecimalOne
//bigDecimalTwo<bigDecimalOne:超权限
isHavePower = true;
} else if (bigDecimalTwo.compareTo(bigDecimalOne) > 0) {
//bigDecimalTwo>bigDecimalOne
//bigDecimalTwo>bigDecimalOne:不超权限
isHavePower = false;
} else {
isHavePower = false;
@ -1321,6 +1324,9 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
baseBrandMitQuery.setRoleSid(roleSid);
baseBrandMitQuery.setOrgSid(busSalesOrder.getUseOrgSid());
baseBrandMitQuery.setBrandSid(busSalesOrderModel.getBrandSid());
deptSidList = Arrays.asList(busSalesOrder.getOrgSidPath().split("/"));
deptSid = deptSidList.get(deptSidList.size()-1);
baseBrandMitQuery.setDeptSid(deptSid);
ResultBean<String> resultBean2 = baseBrandletpricepowimitFeign.getMoney(baseBrandMitQuery);
if (resultBean2.getSuccess()) {
String price = resultBean2.getData();

9
anrui-buscenter/anrui-buscenter-ui/src/api/dictcommons/dictcommons.js

@ -144,3 +144,12 @@ export function selectWarehouseByUserSid(data) {
params: data
})
}
// 根据当前登录用户sid获取本分公司下的销售部门和销售专员
export function selectOrgList(data) {
return request({
url: '/portal/v1/sysorganization/selectOrgList',
method: 'get',
params: data
})
}

21
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshourangjia/xiaoshourangjiaAdd.vue

@ -45,6 +45,13 @@
</el-button>
</template>
</el-table-column>
<el-table-column label="部门" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.deptName" filterable placeholder="请选择" @change="orgChange($event, scope.row)">
<el-option v-for="item in orgList" :key="item.orgDeptSid" :label="item.orgDeptName" :value="item.orgDeptName"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="角色名称" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.roleName" filterable placeholder="请选择" @change="roleChange($event, scope.row)">
@ -66,7 +73,7 @@
<script>
import { fetchSid, save } from '@/api/jichuxinxi/xiaoshourangjia'
import { roleList } from '@/api/dictcommons/dictcommons'
import { roleList, selectOrgList } from '@/api/dictcommons/dictcommons'
export default {
name: 'xiaoshourangjiaAdd',
@ -76,6 +83,7 @@ export default {
index: 0,
tableKey: 0,
role_list: [],
orgList: [],
//
formobj: {
sid: '', // sid
@ -97,6 +105,11 @@ export default {
this.role_list = res.data
}
})
selectOrgList({ userSid: window.sessionStorage.getItem('userSid'), orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => {
if (res.success) {
this.orgList = res.data
}
})
},
//
oninput(e) {
@ -127,6 +140,8 @@ export default {
roleSid: '',
roleName: '',
letPrice: '',
deptName: '',
deptSid: '',
mainSid: ''
})
},
@ -134,6 +149,10 @@ export default {
dataDelete(index) {
this.formobj.baseRoleletpricepowimits.splice(index, 1)
},
orgChange(value, row) {
const choose = this.orgList.filter((item) => item.orgDeptName === value)
row.deptSid = choose[0].orgDeptSid
},
roleChange(value, row) {
const choose = this.role_list.filter((item) => item.name === value)
row.roleSid = choose[0].sid

6
anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java

@ -20,9 +20,9 @@ public enum ProcDefEnum {
//QKLPFINBILLAPPLICATION("欠款领票申请流程", "process_x9r8epty:2:1365004"),
QKLPFINBILLAPPLICATION("欠款领票申请流程", "process_x9r8epty:4:1592512"),
BUSCENTERADVANCEGINVOICEAPPLY("提前开票申请流程", "advance_ginvoiceapply:1:242664"),
ARREARSCARRYVEHICLE("欠款提车审批流程", "process_f2dkbvny:3:1595008"),
ARREARSCARRYVEHICLE("欠款提车审批流程", "process_f2dkbvny:4:1865016"),
VEHICLEAPPLY("排产申请流程", "process_9egcg169:13:1250004"),
SCMCARTRANSFER("库存地点变更申请", "process_3bc4p2em:8:725008"),
SCMCARTRANSFER("库存地点变更申请", "process_3bc4p2em:9:1865007"),
BASEVEHICLEACTUALSALES("未售买断", "process_6qx07b75:8:725012"),
FINCOSTAPPLY("费用申请", "process_u0pahv0s:6:725016"),
FINPAYAPPLY("付款申请", "process_gin2tntb:4:725020"),
@ -32,7 +32,7 @@ public enum ProcDefEnum {
SEALAPPLY("盖章申请", "process_7h0z66tp:1:240064"),
SALESORDER("销售订单审批流程", "process_p5ils2rn:10:1250008"),
BASEOUTSOURCINGAPPLICATION("外采申请", "process_5tqysnjc:5:722504"),
BASEMODELMODPRICE("车型调价申请", "process_kydcif7k:7:722512"),
BASEMODELMODPRICE("车型调价申请", "process_kydcif7k:8:1865012"),
BASEINTERNALPURCHASE("调车申请", "process_i6luw5xq:3:722516"),
BASEACCADJAPPLY("调账申请", "process_r6pyzqoz:4:1362508"),
BUSDELIVEREDAPPLY("出库申请", "process_wgt1n66l:10:1700004"),

4
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclegression/flowable/GetNodeQuery.java

@ -5,7 +5,6 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.Map;
@Data
public class GetNodeQuery implements Query {
@ -15,7 +14,6 @@ public class GetNodeQuery implements Query {
@NotBlank(message = "参数错误:taskDefKey")
private String taskDefKey;
// @ApiModelProperty(value = "分支字段及业务字段")
// private Map<String, Object> formVariables;
private String businessSid;
}

7
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionService.java

@ -1068,6 +1068,7 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
variables.put("app", appMap);
bv.setFormVariables(variables);
bv.setOrgSidPath(scmVehicleGression.getOrgSidPath());
bv.setModelId(scmVehicleGression.getProcDefId());
//===============================添加多线程开始======================
if (bv.getTaskId().equals(scmVehicleGression.getTaskId())) {
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.handleProsess(bv);
@ -1209,9 +1210,10 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
*/
public ResultBean<List<GetNodeVo>> getPreviousNodesForReject(GetNodeQuery query) {
ResultBean<List<GetNodeVo>> rb = new ResultBean<>();
ScmVehicleGression scmVehicleGression = fetchBySid(query.getBusinessSid());
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(query, bv);
bv.setModelId(ProcDefEnum.SCMCARTRANSFER.getProDefId());
bv.setModelId(scmVehicleGression.getProcDefId());
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv);
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());
@ -1226,9 +1228,10 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
*/
public ResultBean<List<GetNodeVo>> getNextNodesForSubmit(GetNodeQuery query) {
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail();
ScmVehicleGression scmVehicleGression = fetchBySid(query.getBusinessSid());
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(query, bv);
bv.setModelId(ProcDefEnum.SCMCARTRANSFER.getProDefId());
bv.setModelId(scmVehicleGression.getProcDefId());
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv);
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());
return rb.success().setData(voList);

14
anrui-scm/anrui-scm-ui/src/views/cheliang/hegezhengtaizhang/hegezhengtaizhang.vue

@ -219,13 +219,13 @@ export default {
btnKey: 'toEdit',
btnLabel: '编辑'
},
{
type: 'danger',
size: 'small',
icon: 'del',
btnKey: 'doDel',
btnLabel: '删除'
},
// {
// type: 'danger',
// size: 'small',
// icon: 'del',
// btnKey: 'doDel',
// btnLabel: ''
// },
{
type: 'primary',
size: 'small',

179
anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangeng.vue

@ -128,24 +128,25 @@
<!--End 添加修改部分-->
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form label-position="right" class="formadd">
<el-row v-show="currentLink">
<el-col :span="4" class="tleftb">当前环节</el-col>
<el-col :span="20" class="trightb">
<el-form-item prop="purchasingUnitName"><span>{{ current.taskName }}->{{ nextNode.name }}</span>
</el-form-item>
<el-form class="formadd" >
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row style="border-bottom: 1px solid #e0e3eb;">
<el-col :span="4" class="tleftb">意见</el-col>
<el-col :span="20" class="trightb">
<el-form-item>
<el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" clearable></el-input>
</el-form-item>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable ></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="confirm"> </el-button>
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
@ -170,12 +171,10 @@ export default {
temp: {}, //
rules: {},
// ------------------------------------
currentLink: true, //
operation: '', //
dialogList: {
comment: ''
},
xmlData: '', // xml
taskList: [],
startTask: true,
current: {
taskDefKey: '',
@ -183,8 +182,9 @@ export default {
},
nextNode: {}, //
nodeDialogVisible: false,
//
agreeList: {
currentLink: true,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
@ -192,22 +192,6 @@ export default {
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
//
regectList: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
userSid: ''
},
//
stopList: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
userSid: ''
}
}
},
@ -227,31 +211,17 @@ export default {
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('获取到的obj', obj)
//
this.agreeList.businessSid = obj.businessSid
this.agreeList.instanceId = obj.instanceId
this.agreeList.taskId = obj.taskId
this.agreeList.taskDefKey = obj.taskDefKey
this.agreeList.userSid = window.sessionStorage.getItem('userSid')
this.agreeList.orgSidPath = window.sessionStorage.getItem('orgSidPath')
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.regectList.businessSid = obj.businessSid
this.regectList.instanceId = obj.instanceId
this.regectList.taskId = obj.taskId
this.regectList.userSid = window.sessionStorage.getItem('userSid')
//
this.stopList.businessSid = obj.businessSid
this.stopList.instanceId = obj.instanceId
this.stopList.taskId = obj.taskId
this.stopList.userSid = window.sessionStorage.getItem('userSid')
//
this.transactState = obj.transactState
//
//
this.showInfo(obj.businessSid)
// this.getModelDetail(obj.deployId)
// this.getFlowViewer(obj.instanceId)
},
methods: {
handleReturn() {
@ -279,12 +249,9 @@ export default {
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.dialogList.comment = '同意'
this.currentLink = true //
const formVariables = {
businessSid: this.agreeList.businessSid
}
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, formVariables }).then((resp) => {
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
@ -296,12 +263,9 @@ export default {
//
openReject(val) {
this.operation = val
this.currentLink = true
this.dialogList.comment = ''
this.currentLink = true //
const formVariables = {
businessSid: this.regectList.businessSid
}
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey, formVariables }).then((resp) => {
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
@ -313,37 +277,37 @@ export default {
//
openStop(val) {
this.operation = val
this.currentLink = false
this.dialogList.comment = ''
this.currentLink = false //
this.nodeDialogVisible = true
},
/** 选择代办人确认 */
confirm() {
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
this.handleReject()
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
this.handleStop()
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
} else {
this.handleStop()
}
}
},
/** 同意任务 */
handleAgree() {
this.agreeList.comment = this.dialogList.comment
if (this.agreeList.comment === '') {
this.$message({
showClose: true,
message: '请填写同意意见!',
type: 'error'
})
return
}
req.agreeTask(this.agreeList).then((response) => {
this.linkByParameter.comment = this.dialogList.comment
req.agreeTask(this.linkByParameter).then((response) => {
if (response.success) {
this.$message({
showClose: true,
this.$notify({
title: '提示',
message: '执行成功',
type: 'success'
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
@ -359,21 +323,14 @@ export default {
},
/** 驳回任务 */
handleReject() {
this.regectList.comment = this.dialogList.comment
if (this.regectList.comment === '') {
this.$message({
showClose: true,
message: '请填写驳回意见!',
type: 'error'
})
return
}
req.rejectTask(this.regectList).then((response) => {
this.linkByParameter.comment = this.dialogList.comment
req.revokeTask(this.linkByParameter).then((response) => {
if (response.success) {
this.$message({
showClose: true,
this.$notify({
title: '提示',
message: '执行成功',
type: 'success'
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
@ -389,21 +346,14 @@ export default {
},
/** 终止任务 */
handleStop() {
this.stopList.comment = this.dialogList.comment
if (this.stopList.comment === '') {
this.$message({
showClose: true,
message: '请填写终止意见!',
type: 'error'
})
return
}
req.breakTask(this.stopList).then((response) => {
this.linkByParameter.comment = this.dialogList.comment
req.breakTask(this.linkByParameter).then((response) => {
if (response.success) {
this.$message({
showClose: true,
this.$notify({
title: '提示',
message: '执行成功',
type: 'success'
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
@ -441,12 +391,7 @@ export default {
padding: 30px 0 20px 0;
}
.tleftb {
border-bottom: 0 !important;
border-top: 1px solid #e0e3eb;
}
.trightb{
border-bottom: 0 !important;
border-top: 1px solid #e0e3eb;
.rowClass{
border-top: 1px solid #E0E3EB;
}
</style>

4
anrui-scm/anrui-scm-ui/src/views/workFlow/tiaojiaguanliFlow/tiaojiaguanli/tiaojiaDaiBanInfo.vue

@ -203,7 +203,7 @@ export default {
this.operation = val
this.currentLink = true
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey }).then((resp) => {
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
@ -217,7 +217,7 @@ export default {
this.operation = val
this.currentLink = true
this.dialogList.comment = ''
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey }).then((resp) => {
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]

48
anrui-scm/anrui-scm-ui/src/views/workFlow/weishoumaiduanFlow/weishoumaiduanguanli/weushoumaiduanEdit.vue

@ -9,7 +9,7 @@
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="save()">保存
</el-button>
<el-button type="primary" size="small" @click="submitVehicleApply()">提交
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submitVehicleApply()">提交
</el-button>
</div>
</div>
@ -451,8 +451,8 @@ export default {
if (valid) {
this.submitdisabled = true
req.saveOrUpdate(this.formobj).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.submitdisabled = false
this.$message({
showClose: true,
type: 'success',
@ -466,6 +466,8 @@ export default {
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
@ -476,25 +478,31 @@ export default {
})
},
submitVehicleApply() {
if (this.formobj.isPay == '1' && this.formobj.payAccountAll !== this.formobj.money) {
this.$message({ showClose:true, type: 'error', message: '因买断金额合计与付款金额合计不一致,提交失败' })
return
}
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.submitdisabled = false
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}, '*')
}).catch(() => {
this.submitdisabled = false
})
}
})
},

50
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/app/AppService.java

@ -60,25 +60,47 @@ public class AppService {
if (StringUtils.isNotBlank(stateValue)) {
String processEndTime = vo.getProcessEndTime();
vo.setStateValue(stateValue);
/* if (StringUtils.isNotBlank(processEndTime) && i == 0 && !"6".equals(type)) {
vo.setStateValue("已办结");//流程已办结
}*/
if (StringUtils.isNotBlank(processEndTime) && i == voList.size() - 1 && !"6".equals(type)) {
voList.get(i - 1).setStateValue("已办结");//流程已办结
List<AppUserVo> taskUserInfos = voList.get(i).getTaskUserInfos();
taskUserInfos.removeAll(Collections.singleton(null));
if(!taskUserInfos.isEmpty()){
if(taskUserInfos.size() == 1){
if("admin".equals(taskUserInfos.get(0).getAssigneeName())){
if (StringUtils.isNotBlank(processEndTime) && i == voList.size() - 1 && !"6".equals(type)) {
voList.get(i - 1).setStateValue("已办结");//流程已办结
}
}else{
if (StringUtils.isNotBlank(processEndTime) && i == voList.size() - 1 && !"6".equals(type)) {
voList.get(i).setStateValue("已办结");//流程已办结
}
}
}else{
if (StringUtils.isNotBlank(processEndTime) && i == voList.size() - 1 && !"6".equals(type)) {
voList.get(i).setStateValue("已办结");//流程已办结
}
}
}
}
/* if (StringUtils.isNotBlank(type)) {
String processEndTime = vo.getProcessEndTime();
vo.setStateKey(type);
if (StringUtils.isNotBlank(processEndTime) && i == 0 && !"6".equals(type)) {
vo.setStateKey("8");//流程已办结
}
}*/
if (StringUtils.isNotBlank(type)) {
String processEndTime = vo.getProcessEndTime();
vo.setStateKey(type);
if (StringUtils.isNotBlank(processEndTime) && i == voList.size() - 1 && !"6".equals(type)) {
voList.get(i - 1).setStateKey("8");//流程已办结
List<AppUserVo> taskUserInfos = voList.get(i).getTaskUserInfos();
taskUserInfos.removeAll(Collections.singleton(null));
if(!taskUserInfos.isEmpty()){
if(taskUserInfos.size() == 1){
if("admin".equals(taskUserInfos.get(0).getAssigneeName())){
if (StringUtils.isNotBlank(processEndTime) && i == voList.size() - 1 && !"6".equals(type)) {
voList.get(i - 1).setStateKey("8");//流程已办结
}
}else{
if (StringUtils.isNotBlank(processEndTime) && i == voList.size() - 1 && !"6".equals(type)) {
voList.get(i).setStateKey("8");//流程已办结
}
}
}else{
if (StringUtils.isNotBlank(processEndTime) && i == voList.size() - 1 && !"6".equals(type)) {
voList.get(i).setStateKey("8");//流程已办结
}
}
}
}

Loading…
Cancel
Save