master
parent
e4b2daa758
commit
f50b9ed225
@ -1,30 +0,0 @@
|
||||
package com.dsic.gj_erp.bean.tree;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version V1.0.0
|
||||
* @Title: ProjectTreeVo
|
||||
* @Package com.dsic.xzerp.bean.tree
|
||||
* @Description: tree
|
||||
* @author: xhj
|
||||
* @date: 2021/3/15 13:18
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PhTreeVo {
|
||||
private String id;
|
||||
private String parentBm;
|
||||
private String label;
|
||||
private String departCode;
|
||||
private String status;
|
||||
|
||||
private String lckStatus;
|
||||
private String dwgNo;
|
||||
private String dwgType;
|
||||
private String bzry;
|
||||
private List<PhTreeVo> children;
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
package com.dsic.gj_erp.bean.tree;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version V1.0.0
|
||||
* @Title: ProjectTreeVo
|
||||
* @Package com.dsic.xzerp.bean.tree
|
||||
* @Description: tree
|
||||
* @author: xhj
|
||||
* @date: 2021/3/15 13:18
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class Tree {
|
||||
private String id;
|
||||
private String parentBm;
|
||||
private String parentValue;
|
||||
private String label;
|
||||
private List<Tree> children;
|
||||
private String value;
|
||||
|
||||
private String level;
|
||||
|
||||
private String params;
|
||||
// private String lckId;
|
||||
}
|
@ -1,91 +0,0 @@
|
||||
package com.dsic.gj_erp.controller.sy;
|
||||
|
||||
|
||||
import com.dsic.gj_erp.annotation.AuthFunction;
|
||||
import com.dsic.gj_erp.bean.ResultBean;
|
||||
import com.dsic.gj_erp.bean.sy.DmDepart;
|
||||
import com.dsic.gj_erp.bean.sy.DmDepartIn;
|
||||
import com.dsic.gj_erp.service.sy.DmDepartService;
|
||||
import io.swagger.annotations.Authorization;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 部门表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author xhj
|
||||
* @since 2021-03-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/sy/depart")
|
||||
public class DmDepartController1 {
|
||||
|
||||
@Resource
|
||||
private DmDepartService dmDepartService;
|
||||
|
||||
/**
|
||||
* 无参获取全部部门
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getall")
|
||||
public ResultBean<List<DmDepart>> getAll(){
|
||||
return new ResultBean<List<DmDepart>>(this.dmDepartService.getAll());
|
||||
}
|
||||
|
||||
/**
|
||||
* 条件查询部门及其子部门
|
||||
* @param dmDepart
|
||||
* @return
|
||||
*/
|
||||
@AuthFunction
|
||||
@PostMapping("/getcon")
|
||||
public ResultBean<List<DmDepart>> getByCondition(@RequestBody DmDepart dmDepart){
|
||||
return new ResultBean<List<DmDepart>>(this.dmDepartService.getByCondition(dmDepart));
|
||||
}
|
||||
|
||||
@AuthFunction
|
||||
@PostMapping("/getcondefault")
|
||||
public ResultBean<List<DmDepart>> getByConditionDefaultDepartCode(@RequestBody DmDepartIn dmDepart){
|
||||
return new ResultBean<List<DmDepart>>(this.dmDepartService.getByConditionDefaultDepartCode(dmDepart));
|
||||
}
|
||||
|
||||
@AuthFunction
|
||||
@PostMapping("/getallparent")
|
||||
public ResultBean<List<DmDepart>> getAllParent(){
|
||||
return new ResultBean<>(this.dmDepartService.getAllParent());
|
||||
}
|
||||
|
||||
@AuthFunction
|
||||
@PostMapping("/getallchildren")
|
||||
public ResultBean<List<DmDepart>> getAllChildren(){
|
||||
return new ResultBean<>(this.dmDepartService.getAllChildren());
|
||||
}
|
||||
|
||||
/**
|
||||
* @Title
|
||||
* @Description //根据参数不同查询部门
|
||||
* @author xcs
|
||||
* @updateAuthor xcs
|
||||
* @Date 2021/5/12 10:26
|
||||
* @version v1.0.0
|
||||
* @exception
|
||||
* @throws
|
||||
* @return
|
||||
**/
|
||||
@ResponseBody
|
||||
@RequestMapping("/selectall")
|
||||
public ResultBean<List<DmDepart>> selectall(@RequestBody String[] map){
|
||||
// System.out.println(map+"打印一下这个东西");
|
||||
List<String> ids = Arrays.asList(map);
|
||||
return this.dmDepartService.selectDepartQuery(ids);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,100 +0,0 @@
|
||||
package com.dsic.gj_erp.controller.sy;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.dsic.gj_erp.annotation.AuthFunction;
|
||||
import com.dsic.gj_erp.bean.ResultBean;
|
||||
import com.dsic.gj_erp.bean.sy.DmPipeSystem;
|
||||
import com.dsic.gj_erp.bean.sy.SyLog;
|
||||
import com.dsic.gj_erp.service.sy.SyLogService;
|
||||
import com.dsic.gj_erp.util.IPUtils;
|
||||
import io.swagger.annotations.Authorization;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 系统日志表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author xhj
|
||||
* @since 2021-04-08
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value = "/api/sy/syLog")
|
||||
public class SyLogController {
|
||||
|
||||
@Autowired
|
||||
SyLogService syLogService;
|
||||
|
||||
@AuthFunction
|
||||
@PostMapping(value = "/add")
|
||||
public ResultBean getList(HttpServletRequest httpRequest , @RequestBody SyLog syLog) {
|
||||
|
||||
syLog.setIp(IPUtils.getIpAddr(httpRequest));
|
||||
syLog.setComputerName(System.getenv().get("USERNAME"));
|
||||
syLog.setUserCode((String) httpRequest.getAttribute("yhdm"));
|
||||
syLog.setUserName((String) httpRequest.getAttribute("username"));
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");//设置日期格式
|
||||
syLog.setCreateTime(df.format(new Date()));
|
||||
syLogService.save(syLog);
|
||||
return new ResultBean();
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/getList")
|
||||
public ResultBean getList(@RequestBody Map<String, Object> paramMap){
|
||||
IPage<SyLog> page = new Page<>((Integer)paramMap.get("pageNo"), (Integer)paramMap.get("pageSize"));
|
||||
QueryWrapper qw = new QueryWrapper<DmPipeSystem>();
|
||||
|
||||
Map syLog = (Map)paramMap.get("syLog");
|
||||
qw.orderByDesc("create_time");
|
||||
if (!StringUtils.isBlank((String)syLog.get("userName"))){
|
||||
qw.like("user_name",syLog.get("userName"));
|
||||
|
||||
}
|
||||
if (!StringUtils.isBlank((String)syLog.get("systemCode"))){
|
||||
qw.like("system_code",syLog.get("systemCode"));
|
||||
|
||||
}
|
||||
if (!StringUtils.isBlank((String)syLog.get("content"))){
|
||||
qw.like("content",syLog.get("content"));
|
||||
//qw.apply("left(content,2)=2");
|
||||
}
|
||||
if (!StringUtils.isBlank((String)syLog.get("ks"))){
|
||||
qw.apply("left(create_time,10)>='"+syLog.get("ks")+"'");
|
||||
}
|
||||
if (!StringUtils.isBlank((String)syLog.get("js"))){
|
||||
qw.apply("left(create_time,10)<='"+syLog.get("js")+"'");
|
||||
}
|
||||
|
||||
// List list = syLogService.list(qw);
|
||||
IPage<SyLog> page1 = syLogService.page(page, qw);
|
||||
|
||||
|
||||
// System.out.println(page1);
|
||||
return new ResultBean(page1);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/del")
|
||||
public ResultBean del(@RequestBody List<String> delArr) {
|
||||
syLogService.removeByIds(delArr);
|
||||
return new ResultBean();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,31 +0,0 @@
|
||||
package com.dsic.gj_erp.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dsic.gj_erp.bean.sy.DmDepart;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 部门表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xhj
|
||||
* @since 2021-03-23
|
||||
*/
|
||||
@Mapper
|
||||
public interface DmDepartMapper extends BaseMapper<DmDepart> {
|
||||
@Select(value = {"<script>"
|
||||
+ "select depart_code,depart_name from dm_depart "
|
||||
+ " where depart_code in "
|
||||
+ "<foreach collection='ids' item='id' open='(' separator=',' close=')'>"
|
||||
+"#{id}"
|
||||
+"</foreach>"
|
||||
+ "</script>"})
|
||||
List<DmDepart> selectDepartQuery (@Param("ids") List<String> ids);
|
||||
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package com.dsic.gj_erp.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dsic.gj_erp.bean.sy.SyLog;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 系统日志表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xhj
|
||||
* @since 2021-04-08
|
||||
*/
|
||||
public interface SyLogMapper extends BaseMapper<SyLog> {
|
||||
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
package com.dsic.gj_erp.service;
|
||||
|
||||
public interface MyCacheInterface {
|
||||
void refreshRedis();
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package com.dsic.gj_erp.service.cache;
|
||||
|
||||
public interface RedisCacheKeyConfig {
|
||||
//船只信息缓存,对应DmProject
|
||||
String PROJECT_KEY="ZX_ERP::PROJECT";
|
||||
|
||||
//部门缓存
|
||||
String DEPT_KEY="ZX_ERP::DEPT";
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
package com.dsic.gj_erp.service.cache;
|
||||
//缓存读取
|
@ -1,30 +0,0 @@
|
||||
package com.dsic.gj_erp.service.sy;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dsic.gj_erp.bean.ResultBean;
|
||||
import com.dsic.gj_erp.bean.sy.DmDepart;
|
||||
import com.dsic.gj_erp.bean.sy.DmDepartIn;
|
||||
import com.dsic.gj_erp.service.MyCacheInterface;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 部门表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author xhj
|
||||
* @since 2021-03-23
|
||||
*/
|
||||
public interface DmDepartService extends IService<DmDepart>, MyCacheInterface {
|
||||
List<DmDepart> getAll();
|
||||
List<DmDepart> getByCondition(DmDepart dmDepart);
|
||||
List<DmDepart> getByConditionDefaultDepartCode(DmDepartIn dmDepart);
|
||||
List<DmDepart> getAllParent();
|
||||
List<DmDepart> getAllChildren();
|
||||
ResultBean<Integer> addDepart(DmDepart[] dmDeparts);
|
||||
ResultBean<Integer> updateDepart(DmDepart[] dmDeparts);
|
||||
ResultBean<Integer> delDepart(DmDepart[] dmDeparts);
|
||||
ResultBean<List<DmDepart>> selectDepartQuery (List<String> params);
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package com.dsic.gj_erp.service.sy;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dsic.gj_erp.bean.sy.SyLog;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 系统日志表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author xhj
|
||||
* @since 2021-04-08
|
||||
*/
|
||||
public interface SyLogService extends IService<SyLog> {
|
||||
|
||||
}
|
@ -1,240 +0,0 @@
|
||||
package com.dsic.gj_erp.service.sy.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dsic.gj_erp.bean.ResultBean;
|
||||
import com.dsic.gj_erp.bean.sy.DmDepart;
|
||||
import com.dsic.gj_erp.bean.sy.DmDepartIn;
|
||||
import com.dsic.gj_erp.mapper.DmDepartMapper;
|
||||
import com.dsic.gj_erp.service.cache.RedisCacheKeyConfig;
|
||||
import com.dsic.gj_erp.service.sy.DmDepartService;
|
||||
import com.dsic.gj_erp.util.ConditionSelect;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 部门表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author xhj
|
||||
* @since 2021-03-23
|
||||
*/
|
||||
@Service
|
||||
public class DmDepartServiceImpl extends ServiceImpl<DmDepartMapper, DmDepart> implements DmDepartService {
|
||||
|
||||
@Resource
|
||||
private DmDepartMapper dmDepartMapper;
|
||||
|
||||
private HashMap<String, String> departBm = new HashMap<String, String>(){{
|
||||
put("DY", "03");
|
||||
put("GJ", "02");
|
||||
put("TX", "01");
|
||||
put("QC", "06");
|
||||
}};
|
||||
|
||||
/**
|
||||
* 无参查询所有部门
|
||||
* @author 张恩铭
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<DmDepart> getAll() {
|
||||
return this.dmDepartMapper.selectList(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据部门号条件查询部门及其子部门
|
||||
* @author 张恩铭
|
||||
* @param dmDepart
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<DmDepart> getByCondition(DmDepart dmDepart) {
|
||||
ConditionSelect<DmDepart> conditionSelect = new ConditionSelect<>(dmDepart, new QueryWrapper<>(), dmDepartMapper);
|
||||
return conditionSelect.getResultByLikeRight();
|
||||
}
|
||||
|
||||
/**
|
||||
* 部门号模糊查询其他条件指定查询
|
||||
* @param dmDepart
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<DmDepart> getByConditionDefaultDepartCode(DmDepartIn dmDepart) {
|
||||
// System.out.println(dmDepart);
|
||||
// VoToEntity<DmDepartIn, DmDepart> voToEntity = new VoToEntity<>(dmDepart, new DmDepart());
|
||||
// DmDepart eneity = voToEntity.getEneity();
|
||||
// boolean flag = false;
|
||||
// if(dmDepart.getDepartCode().length() >= 2){
|
||||
// for (String key : departBm.keySet()) {
|
||||
// if (dmDepart.getZxtbm().equals(key)){
|
||||
// flag = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// if (flag){
|
||||
// return getByCondition(eneity);
|
||||
// }else{
|
||||
// eneity.setDepartCode(departBm.get(dmDepart.getZxtbm()));
|
||||
// return getByCondition(eneity);
|
||||
// }
|
||||
// }else {
|
||||
// eneity.setDepartCode(departBm.get(dmDepart.getZxtbm()));
|
||||
// return getByCondition(eneity);
|
||||
// }
|
||||
QueryWrapper<DmDepart> qw =new QueryWrapper<>();
|
||||
qw.eq("parent_code",dmDepart.getParentCode());
|
||||
if(StringUtils.isNotBlank(dmDepart.getDepartCode())){
|
||||
qw.eq("depart_code",dmDepart.getDepartCode());
|
||||
}
|
||||
if(StringUtils.isNotBlank(dmDepart.getDepartCode())){
|
||||
qw.eq("depart_code",dmDepart.getDepartCode());
|
||||
}
|
||||
if(StringUtils.isNotBlank(dmDepart.getManuType())){
|
||||
qw.eq("manu_type",dmDepart.getManuType());
|
||||
}
|
||||
if(StringUtils.isNotBlank(dmDepart.getDepartType())){
|
||||
qw.eq("depart_type",dmDepart.getDepartType());
|
||||
}
|
||||
if(StringUtils.isNotBlank(dmDepart.getDepartAttr())){
|
||||
qw.eq("depart_attr",dmDepart.getDepartAttr());
|
||||
}
|
||||
qw.eq(StrUtil.isNotEmpty(dmDepart.getManuFlag()),"manu_flag",dmDepart.getManuFlag());
|
||||
return this.list(qw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有主部门
|
||||
* @author 张恩铭
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<DmDepart> getAllParent() {
|
||||
List<DmDepart> result = new ArrayList<>();
|
||||
List<DmDepart> temp = this.getAll();
|
||||
for (DmDepart d : temp) {
|
||||
if(d.getDepartCode().length() == 2){
|
||||
result.add(d);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有子部门
|
||||
* @author 张恩铭
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<DmDepart> getAllChildren() {
|
||||
List<DmDepart> result = new ArrayList<>();
|
||||
List<DmDepart> temp = this.getAll();
|
||||
for (DmDepart d : temp) {
|
||||
if(d.getDepartCode().length() > 2){
|
||||
result.add(d);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加部门
|
||||
* @author 张恩铭
|
||||
* @param dmDeparts
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ResultBean<Integer> addDepart(DmDepart[] dmDeparts) {
|
||||
int i = 0;
|
||||
for (DmDepart d : dmDeparts) {
|
||||
if(d.getDepartCode() == null || d.getDepartCode().equals("")){
|
||||
continue;
|
||||
}else{
|
||||
DmDepart temp = new DmDepart();
|
||||
temp.setDepartCode(d.getDepartCode());
|
||||
ConditionSelect<DmDepart> conditionSelect = new ConditionSelect<>(temp, new QueryWrapper<>(), this.dmDepartMapper);
|
||||
if(conditionSelect.getResult().size() > 0){
|
||||
continue;
|
||||
}else{
|
||||
if(this.dmDepartMapper.insert(d) == 1) i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
ResultBean<Integer> resultBean = new ResultBean<>();
|
||||
resultBean.setData(i);
|
||||
return resultBean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改部门
|
||||
* @author 张恩铭
|
||||
* @param dmDeparts
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ResultBean<Integer> updateDepart(DmDepart[] dmDeparts) {
|
||||
int i = 0;
|
||||
for (DmDepart d : dmDeparts) {
|
||||
if(d.getDepartCode() == null || d.getDepartCode().equals("")){
|
||||
continue;
|
||||
}else{
|
||||
DmDepart temp = new DmDepart();
|
||||
temp.setDepartCode(d.getDepartCode());
|
||||
ConditionSelect<DmDepart> conditionSelect = new ConditionSelect<>(temp, new QueryWrapper<>(), this.dmDepartMapper);
|
||||
List<DmDepart> result = conditionSelect.getResult();
|
||||
if(result.size() > 0 && !result.get(0).getDepartCode().equals(d.getDepartCode())){
|
||||
continue;
|
||||
}else{
|
||||
if(this.dmDepartMapper.updateById(d) == 1) i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
ResultBean<Integer> resultBean = new ResultBean<>();
|
||||
resultBean.setData(i);
|
||||
return resultBean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除部门
|
||||
* @author 张恩铭
|
||||
* @param dmDeparts
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ResultBean<Integer> delDepart(DmDepart[] dmDeparts) {
|
||||
int i = 0;
|
||||
for (DmDepart d : dmDeparts) {
|
||||
if(this.dmDepartMapper.deleteById(d) == 1) i++;
|
||||
}
|
||||
ResultBean<Integer> resultBean = new ResultBean<>();
|
||||
resultBean.setData(i);
|
||||
return resultBean;
|
||||
}
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public ResultBean<List<DmDepart>> selectDepartQuery( List<String> params) {
|
||||
ResultBean<List<DmDepart>> resultBean = new ResultBean<List<DmDepart>>();
|
||||
resultBean.setData(dmDepartMapper.selectDepartQuery(params));
|
||||
return resultBean;
|
||||
|
||||
}
|
||||
|
||||
@Resource
|
||||
RedisTemplate<String ,Object> redisTemplate;
|
||||
@Override
|
||||
public void refreshRedis() {
|
||||
List<DmDepart> list=this.list();
|
||||
list.forEach(l->redisTemplate.opsForHash().put(RedisCacheKeyConfig.DEPT_KEY,l.getDepartCode(),l));
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package com.dsic.gj_erp.service.sy.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dsic.gj_erp.bean.sy.SyLog;
|
||||
import com.dsic.gj_erp.mapper.SyLogMapper;
|
||||
import com.dsic.gj_erp.service.sy.SyLogService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 系统日志表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author xhj
|
||||
* @since 2021-04-08
|
||||
*/
|
||||
@Service
|
||||
public class SyLogServiceImpl extends ServiceImpl<SyLogMapper, SyLog> implements SyLogService {
|
||||
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.dsic.gj_erp.mapper.DmDepartMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.dsic.gj_erp.bean.sy.DmDepart">
|
||||
<id column="depart_code" property="departCode" />
|
||||
<result column="depart_name" property="departName" />
|
||||
<result column="parent_code" property="parentCode" />
|
||||
<result column="depart_fullname" property="departFullname" />
|
||||
<result column="sort_no" property="sortNo" />
|
||||
<result column="depart_attr" property="departAttr" />
|
||||
<result column="depart_type" property="departType" />
|
||||
<result column="manu_type" property="manuType" />
|
||||
<result column="depart_status" property="departStatus" />
|
||||
<result column="manu_flag" property="manuFlag" />
|
||||
<result column="paint_flag" property="paintFlag" />
|
||||
<result column="dist_flag" property="distFlag" />
|
||||
<result column="charger" property="charger" />
|
||||
<result column="landline_phone" property="landlinePhone" />
|
||||
<result column="mobile_phone" property="mobilePhone" />
|
||||
<result column="remark" property="remark" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
depart_code, depart_name, parent_code, depart_fullname, sort_no, depart_attr, depart_type, manu_type, depart_status, manu_flag, paint_flag, dist_flag, charger, landline_phone, mobile_phone, remark
|
||||
</sql>
|
||||
|
||||
</mapper>
|
@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.dsic.gj_erp.mapper.SyLogMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.dsic.gj_erp.bean.sy.SyLog">
|
||||
<id column="id" property="id" />
|
||||
<result column="user_code" property="userCode" />
|
||||
<result column="user_name" property="userName" />
|
||||
<result column="system_code" property="systemCode" />
|
||||
<result column="system_name" property="systemName" />
|
||||
<result column="content" property="content" />
|
||||
<result column="method" property="method" />
|
||||
<result column="computer_name" property="computerName" />
|
||||
<result column="ip" property="ip" />
|
||||
<result column="create_time" property="createTime" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, user_code, user_name, system_code, system_name, content, method, computer_name, ip, create_time
|
||||
</sql>
|
||||
|
||||
</mapper>
|
Loading…
Reference in new issue