Commit e099bd1e by 唐功亮

【新增】 企业信息回显(系统成员)

parent 6fcefc32
package io.office.modules.manage.controller;
import java.util.Arrays;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import io.office.modules.manage.entity.GdsBindEntity;
import io.office.modules.manage.service.GdsBindService;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-27 11:25:44
*/
@RestController
@RequestMapping("/gdsbind")
public class GdsBindController {
@Autowired
private GdsBindService gdsBindService;
/**
* 列表
*/
@RequestMapping("/list")
// @RequiresPermissions("manage:gdsbind:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = gdsBindService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{gdsCode}")
// @RequiresPermissions("manage:gdsbind:info")
public R info(@PathVariable("gdsCode") String gdsCode){
GdsBindEntity gdsBind = gdsBindService.getById(gdsCode);
return R.ok().put("gdsBind", gdsBind);
}
/**
* 保存
*/
@RequestMapping("/save")
// @RequiresPermissions("manage:gdsbind:save")
public R save(@RequestBody GdsBindEntity gdsBind){
gdsBindService.save(gdsBind);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
// @RequiresPermissions("manage:gdsbind:update")
public R update(@RequestBody GdsBindEntity gdsBind){
gdsBindService.updateById(gdsBind);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
// @RequiresPermissions("manage:gdsbind:delete")
public R delete(@RequestBody String[] gdsCodes){
gdsBindService.removeByIds(Arrays.asList(gdsCodes));
return R.ok();
}
}
...@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.modules.app.annotation.Login; import io.office.modules.app.annotation.Login;
import io.office.modules.manage.dao.MemberDao; import io.office.modules.manage.dao.MemberDao;
import io.office.modules.manage.dao.TycpdmFirmDao; import io.office.modules.manage.dao.TycpdmFirmDao;
import io.office.modules.manage.entity.FirmEntity;
import io.office.modules.manage.entity.MemberEntity; import io.office.modules.manage.entity.MemberEntity;
import io.office.modules.manage.service.TycpdmFirmChangeService; import io.office.modules.manage.service.TycpdmFirmChangeService;
import io.office.modules.manage.utils.DESUtils; import io.office.modules.manage.utils.DESUtils;
...@@ -346,4 +347,15 @@ public class TycpdmFirmController extends AbstractController { ...@@ -346,4 +347,15 @@ public class TycpdmFirmController extends AbstractController {
TycpdmFirmEntity userName = tycpdmFirmDao.findUserName(userNameR); TycpdmFirmEntity userName = tycpdmFirmDao.findUserName(userNameR);
return R.ok().put("data",userName); return R.ok().put("data",userName);
} }
/**
* 企业信息回显(系统成员)
*/
@RequestMapping("/api/findFirmInfoXT")
@Login
public R findFirmInfoXT(@RequestBody Map name){
String carno = String.valueOf(name.get("carno"));
FirmEntity data = tycpdmFirmService.findFirmInfoXT(carno);
return R.ok().put("data",data);
}
} }
package io.office.modules.manage.dao;
import io.office.modules.manage.entity.GdsBindEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-27 11:25:44
*/
@Mapper
public interface GdsBindDao extends BaseMapper<GdsBindEntity> {
}
...@@ -43,4 +43,6 @@ public interface TycpdmFirmDao extends BaseMapper<TycpdmFirmEntity> { ...@@ -43,4 +43,6 @@ public interface TycpdmFirmDao extends BaseMapper<TycpdmFirmEntity> {
void updateByIdBranchCode(@Param("id") Integer id,@Param("branchCode") Integer branchCode); void updateByIdBranchCode(@Param("id") Integer id,@Param("branchCode") Integer branchCode);
String returnFileUrl(Map name); String returnFileUrl(Map name);
TycpdmFirmEntity findFirmInfoXT(String username);
} }
package io.office.modules.manage.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-27 11:25:44
*/
@Data
@TableName("GDS_BIND")
public class GdsBindEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* $column.comments
*/
private String billsn;
/**
* $column.comments
*/
@TableId
private String gdsCode;
/**
* $column.comments
*/
private Integer fId;
/**
* $column.comments
*/
private Date gdsBindDate;
/**
* $column.comments
*/
private Date gdsModDate;
/**
* $column.comments
*/
private String gdsMemo;
/**
* $column.comments
*/
private String gdsBindPerson;
}
package io.office.modules.manage.service;
import com.baomidou.mybatisplus.extension.service.IService;
import io.office.common.utils.PageUtils;
import io.office.modules.manage.entity.GdsBindEntity;
import java.util.Map;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-27 11:25:44
*/
public interface GdsBindService extends IService<GdsBindEntity> {
PageUtils queryPage(Map<String, Object> params);
}
...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import io.office.common.utils.PageUtils; import io.office.common.utils.PageUtils;
import io.office.modules.manage.entity.FirmEntity;
import io.office.modules.manage.entity.MemberEntity; import io.office.modules.manage.entity.MemberEntity;
import io.office.modules.manage.entity.ProductEntity; import io.office.modules.manage.entity.ProductEntity;
import io.office.modules.manage.entity.TycpdmFirmEntity; import io.office.modules.manage.entity.TycpdmFirmEntity;
...@@ -55,5 +56,7 @@ public interface TycpdmFirmService extends IService<TycpdmFirmEntity> { ...@@ -55,5 +56,7 @@ public interface TycpdmFirmService extends IService<TycpdmFirmEntity> {
String redirectBusinessHall(Map map,MemberEntity memberUser); String redirectBusinessHall(Map map,MemberEntity memberUser);
String returnFileUrl(Map name); String returnFileUrl(Map name);
FirmEntity findFirmInfoXT(String carno);
} }
package io.office.modules.manage.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.office.common.utils.PageUtils;
import io.office.common.utils.Query;
import io.office.modules.manage.dao.GdsBindDao;
import io.office.modules.manage.entity.GdsBindEntity;
import io.office.modules.manage.service.GdsBindService;
@Service("gdsBindService")
public class GdsBindServiceImpl extends ServiceImpl<GdsBindDao, GdsBindEntity> implements GdsBindService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<GdsBindEntity> page = this.page(
new Query<GdsBindEntity>().getPage(params),
new QueryWrapper<GdsBindEntity>()
);
return new PageUtils(page);
}
}
\ No newline at end of file
...@@ -161,6 +161,8 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity ...@@ -161,6 +161,8 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
jsonObject.put("isXT",isXT); jsonObject.put("isXT",isXT);
jsonObject.put("id",id); jsonObject.put("id",id);
jsonObject.put("carno",carno); jsonObject.put("carno",carno);
jsonObject.put("username",userName);
jsonObject.put("phone",phone);
R token = sysUserTokenService.createToken("qianduan_",id);//将token信息存入 数据库 R token = sysUserTokenService.createToken("qianduan_",id);//将token信息存入 数据库
Object token1 = token.get("token"); Object token1 = token.get("token");
jsonObject.put("token",token1); jsonObject.put("token",token1);
......
package io.office.modules.manage.service.impl; package io.office.modules.manage.service.impl;
import cn.hutool.crypto.symmetric.DES;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.common.exception.RRException; import io.office.common.exception.RRException;
import io.office.modules.manage.dao.MemberDao; import io.office.modules.manage.dao.*;
import io.office.modules.manage.dao.TycpdmFirmChangeDao;
import io.office.modules.manage.dao.TycpdmVipUserDao;
import io.office.modules.manage.entity.*; import io.office.modules.manage.entity.*;
import io.office.modules.manage.service.TycpdmFirmChangeService; import io.office.modules.manage.service.TycpdmFirmChangeService;
import io.office.modules.manage.utils.DESUtils; import io.office.modules.manage.utils.DESUtils;
...@@ -31,7 +28,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -31,7 +28,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.office.common.utils.PageUtils; import io.office.common.utils.PageUtils;
import io.office.common.utils.Query; import io.office.common.utils.Query;
import io.office.modules.manage.dao.TycpdmFirmDao;
import io.office.modules.manage.service.TycpdmFirmService; import io.office.modules.manage.service.TycpdmFirmService;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.FileCopyUtils; import org.springframework.util.FileCopyUtils;
...@@ -59,6 +55,12 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm ...@@ -59,6 +55,12 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
@Autowired @Autowired
private TycpdmFirmChangeService tycpdmFirmChangeService; private TycpdmFirmChangeService tycpdmFirmChangeService;
@Autowired
private GdsBindDao gdsBindDao;
@Autowired
private FirmDao firmDao;
@Value("${uploadFileQY}") @Value("${uploadFileQY}")
String uploadFileQY; String uploadFileQY;
...@@ -472,6 +474,19 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm ...@@ -472,6 +474,19 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
} }
@Override @Override
public FirmEntity findFirmInfoXT(String carno) {
GdsBindEntity gdsBindEntity = gdsBindDao.selectById(carno);
if (gdsBindEntity==null){
throw new RRException("暂无数据");
}else {
Integer fId = gdsBindEntity.getFId();
FirmEntity firmEntity = firmDao.selectById(fId);
firmEntity.setFirmType("firmType");//刘娜给的文章这样写死值
return firmEntity;
}
}
@Override
public void updateSystem(Map<String, Object> params) { public void updateSystem(Map<String, Object> params) {
Integer id = Integer.valueOf(String.valueOf(params.get("id")));//id为 各个表得ID 变更表和主表 Integer id = Integer.valueOf(String.valueOf(params.get("id")));//id为 各个表得ID 变更表和主表
Integer status = Integer.valueOf(String.valueOf(params.get("status")));//申请状态 1.首次 2.变更 Integer status = Integer.valueOf(String.valueOf(params.get("status")));//申请状态 1.首次 2.变更
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment