|
@@ -78,6 +78,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
private SysDictMapper sysDictMapper;
|
|
private SysDictMapper sysDictMapper;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public List<BusinessOpportunity> getAll(BusinessOpportunity bo) {
|
|
public List<BusinessOpportunity> getAll(BusinessOpportunity bo) {
|
|
return bOMapper.selectAllList(bo);
|
|
return bOMapper.selectAllList(bo);
|
|
@@ -92,10 +93,10 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
public BusinessOpportunity getInfo(BusinessOpportunity bo, User user) {
|
|
public BusinessOpportunity getInfo(BusinessOpportunity bo, User user) {
|
|
BusinessOpportunity businessOpportunity = bOMapper.selectByIdToInfo(bo.getId());
|
|
BusinessOpportunity businessOpportunity = bOMapper.selectByIdToInfo(bo.getId());
|
|
businessOpportunity.setActionLogList(actionLogMapper.selectByInfoListBusiness(bo.getId()));
|
|
businessOpportunity.setActionLogList(actionLogMapper.selectByInfoListBusiness(bo.getId()));
|
|
- businessOpportunity.setUploadFilePList(uploadFileMapper.selectByInfoList("business",bo.getId()));
|
|
|
|
- businessOpportunity.setTaskList(taskMapper.selectList(new QueryWrapper<Task>().eq("business_opportunity_id",bo.getId())));
|
|
|
|
|
|
+ businessOpportunity.setUploadFilePList(uploadFileMapper.selectByInfoList("business", bo.getId()));
|
|
|
|
+ businessOpportunity.setTaskList(taskMapper.selectList(new QueryWrapper<Task>().eq("business_opportunity_id", bo.getId())));
|
|
List<BusinessItemProduct> businessItemProducts = bipMapper.selectList(new QueryWrapper<BusinessItemProduct>().eq("business_id", bo.getId()));
|
|
List<BusinessItemProduct> businessItemProducts = bipMapper.selectList(new QueryWrapper<BusinessItemProduct>().eq("business_id", bo.getId()));
|
|
- if (businessItemProducts.size() > 0){
|
|
|
|
|
|
+ if (businessItemProducts.size() > 0) {
|
|
BigDecimal finalPrice = new BigDecimal(0);
|
|
BigDecimal finalPrice = new BigDecimal(0);
|
|
BigDecimal discountedPrice = new BigDecimal(0);
|
|
BigDecimal discountedPrice = new BigDecimal(0);
|
|
for (BusinessItemProduct businessItemProduct : businessItemProducts) {
|
|
for (BusinessItemProduct businessItemProduct : businessItemProducts) {
|
|
@@ -107,7 +108,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
// 折后价格
|
|
// 折后价格
|
|
discountedPrice = discountedPrice.add(price.multiply(divide));
|
|
discountedPrice = discountedPrice.add(price.multiply(divide));
|
|
}
|
|
}
|
|
- BigDecimal divide = discountedPrice.divide(finalPrice,2,BigDecimal.ROUND_UP);
|
|
|
|
|
|
+ BigDecimal divide = discountedPrice.divide(finalPrice, 2, BigDecimal.ROUND_UP);
|
|
// 整单折扣率
|
|
// 整单折扣率
|
|
businessOpportunity.setFinalPrice(divide.multiply(new BigDecimal(100)));
|
|
businessOpportunity.setFinalPrice(divide.multiply(new BigDecimal(100)));
|
|
}
|
|
}
|
|
@@ -160,7 +161,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
public void update(BusinessOpportunity bo, String userId) {
|
|
public void update(BusinessOpportunity bo, String userId) {
|
|
setNull(bo);
|
|
setNull(bo);
|
|
bOMapper.updateById(bo);
|
|
bOMapper.updateById(bo);
|
|
- bipMapper.delete(new QueryWrapper<BusinessItemProduct>().eq("business_id",bo.getId()));
|
|
|
|
|
|
+ bipMapper.delete(new QueryWrapper<BusinessItemProduct>().eq("business_id", bo.getId()));
|
|
List<BusinessItemProduct> businessItemProducts = JSONArray.parseArray(bo.getBusinessItemProductList(), BusinessItemProduct.class);
|
|
List<BusinessItemProduct> businessItemProducts = JSONArray.parseArray(bo.getBusinessItemProductList(), BusinessItemProduct.class);
|
|
for (BusinessItemProduct businessItemProduct : businessItemProducts) {
|
|
for (BusinessItemProduct businessItemProduct : businessItemProducts) {
|
|
businessItemProduct.setBusinessId(bo.getId());
|
|
businessItemProduct.setBusinessId(bo.getId());
|
|
@@ -218,13 +219,12 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
private String path;
|
|
private String path;
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public HttpRespMsg saveProduct(BusinessOpportunity bo, User user) {
|
|
public HttpRespMsg saveProduct(BusinessOpportunity bo, User user) {
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
msg.setMsg("操作成功");
|
|
msg.setMsg("操作成功");
|
|
- biMapper.delete(new QueryWrapper<BusinessItemProduct>().eq("business_id",bo.getId()));
|
|
|
|
|
|
+ biMapper.delete(new QueryWrapper<BusinessItemProduct>().eq("business_id", bo.getId()));
|
|
List<BusinessItemProduct> businessItemProducts = JSONArray.parseArray(bo.getBusinessItemProductList(), BusinessItemProduct.class);
|
|
List<BusinessItemProduct> businessItemProducts = JSONArray.parseArray(bo.getBusinessItemProductList(), BusinessItemProduct.class);
|
|
for (BusinessItemProduct businessItemProduct : businessItemProducts) {
|
|
for (BusinessItemProduct businessItemProduct : businessItemProducts) {
|
|
biMapper.insert(businessItemProduct);
|
|
biMapper.insert(businessItemProduct);
|
|
@@ -240,6 +240,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
|
|
|
|
@Value(value = "${upload.file}")
|
|
@Value(value = "${upload.file}")
|
|
private String filePath;
|
|
private String filePath;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public Object uploadFile(BusinessOpportunity bo, HttpServletRequest request, MultipartFile file) {
|
|
public Object uploadFile(BusinessOpportunity bo, HttpServletRequest request, MultipartFile file) {
|
|
User user = userMapper.selectById(request.getHeader("token"));
|
|
User user = userMapper.selectById(request.getHeader("token"));
|
|
@@ -315,7 +316,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
try {
|
|
try {
|
|
ServletOutputStream os = response.getOutputStream();
|
|
ServletOutputStream os = response.getOutputStream();
|
|
UploadFile uploadFile = uploadFileMapper.selectById(file.getId());
|
|
UploadFile uploadFile = uploadFileMapper.selectById(file.getId());
|
|
- if (uploadFile == null ){
|
|
|
|
|
|
+ if (uploadFile == null) {
|
|
msg.setError("文件未找到");
|
|
msg.setError("文件未找到");
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
@@ -353,7 +354,10 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Object reFileName(UploadFile uploadFile, HttpServletRequest request) {
|
|
public Object reFileName(UploadFile uploadFile, HttpServletRequest request) {
|
|
- return uploadFileMapper.update(null, new UpdateWrapper<UploadFile>().eq("id", uploadFile.getId()).set("name", uploadFile.getName()));
|
|
|
|
|
|
+ uploadFileMapper.update(null, new UpdateWrapper<UploadFile>().eq("item_id", uploadFile.getId()).eq("code", "business").set("name", uploadFile.getName()));
|
|
|
|
+ HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
|
|
+ httpRespMsg.setMsg("操作成功");
|
|
|
|
+ return httpRespMsg;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -377,12 +381,12 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Map<String, Object> getDataSummary(Integer companyId, String startDate, String endDate, String userId, List<String> targetUserIds) {
|
|
public Map<String, Object> getDataSummary(Integer companyId, String startDate, String endDate, String userId, List<String> targetUserIds) {
|
|
- return bOMapper.getDataSummary(companyId,startDate,endDate,userId,targetUserIds);
|
|
|
|
|
|
+ return bOMapper.getDataSummary(companyId, startDate, endDate, userId, targetUserIds);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<Map<String, Object>> getDataStage(Integer companyId, String startDate, String endDate, String userId, List<String> targetUserIds) {
|
|
public List<Map<String, Object>> getDataStage(Integer companyId, String startDate, String endDate, String userId, List<String> targetUserIds) {
|
|
- return bOMapper.getDataStage(companyId,startDate,endDate,userId,targetUserIds);
|
|
|
|
|
|
+ return bOMapper.getDataStage(companyId, startDate, endDate, userId, targetUserIds);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -392,7 +396,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public HttpRespMsg importData(MultipartFile multipartFile) {
|
|
public HttpRespMsg importData(MultipartFile multipartFile) {
|
|
- HttpRespMsg msg=new HttpRespMsg();
|
|
|
|
|
|
+ HttpRespMsg msg = new HttpRespMsg();
|
|
String fileName = multipartFile.getOriginalFilename();
|
|
String fileName = multipartFile.getOriginalFilename();
|
|
File file = new File(fileName == null ? "file" : fileName);
|
|
File file = new File(fileName == null ? "file" : fileName);
|
|
User user = userMapper.selectById(request.getHeader("token"));
|
|
User user = userMapper.selectById(request.getHeader("token"));
|
|
@@ -420,15 +424,15 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
int rowNum = sheet.getLastRowNum();
|
|
int rowNum = sheet.getLastRowNum();
|
|
//获取当前表单模板 校验规则
|
|
//获取当前表单模板 校验规则
|
|
SysForm sysForm = sysFormMapper.selectOne(new LambdaQueryWrapper<SysForm>().eq(SysForm::getCode, "Thread").eq(SysForm::getCompanyId, companyId).eq(SysForm::getIsCurrent, 1));
|
|
SysForm sysForm = sysFormMapper.selectOne(new LambdaQueryWrapper<SysForm>().eq(SysForm::getCode, "Thread").eq(SysForm::getCompanyId, companyId).eq(SysForm::getIsCurrent, 1));
|
|
- if(sysForm==null){
|
|
|
|
|
|
+ if (sysForm == null) {
|
|
msg.setError("当前模块未配置自定义模板,需先完成配置");
|
|
msg.setError("当前模块未配置自定义模板,需先完成配置");
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
String config = sysForm.getConfig();
|
|
String config = sysForm.getConfig();
|
|
JSONObject configOb = JSON.parseObject(config);
|
|
JSONObject configOb = JSON.parseObject(config);
|
|
JSONArray configObJSONArray = configOb.getJSONArray("list");
|
|
JSONArray configObJSONArray = configOb.getJSONArray("list");
|
|
- List<String> userNameList=new ArrayList<>();
|
|
|
|
- HttpRespMsg respMsg=new HttpRespMsg();
|
|
|
|
|
|
+ List<String> userNameList = new ArrayList<>();
|
|
|
|
+ HttpRespMsg respMsg = new HttpRespMsg();
|
|
for (int rowIndex = 0; rowIndex <= rowNum; rowIndex++) {
|
|
for (int rowIndex = 0; rowIndex <= rowNum; rowIndex++) {
|
|
XSSFRow row = sheet.getRow(rowIndex);
|
|
XSSFRow row = sheet.getRow(rowIndex);
|
|
if (row == null) {
|
|
if (row == null) {
|
|
@@ -444,33 +448,34 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
JSONObject item = configObJSONArray.getJSONObject(i);
|
|
JSONObject item = configObJSONArray.getJSONObject(i);
|
|
String modelName = item.getString("model");
|
|
String modelName = item.getString("model");
|
|
XSSFCell cell = row.getCell(i);
|
|
XSSFCell cell = row.getCell(i);
|
|
- if(cell!=null){
|
|
|
|
- switch (item.getString("type")){
|
|
|
|
|
|
+ if (cell != null) {
|
|
|
|
+ switch (item.getString("type")) {
|
|
// case "time":cell.setCellType(CellType.NUMERIC);
|
|
// case "time":cell.setCellType(CellType.NUMERIC);
|
|
// break;
|
|
// break;
|
|
- default:cell.setCellType(CellType.STRING);
|
|
|
|
|
|
+ default:
|
|
|
|
+ cell.setCellType(CellType.STRING);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(modelName.equals("inchargerId")){
|
|
|
|
|
|
+ if (modelName.equals("inchargerId")) {
|
|
System.out.println("=====");
|
|
System.out.println("=====");
|
|
System.out.println(modelName);
|
|
System.out.println(modelName);
|
|
System.out.println(cell.toString());
|
|
System.out.println(cell.toString());
|
|
- if(!StringUtils.isEmpty(cell.getStringCellValue())){
|
|
|
|
|
|
+ if (!StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
userNameList.add(cell.getStringCellValue());
|
|
userNameList.add(cell.getStringCellValue());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- System.out.println("参与搜索的人员列表"+userNameList + userNameList.size());
|
|
|
|
- if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1&&userNameList.size()>0){
|
|
|
|
- respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList,null);
|
|
|
|
- if(respMsg.code.equals("0")){
|
|
|
|
- msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");
|
|
|
|
|
|
+ System.out.println("参与搜索的人员列表" + userNameList + userNameList.size());
|
|
|
|
+ if (wxCorpInfo != null && wxCorpInfo.getSaasSyncContact() == 1 && userNameList.size() > 0) {
|
|
|
|
+ respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList, null);
|
|
|
|
+ if (respMsg.code.equals("0")) {
|
|
|
|
+ msg.setError("姓名为[" + String.valueOf(respMsg.data) + "]的人员存在重复,请使用工号!");
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- List<User> targetUserList= (List<User>) respMsg.data;
|
|
|
|
|
|
+ List<User> targetUserList = (List<User>) respMsg.data;
|
|
//直接忽略空行 从row1开始
|
|
//直接忽略空行 从row1开始
|
|
for (int rowIndex = 1; rowIndex <= rowNum; rowIndex++) {
|
|
for (int rowIndex = 1; rowIndex <= rowNum; rowIndex++) {
|
|
XSSFRow row = sheet.getRow(rowIndex);
|
|
XSSFRow row = sheet.getRow(rowIndex);
|
|
@@ -483,7 +488,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
}
|
|
}
|
|
//获取到当前行的列数据
|
|
//获取到当前行的列数据
|
|
int cellNum = row.getLastCellNum();
|
|
int cellNum = row.getLastCellNum();
|
|
- BusinessOpportunity bo =new BusinessOpportunity();
|
|
|
|
|
|
+ BusinessOpportunity bo = new BusinessOpportunity();
|
|
bo.setCompanyId(companyId);
|
|
bo.setCompanyId(companyId);
|
|
bo.setCreateTime(new Date());
|
|
bo.setCreateTime(new Date());
|
|
bo.setCreatorId(user.getId());
|
|
bo.setCreatorId(user.getId());
|
|
@@ -491,65 +496,66 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
JSONObject item = configObJSONArray.getJSONObject(i);
|
|
JSONObject item = configObJSONArray.getJSONObject(i);
|
|
String modelName = item.getString("model");
|
|
String modelName = item.getString("model");
|
|
String className = modelName.substring(0, 1).toUpperCase() + modelName.substring(1);
|
|
String className = modelName.substring(0, 1).toUpperCase() + modelName.substring(1);
|
|
- String getter="get"+className;
|
|
|
|
- String setter="set"+className;
|
|
|
|
|
|
+ String getter = "get" + className;
|
|
|
|
+ String setter = "set" + className;
|
|
XSSFCell cell = row.getCell(i);
|
|
XSSFCell cell = row.getCell(i);
|
|
- if(cell!=null){
|
|
|
|
- switch (item.getString("type")){
|
|
|
|
|
|
+ if (cell != null) {
|
|
|
|
+ switch (item.getString("type")) {
|
|
// case "time":cell.setCellType(CellType.NUMERIC);
|
|
// case "time":cell.setCellType(CellType.NUMERIC);
|
|
// break;
|
|
// break;
|
|
- default:cell.setCellType(CellType.STRING);
|
|
|
|
|
|
+ default:
|
|
|
|
+ cell.setCellType(CellType.STRING);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//校验当前列是否为必填
|
|
//校验当前列是否为必填
|
|
JSONObject options = item.getJSONObject("options");
|
|
JSONObject options = item.getJSONObject("options");
|
|
JSONObject rules = options.getJSONObject("rules");
|
|
JSONObject rules = options.getJSONObject("rules");
|
|
Boolean required = rules.getBoolean("required");
|
|
Boolean required = rules.getBoolean("required");
|
|
- if(required){
|
|
|
|
- if(StringUtils.isEmpty(cell.getStringCellValue())){
|
|
|
|
- msg.setError(item.getString("label")+"值不能为空值");
|
|
|
|
|
|
+ if (required) {
|
|
|
|
+ if (StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
|
|
+ msg.setError(item.getString("label") + "值不能为空值");
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(modelName.equals("inchargerId")){
|
|
|
|
- if(!StringUtils.isEmpty(cell.getStringCellValue())){
|
|
|
|
|
|
+ if (modelName.equals("inchargerId")) {
|
|
|
|
+ if (!StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
String userName = cell.getStringCellValue();
|
|
String userName = cell.getStringCellValue();
|
|
Optional<User> first;
|
|
Optional<User> first;
|
|
- if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
|
|
|
+ if (wxCorpInfo != null && wxCorpInfo.getSaasSyncContact() == 1) {
|
|
Optional<User> optional = targetUserList.stream().filter(tl -> tl.getName().equals(userName)).findFirst();
|
|
Optional<User> optional = targetUserList.stream().filter(tl -> tl.getName().equals(userName)).findFirst();
|
|
- first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(userName))||(optional.isPresent()&&u.getCorpwxUserid()!=null&&u.getCorpwxUserid().equals(optional.get().getCorpwxUserid()))).findFirst();
|
|
|
|
- }else {
|
|
|
|
- first= userList.stream().filter(u -> u.getName().equals(userName)||(u.getJobNumber()!=null&&u.getJobNumber().equals(userName))).findFirst();
|
|
|
|
|
|
+ first = userList.stream().filter(u -> (u.getJobNumber() != null && u.getJobNumber().equals(userName)) || (optional.isPresent() && u.getCorpwxUserid() != null && u.getCorpwxUserid().equals(optional.get().getCorpwxUserid()))).findFirst();
|
|
|
|
+ } else {
|
|
|
|
+ first = userList.stream().filter(u -> u.getName().equals(userName) || (u.getJobNumber() != null && u.getJobNumber().equals(userName))).findFirst();
|
|
}
|
|
}
|
|
if (first.isPresent()) {
|
|
if (first.isPresent()) {
|
|
bo.setInchargerId(first.get().getId());
|
|
bo.setInchargerId(first.get().getId());
|
|
} else {
|
|
} else {
|
|
- msg.setError("负责人["+userName+"]在系统中不存在");
|
|
|
|
|
|
+ msg.setError("负责人[" + userName + "]在系统中不存在");
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }else if(modelName.equals("contactsId")){
|
|
|
|
- if(!StringUtils.isEmpty(cell.getStringCellValue())){
|
|
|
|
|
|
+ } else if (modelName.equals("contactsId")) {
|
|
|
|
+ if (!StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
String userName = cell.getStringCellValue();
|
|
String userName = cell.getStringCellValue();
|
|
Optional<User> first;
|
|
Optional<User> first;
|
|
- if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
|
|
|
+ if (wxCorpInfo != null && wxCorpInfo.getSaasSyncContact() == 1) {
|
|
Optional<User> optional = targetUserList.stream().filter(tl -> tl.getName().equals(userName)).findFirst();
|
|
Optional<User> optional = targetUserList.stream().filter(tl -> tl.getName().equals(userName)).findFirst();
|
|
- first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(userName))||(optional.isPresent()&&u.getCorpwxUserid()!=null&&u.getCorpwxUserid().equals(optional.get().getCorpwxUserid()))).findFirst();
|
|
|
|
- }else {
|
|
|
|
- first= userList.stream().filter(u -> u.getName().equals(userName)||(u.getJobNumber()!=null&&u.getJobNumber().equals(userName))).findFirst();
|
|
|
|
|
|
+ first = userList.stream().filter(u -> (u.getJobNumber() != null && u.getJobNumber().equals(userName)) || (optional.isPresent() && u.getCorpwxUserid() != null && u.getCorpwxUserid().equals(optional.get().getCorpwxUserid()))).findFirst();
|
|
|
|
+ } else {
|
|
|
|
+ first = userList.stream().filter(u -> u.getName().equals(userName) || (u.getJobNumber() != null && u.getJobNumber().equals(userName))).findFirst();
|
|
}
|
|
}
|
|
if (first.isPresent()) {
|
|
if (first.isPresent()) {
|
|
bo.setContactsId(Integer.parseInt(first.get().getId()));
|
|
bo.setContactsId(Integer.parseInt(first.get().getId()));
|
|
} else {
|
|
} else {
|
|
- msg.setError("负责人["+userName+"]在系统中不存在");
|
|
|
|
|
|
+ msg.setError("负责人[" + userName + "]在系统中不存在");
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }else {
|
|
|
|
- if(!StringUtils.isEmpty(cell.getStringCellValue())){
|
|
|
|
|
|
+ } else {
|
|
|
|
+ if (!StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
Class<Clue> clueClass = Clue.class;
|
|
Class<Clue> clueClass = Clue.class;
|
|
- Method method = clueClass.getMethod(setter,String.class);
|
|
|
|
- method.invoke(bo,cell.getStringCellValue());
|
|
|
|
|
|
+ Method method = clueClass.getMethod(setter, String.class);
|
|
|
|
+ method.invoke(bo, cell.getStringCellValue());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -599,7 +605,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
bOMapper.update(bo, new UpdateWrapper<BusinessOpportunity>().eq("id", bo.getId()).set("Stage_Id", bo.getStageId()));
|
|
bOMapper.update(bo, new UpdateWrapper<BusinessOpportunity>().eq("id", bo.getId()).set("Stage_Id", bo.getStageId()));
|
|
ActionLog al = new ActionLog();
|
|
ActionLog al = new ActionLog();
|
|
al.setCode("business");
|
|
al.setCode("business");
|
|
- al.setName("推进了阶段至"+bo.getStageValue());
|
|
|
|
|
|
+ al.setName("推进了阶段至" + bo.getStageValue());
|
|
al.setUserId(user.getId());
|
|
al.setUserId(user.getId());
|
|
al.setItemId(bo.getId());
|
|
al.setItemId(bo.getId());
|
|
actionLogMapper.insert(al);
|
|
actionLogMapper.insert(al);
|