Merge branch 'master' of http://47.115.223.229:8888/yangjun/nursing_unit_java
This commit is contained in:
commit
7b3b5f33af
|
|
@ -0,0 +1,280 @@
|
|||
package com.nu.modules.appConfig.controller;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.nu.modules.appConfig.entity.AppPermissionTree;
|
||||
import com.nu.modules.appConfig.utils.AppPermissionDataUtil;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nu.modules.appConfig.entity.NuAppPermission;
|
||||
import com.nu.modules.appConfig.service.INuAppPermissionService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 菜单表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-31
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="菜单表")
|
||||
@RestController
|
||||
@RequestMapping("/appConfig/nuAppPermission")
|
||||
@Slf4j
|
||||
public class NuAppPermissionController extends JeecgController<NuAppPermission, INuAppPermissionService> {
|
||||
@Autowired
|
||||
private INuAppPermissionService nuAppPermissionService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuAppPermission
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "菜单表-分页列表查询")
|
||||
@ApiOperation(value="菜单表-分页列表查询", notes="菜单表-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<AppPermissionTree>> queryPageList(NuAppPermission nuAppPermission,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
long start = System.currentTimeMillis();
|
||||
Result<List<AppPermissionTree>> result = new Result<>();
|
||||
try {
|
||||
LambdaQueryWrapper<NuAppPermission> query = new LambdaQueryWrapper<NuAppPermission>();
|
||||
query.eq(NuAppPermission::getDelFlag, CommonConstant.DEL_FLAG_0);
|
||||
query.orderByAsc(NuAppPermission::getSortNo);
|
||||
|
||||
//支持通过菜单名字,模糊查询
|
||||
if(oConvertUtils.isNotEmpty(nuAppPermission.getName())){
|
||||
query.like(NuAppPermission::getName, nuAppPermission.getName());
|
||||
}
|
||||
List<NuAppPermission> list = nuAppPermissionService.list(query);
|
||||
List<AppPermissionTree> treeList = new ArrayList<>();
|
||||
|
||||
//如果有菜单名查询条件,则平铺数据 不做上下级
|
||||
if(oConvertUtils.isNotEmpty(nuAppPermission.getName())){
|
||||
if(list!=null && list.size()>0){
|
||||
treeList = list.stream().map(e -> {
|
||||
e.setLeaf(true);
|
||||
return new AppPermissionTree(e);
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
}else{
|
||||
getTreeList(treeList, list, null);
|
||||
}
|
||||
result.setResult(treeList);
|
||||
result.setSuccess(true);
|
||||
log.info("======获取全部菜单数据=====耗时:" + (System.currentTimeMillis() - start) + "毫秒");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param permission
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "菜单表-添加")
|
||||
@ApiOperation(value="菜单表-添加", notes="菜单表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<NuAppPermission> add(@RequestBody NuAppPermission permission) {
|
||||
Result<NuAppPermission> result = new Result<NuAppPermission>();
|
||||
try {
|
||||
permission = AppPermissionDataUtil.intelligentProcessData(permission);
|
||||
nuAppPermissionService.addPermission(permission);
|
||||
result.success("添加成功!");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500("操作失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param permission
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "菜单表-编辑")
|
||||
@ApiOperation(value="菜单表-编辑", notes="菜单表-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<NuAppPermission> edit(@RequestBody NuAppPermission permission) {
|
||||
Result<NuAppPermission> result = new Result<>();
|
||||
try {
|
||||
permission = AppPermissionDataUtil.intelligentProcessData(permission);
|
||||
nuAppPermissionService.editPermission(permission);
|
||||
result.success("修改成功!");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500("操作失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "菜单表-通过id删除")
|
||||
@ApiOperation(value="菜单表-通过id删除", notes="菜单表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
nuAppPermissionService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "菜单表-批量删除")
|
||||
@ApiOperation(value="菜单表-批量删除", notes="菜单表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.nuAppPermissionService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "菜单表-通过id查询")
|
||||
@ApiOperation(value="菜单表-通过id查询", notes="菜单表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<NuAppPermission> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
NuAppPermission nuAppPermission = nuAppPermissionService.getById(id);
|
||||
if(nuAppPermission==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuAppPermission);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param nuAppPermission
|
||||
*/
|
||||
@RequiresPermissions("appConfig:nu_app_permission:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, NuAppPermission nuAppPermission) {
|
||||
return super.exportXls(request, nuAppPermission, NuAppPermission.class, "菜单表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("appConfig:nu_app_permission:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, NuAppPermission.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验角色编码唯一
|
||||
*/
|
||||
@RequestMapping(value = "/checkRoleCode", method = RequestMethod.GET)
|
||||
public Result<Boolean> checkUsername(String id,String roleCode) {
|
||||
Result<Boolean> result = new Result<>();
|
||||
//如果此参数为false则程序发生异常
|
||||
result.setResult(true);
|
||||
log.info("--验证角色编码是否唯一---id:"+id+"--roleCode:"+roleCode);
|
||||
try {
|
||||
NuAppPermission role = null;
|
||||
if(oConvertUtils.isNotEmpty(id)) {
|
||||
role = nuAppPermissionService.getById(id);
|
||||
}
|
||||
//SysRole newRole = sysRoleService.getOne(new QueryWrapper<SysRole>().lambda().eq(SysRole::getRoleCode, roleCode));
|
||||
NuAppPermission newRole = nuAppPermissionService.getRoleNoTenant(roleCode);
|
||||
if(newRole!=null) {
|
||||
//如果根据传入的roleCode查询到信息了,那么就需要做校验了。
|
||||
if(role==null) {
|
||||
//role为空=>新增模式=>只要roleCode存在则返回false
|
||||
result.setSuccess(false);
|
||||
result.setMessage("角色编码已存在");
|
||||
return result;
|
||||
}else if(!id.equals(newRole.getId())) {
|
||||
//否则=>编辑模式=>判断两者ID是否一致-
|
||||
result.setSuccess(false);
|
||||
result.setMessage("角色编码已存在");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
result.setSuccess(false);
|
||||
result.setResult(false);
|
||||
result.setMessage(e.getMessage());
|
||||
return result;
|
||||
}
|
||||
result.setSuccess(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private void getTreeList(List<AppPermissionTree> treeList, List<NuAppPermission> metaList, AppPermissionTree temp) {
|
||||
for (NuAppPermission permission : metaList) {
|
||||
String tempPid = permission.getParentId();
|
||||
AppPermissionTree tree = new AppPermissionTree(permission);
|
||||
if (temp == null && oConvertUtils.isEmpty(tempPid)) {
|
||||
treeList.add(tree);
|
||||
if (!tree.getIsLeaf()) {
|
||||
getTreeList(treeList, metaList, tree);
|
||||
}
|
||||
} else if (temp != null && tempPid != null && tempPid.equals(temp.getId())) {
|
||||
temp.getChildren().add(tree);
|
||||
if (!tree.getIsLeaf()) {
|
||||
getTreeList(treeList, metaList, tree);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,439 @@
|
|||
package com.nu.modules.appConfig.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 菜单树,封装树结构
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
public class AppPermissionTree implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
private String key;
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 父id
|
||||
*/
|
||||
private String parentId;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 菜单权限编码
|
||||
*/
|
||||
private String perms;
|
||||
/**
|
||||
* 权限策略1显示2禁用
|
||||
*/
|
||||
private String permsType;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 组件
|
||||
*/
|
||||
private String component;
|
||||
|
||||
/**
|
||||
* 组件名字
|
||||
*/
|
||||
private String componentName;
|
||||
|
||||
/**
|
||||
* 跳转网页链接
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 一级菜单跳转地址
|
||||
*/
|
||||
private String redirect;
|
||||
|
||||
/**
|
||||
* 菜单排序
|
||||
*/
|
||||
private Double sortNo;
|
||||
|
||||
/**
|
||||
* 类型(0:一级菜单;1:子菜单 ;2:按钮权限)
|
||||
*/
|
||||
private Integer menuType;
|
||||
|
||||
/**
|
||||
* 是否叶子节点: 1:是 0:不是
|
||||
*/
|
||||
private boolean isLeaf;
|
||||
|
||||
/**
|
||||
* 是否路由菜单: 0:不是 1:是(默认值1)
|
||||
*/
|
||||
private boolean route;
|
||||
|
||||
|
||||
/**
|
||||
* 是否路缓存页面: 0:不是 1:是(默认值1)
|
||||
*/
|
||||
private boolean keepAlive;
|
||||
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 删除状态 0正常 1已删除
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**alwaysShow*/
|
||||
private boolean alwaysShow;
|
||||
/**是否隐藏路由菜单: 0否,1是(默认值0)*/
|
||||
private boolean hidden;
|
||||
|
||||
/**按钮权限状态(0无效1有效)*/
|
||||
private String status;
|
||||
|
||||
/*update_begin author:wuxianquan date:20190908 for:model增加字段 */
|
||||
/** 外链菜单打开方式 0/内部打开 1/外部打开 */
|
||||
private boolean internalOrExternal;
|
||||
/*update_end author:wuxianquan date:20190908 for:model增加字段 */
|
||||
|
||||
/*update_begin author:liusq date:20230601 for:【issues/4986】model增加hideTab字段 */
|
||||
/**
|
||||
* 是否隐藏Tab: 0否,1是(默认值0)
|
||||
*/
|
||||
private boolean hideTab;
|
||||
/*update_end author:liusq date:20230601 for:【issues/4986】model增加hideTab字段 */
|
||||
|
||||
private String menuCode;
|
||||
|
||||
public AppPermissionTree() {
|
||||
}
|
||||
|
||||
public AppPermissionTree(NuAppPermission permission) {
|
||||
this.key = permission.getId();
|
||||
this.id = permission.getId();
|
||||
this.perms = permission.getPerms();
|
||||
this.permsType = permission.getPermsType();
|
||||
this.component = permission.getComponent();
|
||||
this.componentName = permission.getComponentName();
|
||||
this.createBy = permission.getCreateBy();
|
||||
this.createTime = permission.getCreateTime();
|
||||
this.delFlag = permission.getDelFlag();
|
||||
this.description = permission.getDescription();
|
||||
this.icon = permission.getIcon();
|
||||
this.isLeaf = permission.isLeaf();
|
||||
this.menuType = permission.getMenuType();
|
||||
this.name = permission.getName();
|
||||
this.parentId = permission.getParentId();
|
||||
this.sortNo = permission.getSortNo();
|
||||
this.updateBy = permission.getUpdateBy();
|
||||
this.updateTime = permission.getUpdateTime();
|
||||
this.redirect = permission.getRedirect();
|
||||
this.url = permission.getUrl();
|
||||
this.hidden = permission.isHidden();
|
||||
this.route = permission.isRoute();
|
||||
this.keepAlive = permission.isKeepAlive();
|
||||
this.alwaysShow= permission.isAlwaysShow();
|
||||
/*update_begin author:wuxianquan date:20190908 for:赋值 */
|
||||
this.internalOrExternal = permission.isInternalOrExternal();
|
||||
/*update_end author:wuxianquan date:20190908 for:赋值 */
|
||||
this.title=permission.getName();
|
||||
/*update_end author:liusq date:20230601 for:【issues/4986】model增加hideTab字段 */
|
||||
this.hideTab = permission.isHideTab();
|
||||
/*update_end author:liusq date:20230601 for:【issues/4986】model增加hideTab字段 */
|
||||
if (!permission.isLeaf()) {
|
||||
this.children = new ArrayList<AppPermissionTree>();
|
||||
}
|
||||
this.status = permission.getStatus();
|
||||
this.menuCode = permission.getMenuCode();
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
private List<AppPermissionTree> children;
|
||||
|
||||
public boolean isLeaf() {
|
||||
return isLeaf;
|
||||
}
|
||||
|
||||
public void setLeaf(boolean leaf) {
|
||||
isLeaf = leaf;
|
||||
}
|
||||
|
||||
public boolean isKeepAlive() {
|
||||
return keepAlive;
|
||||
}
|
||||
|
||||
public void setKeepAlive(boolean keepAlive) {
|
||||
this.keepAlive = keepAlive;
|
||||
}
|
||||
|
||||
public boolean isAlwaysShow() {
|
||||
return alwaysShow;
|
||||
}
|
||||
|
||||
public void setAlwaysShow(boolean alwaysShow) {
|
||||
this.alwaysShow = alwaysShow;
|
||||
}
|
||||
public List<AppPermissionTree> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<AppPermissionTree> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public String getRedirect() {
|
||||
return redirect;
|
||||
}
|
||||
|
||||
public void setRedirect(String redirect) {
|
||||
this.redirect = redirect;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public boolean isHidden() {
|
||||
return hidden;
|
||||
}
|
||||
|
||||
public void setHidden(boolean hidden) {
|
||||
this.hidden = hidden;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public String getComponent() {
|
||||
return component;
|
||||
}
|
||||
|
||||
public void setComponent(String component) {
|
||||
this.component = component;
|
||||
}
|
||||
|
||||
public String getComponentName() {
|
||||
return componentName;
|
||||
}
|
||||
|
||||
public void setComponentName(String componentName) {
|
||||
this.componentName = componentName;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public Double getSortNo() {
|
||||
return sortNo;
|
||||
}
|
||||
|
||||
public void setSortNo(Double sortNo) {
|
||||
this.sortNo = sortNo;
|
||||
}
|
||||
|
||||
public Integer getMenuType() {
|
||||
return menuType;
|
||||
}
|
||||
|
||||
public void setMenuType(Integer menuType) {
|
||||
this.menuType = menuType;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public boolean isRoute() {
|
||||
return route;
|
||||
}
|
||||
|
||||
public void setRoute(boolean route) {
|
||||
this.route = route;
|
||||
}
|
||||
|
||||
public Integer getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public void setDelFlag(Integer delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String getPerms() {
|
||||
return perms;
|
||||
}
|
||||
|
||||
public void setPerms(String perms) {
|
||||
this.perms = perms;
|
||||
}
|
||||
|
||||
public boolean getIsLeaf() {
|
||||
return isLeaf;
|
||||
}
|
||||
|
||||
public void setIsLeaf(boolean isLeaf) {
|
||||
this.isLeaf = isLeaf;
|
||||
}
|
||||
|
||||
public String getPermsType() {
|
||||
return permsType;
|
||||
}
|
||||
|
||||
public void setPermsType(String permsType) {
|
||||
this.permsType = permsType;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
/*update_begin author:wuxianquan date:20190908 for:get set方法 */
|
||||
public boolean isInternalOrExternal() {
|
||||
return internalOrExternal;
|
||||
}
|
||||
|
||||
public void setInternalOrExternal(boolean internalOrExternal) {
|
||||
this.internalOrExternal = internalOrExternal;
|
||||
}
|
||||
/*update_end author:wuxianquan date:20190908 for:get set 方法 */
|
||||
|
||||
public boolean isHideTab() {
|
||||
return hideTab;
|
||||
}
|
||||
|
||||
public void setHideTab(boolean hideTab) {
|
||||
this.hideTab = hideTab;
|
||||
}
|
||||
|
||||
public String getMenuCode() {
|
||||
return menuCode;
|
||||
}
|
||||
|
||||
public void setMenuCode(String menuCode) {
|
||||
this.menuCode = menuCode;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.nu.modules.appConfig.entity;
|
||||
|
||||
/**
|
||||
* 默认首页常量
|
||||
*/
|
||||
public interface DefIndexConst {
|
||||
|
||||
/**
|
||||
* 默认首页的roleCode
|
||||
*/
|
||||
String DEF_INDEX_ALL = "DEF_INDEX_ALL";
|
||||
|
||||
/**
|
||||
* 默认首页的缓存key
|
||||
*/
|
||||
String CACHE_KEY = "sys:cache:def_index";
|
||||
|
||||
/**
|
||||
* 默认首页的初始值
|
||||
*/
|
||||
String DEF_INDEX_NAME = "首页";
|
||||
String DEF_INDEX_URL = "/dashboard/analysis";
|
||||
String DEF_INDEX_COMPONENT = "dashboard/Analysis";
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,196 @@
|
|||
package com.nu.modules.appConfig.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 菜单表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-31
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_app_permission")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_app_permission对象", description="菜单表")
|
||||
public class NuAppPermission implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 父id
|
||||
*/
|
||||
private String parentId;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 菜单权限编码,例如:“sys:schedule:list,sys:schedule:info”,多个逗号隔开
|
||||
*/
|
||||
private String perms;
|
||||
/**
|
||||
* 权限策略1显示2禁用
|
||||
*/
|
||||
private String permsType;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 组件
|
||||
*/
|
||||
private String component;
|
||||
|
||||
/**
|
||||
* 组件名字
|
||||
*/
|
||||
private String componentName;
|
||||
|
||||
/**
|
||||
* 路径
|
||||
*/
|
||||
private String url;
|
||||
/**
|
||||
* 一级菜单跳转地址
|
||||
*/
|
||||
private String redirect;
|
||||
|
||||
/**
|
||||
* 菜单排序
|
||||
*/
|
||||
private Double sortNo;
|
||||
|
||||
/**
|
||||
* 类型(0:一级菜单;1:子菜单 ;2:按钮权限)
|
||||
*/
|
||||
@Dict(dicCode = "menu_type")
|
||||
private Integer menuType;
|
||||
|
||||
/**
|
||||
* 是否叶子节点: 1:是 0:不是
|
||||
*/
|
||||
@TableField(value="is_leaf")
|
||||
private boolean leaf;
|
||||
|
||||
/**
|
||||
* 是否路由菜单: 0:不是 1:是(默认值1)
|
||||
*/
|
||||
@TableField(value="is_route")
|
||||
private boolean route;
|
||||
|
||||
|
||||
/**
|
||||
* 是否缓存页面: 0:不是 1:是(默认值1)
|
||||
*/
|
||||
@TableField(value="keep_alive")
|
||||
private boolean keepAlive;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 删除状态 0正常 1已删除
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 是否配置菜单的数据权限 1是0否 默认0
|
||||
*/
|
||||
private Integer ruleFlag;
|
||||
|
||||
/**
|
||||
* 是否隐藏路由菜单: 0否,1是(默认值0)
|
||||
*/
|
||||
private boolean hidden;
|
||||
|
||||
/**
|
||||
* 是否隐藏Tab: 0否,1是(默认值0)
|
||||
*/
|
||||
private boolean hideTab;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**按钮权限状态(0无效1有效)*/
|
||||
private java.lang.String status;
|
||||
|
||||
/**alwaysShow*/
|
||||
private boolean alwaysShow;
|
||||
|
||||
private String menuCode;
|
||||
|
||||
/*update_begin author:wuxianquan date:20190908 for:实体增加字段 */
|
||||
/** 外链菜单打开方式 0/内部打开 1/外部打开 */
|
||||
private boolean internalOrExternal;
|
||||
/*update_end author:wuxianquan date:20190908 for:实体增加字段 */
|
||||
|
||||
public NuAppPermission() {
|
||||
|
||||
}
|
||||
public NuAppPermission(boolean index) {
|
||||
if(index) {
|
||||
this.id = "9502685863ab87f0ad1134142788a385";
|
||||
this.name = DefIndexConst.DEF_INDEX_NAME;
|
||||
this.component = DefIndexConst.DEF_INDEX_COMPONENT;
|
||||
this.componentName = "dashboard-analysis";
|
||||
this.url = DefIndexConst.DEF_INDEX_URL;
|
||||
this.icon="home";
|
||||
this.menuType=0;
|
||||
this.sortNo=0.0;
|
||||
this.ruleFlag=0;
|
||||
this.delFlag=0;
|
||||
this.alwaysShow=false;
|
||||
this.route=true;
|
||||
this.keepAlive=true;
|
||||
this.leaf=true;
|
||||
this.hidden=false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,183 @@
|
|||
package com.nu.modules.appConfig.entity;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 树形列表用到
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
public class TreeModel implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 4013193970046502756L;
|
||||
|
||||
private String key;
|
||||
|
||||
private String title;
|
||||
|
||||
private String slotTitle;
|
||||
|
||||
private boolean isLeaf;
|
||||
|
||||
private String icon;
|
||||
|
||||
private Integer ruleFlag;
|
||||
|
||||
private Map<String,String> scopedSlots;
|
||||
|
||||
public Map<String, String> getScopedSlots() {
|
||||
return scopedSlots;
|
||||
}
|
||||
|
||||
public void setScopedSlots(Map<String, String> scopedSlots) {
|
||||
this.scopedSlots = scopedSlots;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public boolean getIsLeaf() {
|
||||
return isLeaf;
|
||||
}
|
||||
|
||||
public void setIsLeaf(boolean isLeaf) {
|
||||
this.isLeaf = isLeaf;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
private List<TreeModel> children;
|
||||
|
||||
public List<TreeModel> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<TreeModel> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public TreeModel() {
|
||||
|
||||
}
|
||||
|
||||
public TreeModel(NuAppPermission permission) {
|
||||
this.key = permission.getId();
|
||||
this.icon = permission.getIcon();
|
||||
this.parentId = permission.getParentId();
|
||||
this.title = permission.getName();
|
||||
this.slotTitle = permission.getName();
|
||||
this.value = permission.getId();
|
||||
this.isLeaf = permission.isLeaf();
|
||||
this.label = permission.getName();
|
||||
if(!permission.isLeaf()) {
|
||||
this.children = new ArrayList<TreeModel>();
|
||||
}
|
||||
}
|
||||
|
||||
public TreeModel(String key, String parentId, String slotTitle, Integer ruleFlag, boolean isLeaf,String code) {
|
||||
this.key = key;
|
||||
this.parentId = parentId;
|
||||
this.ruleFlag=ruleFlag;
|
||||
this.slotTitle = slotTitle;
|
||||
Map<String,String> map = new HashMap(5);
|
||||
map.put("title", "hasDatarule");
|
||||
this.scopedSlots = map;
|
||||
this.isLeaf = isLeaf;
|
||||
this.value = key;
|
||||
this.code = code;
|
||||
if(!isLeaf) {
|
||||
this.children = new ArrayList<TreeModel>();
|
||||
}
|
||||
}
|
||||
|
||||
private String parentId;
|
||||
|
||||
private String label;
|
||||
|
||||
private String value;
|
||||
private String code;
|
||||
|
||||
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the label
|
||||
*/
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param label the label to set
|
||||
*/
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the value
|
||||
*/
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param value the value to set
|
||||
*/
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getSlotTitle() {
|
||||
return slotTitle;
|
||||
}
|
||||
|
||||
public void setSlotTitle(String slotTitle) {
|
||||
this.slotTitle = slotTitle;
|
||||
}
|
||||
|
||||
public Integer getRuleFlag() {
|
||||
return ruleFlag;
|
||||
}
|
||||
|
||||
public void setRuleFlag(Integer ruleFlag) {
|
||||
this.ruleFlag = ruleFlag;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.nu.modules.appConfig.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.appConfig.entity.NuAppPermission;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
/**
|
||||
* @Description: 菜单表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-31
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface NuAppPermissionMapper extends BaseMapper<NuAppPermission> {
|
||||
|
||||
NuAppPermission getRoleNoTenant(@Param("roleCode") String roleCode);
|
||||
|
||||
@Update("update nu_app_permission set is_leaf=#{leaf} where id = #{id}")
|
||||
public int setMenuLeaf(@Param("id") String id,@Param("leaf") int leaf);
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?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.nu.modules.appConfig.mapper.NuAppPermissionMapper">
|
||||
|
||||
<select id="getRoleNoTenant" resultType="com.nu.modules.appConfig.entity.NuAppPermission">
|
||||
SELECT * from nu_app_permission
|
||||
WHERE menu_code = #{roleCode}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.nu.modules.appConfig.service;
|
||||
|
||||
import com.nu.modules.appConfig.entity.NuAppPermission;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 菜单表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-31
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface INuAppPermissionService extends IService<NuAppPermission> {
|
||||
|
||||
NuAppPermission getRoleNoTenant(String roleCode);
|
||||
|
||||
void addPermission(NuAppPermission permission);
|
||||
|
||||
void editPermission(NuAppPermission permission);
|
||||
}
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
package com.nu.modules.appConfig.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nu.modules.appConfig.entity.NuAppPermission;
|
||||
import com.nu.modules.appConfig.mapper.NuAppPermissionMapper;
|
||||
import com.nu.modules.appConfig.service.INuAppPermissionService;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.exception.JeecgBootException;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 菜单表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-31
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class NuAppPermissionServiceImpl extends ServiceImpl<NuAppPermissionMapper, NuAppPermission> implements INuAppPermissionService {
|
||||
|
||||
@Override
|
||||
public NuAppPermission getRoleNoTenant(String roleCode) {
|
||||
return baseMapper.getRoleNoTenant(roleCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPermission(NuAppPermission sysPermission) {
|
||||
//----------------------------------------------------------------------
|
||||
//判断是否是一级菜单,是的话清空父菜单
|
||||
if(CommonConstant.MENU_TYPE_0.equals(sysPermission.getMenuType())) {
|
||||
sysPermission.setParentId(null);
|
||||
}
|
||||
//----------------------------------------------------------------------
|
||||
String pid = sysPermission.getParentId();
|
||||
if(oConvertUtils.isNotEmpty(pid)) {
|
||||
//设置父节点不为叶子节点
|
||||
this.baseMapper.setMenuLeaf(pid, 0);
|
||||
}
|
||||
sysPermission.setCreateTime(new Date());
|
||||
sysPermission.setDelFlag(0);
|
||||
sysPermission.setLeaf(true);
|
||||
this.save(sysPermission);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editPermission(NuAppPermission sysPermission) {
|
||||
NuAppPermission p = this.getById(sysPermission.getId());
|
||||
//TODO 该节点判断是否还有子节点
|
||||
if(p==null) {
|
||||
throw new JeecgBootException("未找到菜单信息");
|
||||
}else {
|
||||
sysPermission.setUpdateTime(new Date());
|
||||
//----------------------------------------------------------------------
|
||||
//Step1.判断是否是一级菜单,是的话清空父菜单ID
|
||||
if(CommonConstant.MENU_TYPE_0.equals(sysPermission.getMenuType())) {
|
||||
sysPermission.setParentId("");
|
||||
}
|
||||
//Step2.判断菜单下级是否有菜单,无则设置为叶子节点
|
||||
Long count = this.count(new QueryWrapper<NuAppPermission>().lambda().eq(NuAppPermission::getParentId, sysPermission.getId()));
|
||||
if(count==0) {
|
||||
sysPermission.setLeaf(true);
|
||||
}
|
||||
//----------------------------------------------------------------------
|
||||
this.updateById(sysPermission);
|
||||
|
||||
//如果当前菜单的父菜单变了,则需要修改新父菜单和老父菜单的,叶子节点状态
|
||||
String pid = sysPermission.getParentId();
|
||||
boolean flag = (oConvertUtils.isNotEmpty(pid) && !pid.equals(p.getParentId())) || oConvertUtils.isEmpty(pid)&&oConvertUtils.isNotEmpty(p.getParentId());
|
||||
if (flag) {
|
||||
//a.设置新的父菜单不为叶子节点
|
||||
this.baseMapper.setMenuLeaf(pid, 0);
|
||||
//b.判断老的菜单下是否还有其他子菜单,没有的话则设置为叶子节点
|
||||
Long cc = this.count(new QueryWrapper<NuAppPermission>().lambda().eq(NuAppPermission::getParentId, p.getParentId()));
|
||||
if(cc==0) {
|
||||
if(oConvertUtils.isNotEmpty(p.getParentId())) {
|
||||
this.baseMapper.setMenuLeaf(p.getParentId(), 1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
package com.nu.modules.appConfig.utils;
|
||||
|
||||
import com.nu.modules.appConfig.entity.NuAppPermission;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.constant.SymbolConstant;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: scott
|
||||
* @Date: 2019-04-03
|
||||
*/
|
||||
public class AppPermissionDataUtil {
|
||||
|
||||
/**
|
||||
* 路径:views/
|
||||
*/
|
||||
private static final String PATH_VIEWS = "views/";
|
||||
|
||||
/**
|
||||
* 路径:src/views/
|
||||
*/
|
||||
private static final String PATH_SRC_VIEWS = "src/views/";
|
||||
|
||||
/**
|
||||
* .vue后缀
|
||||
*/
|
||||
private static final String VUE_SUFFIX = ".vue";
|
||||
|
||||
/**
|
||||
* 智能处理错误数据,简化用户失误操作
|
||||
*
|
||||
* @param permission
|
||||
*/
|
||||
public static NuAppPermission intelligentProcessData(NuAppPermission permission) {
|
||||
if (permission == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 组件
|
||||
if (oConvertUtils.isNotEmpty(permission.getComponent())) {
|
||||
String component = permission.getComponent();
|
||||
if (component.startsWith(SymbolConstant.SINGLE_SLASH)) {
|
||||
component = component.substring(1);
|
||||
}
|
||||
if (component.startsWith(PATH_VIEWS)) {
|
||||
component = component.replaceFirst(PATH_VIEWS, "");
|
||||
}
|
||||
if (component.startsWith(PATH_SRC_VIEWS)) {
|
||||
component = component.replaceFirst(PATH_SRC_VIEWS, "");
|
||||
}
|
||||
if (component.endsWith(VUE_SUFFIX)) {
|
||||
component = component.replace(VUE_SUFFIX, "");
|
||||
}
|
||||
permission.setComponent(component);
|
||||
}
|
||||
|
||||
// 请求URL
|
||||
if (oConvertUtils.isNotEmpty(permission.getUrl())) {
|
||||
String url = permission.getUrl();
|
||||
if (url.endsWith(VUE_SUFFIX)) {
|
||||
url = url.replace(VUE_SUFFIX, "");
|
||||
}
|
||||
if (!url.startsWith(CommonConstant.STR_HTTP) && !url.startsWith(SymbolConstant.SINGLE_SLASH)&&!url.trim().startsWith(SymbolConstant.DOUBLE_LEFT_CURLY_BRACKET)) {
|
||||
url = SymbolConstant.SINGLE_SLASH + url;
|
||||
}
|
||||
permission.setUrl(url);
|
||||
}
|
||||
|
||||
// 一级菜单默认组件
|
||||
if (0 == permission.getMenuType() && oConvertUtils.isEmpty(permission.getComponent())) {
|
||||
// 一级菜单默认组件
|
||||
permission.setComponent("layouts/RouteView");
|
||||
}
|
||||
return permission;
|
||||
}
|
||||
|
||||
/**
|
||||
* 如果没有index页面 需要new 一个放到list中
|
||||
* @param metaList
|
||||
*/
|
||||
// public static void addIndexPage(List<NuAppPermission> metaList) {
|
||||
// boolean hasIndexMenu = false;
|
||||
// SysRoleIndex defIndexCfg = PermissionDataUtil.getDefIndexConfig();
|
||||
// for (SysPermission sysPermission : metaList) {
|
||||
// if(defIndexCfg.getUrl().equals(sysPermission.getUrl())) {
|
||||
// hasIndexMenu = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// if(!hasIndexMenu) {
|
||||
// metaList.add(0,new SysPermission(true));
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 判断是否授权首页
|
||||
* @param metaList
|
||||
* @return
|
||||
*/
|
||||
// public static boolean hasIndexPage(List<NuAppPermission> metaList, SysRoleIndex defIndexCfg){
|
||||
// boolean hasIndexMenu = false;
|
||||
// for (NuAppPermission sysPermission : metaList) {
|
||||
// if(defIndexCfg.getUrl().equals(sysPermission.getUrl())) {
|
||||
// hasIndexMenu = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// return hasIndexMenu;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 通过id判断是否授权某个页面
|
||||
*
|
||||
* @param metaList
|
||||
* @return
|
||||
*/
|
||||
public static boolean hasMenuById(List<NuAppPermission> metaList, String id) {
|
||||
for (NuAppPermission sysPermission : metaList) {
|
||||
if (id.equals(sysPermission.getId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取默认首页配置
|
||||
*/
|
||||
// public static SysRoleIndex getDefIndexConfig() {
|
||||
// ISysRoleIndexService sysRoleIndexService = SpringContextUtils.getBean(ISysRoleIndexService.class);
|
||||
// return sysRoleIndexService.queryDefaultIndex();
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
@ -69,5 +69,11 @@
|
|||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-employee-local-api</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
package com.nu.modules.employess;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nu.modules.IEmployeesInfoApi;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 获取常用信息(不涉及安全信息)
|
||||
* @author zmy
|
||||
* @date 2025-5-22 08:43:05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/employessInfo")
|
||||
public class EmployessApi {
|
||||
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IEmployeesInfoApi employeesInfoApi;
|
||||
|
||||
/**
|
||||
* 返回机构信息配置的"协议域名"
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getPermissionList")
|
||||
public Result<?> getPermissionList(String employessId){
|
||||
if (StringUtils.isBlank(employessId)){
|
||||
return Result.error("参数错误");
|
||||
}
|
||||
List<Map<String ,String>> result = employeesInfoApi.getPermissionList(employessId);
|
||||
return Result.ok(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -43,7 +43,7 @@ public class InvoicingPddApi {
|
|||
return Result.error("参数错误,请选择库房");
|
||||
}
|
||||
Map<String,Object> result = pddApi.addPddMain(invoicingPddMainEntity);
|
||||
if (StringUtils.equals("true",result.get("success").toString())){
|
||||
if ((boolean)result.get("success")){
|
||||
return Result.OK(result.get("message"));
|
||||
}else{
|
||||
return Result.error(result.get("message").toString());
|
||||
|
|
@ -74,7 +74,7 @@ public class InvoicingPddApi {
|
|||
return Result.error("参数错误,请填写盘点数量");
|
||||
}
|
||||
Map<String,Object> result = pddApi.editPddInfo(invoicingPddInfoEntity);
|
||||
if (StringUtils.equals("true",result.get("success").toString())){
|
||||
if ((boolean)result.get("success")){
|
||||
// Map<String,Object> map = new HashMap<>();
|
||||
// map.put("message","操作成功");
|
||||
// map.put("data",result.get("message"));
|
||||
|
|
@ -92,7 +92,7 @@ public class InvoicingPddApi {
|
|||
return Result.error("参数错误,请选择盘点单");
|
||||
}
|
||||
Map<String,Object> result = pddApi.submitPddMain(invoicingPddMainEntity);
|
||||
if (StringUtils.equals("true",result.get("success").toString())){
|
||||
if ((boolean)result.get("success")){
|
||||
return Result.OK(result.get("message"));
|
||||
}else{
|
||||
return Result.error(result.get("message").toString());
|
||||
|
|
@ -119,7 +119,7 @@ public class InvoicingPddApi {
|
|||
return Result.error("参数错误,请选择盘点单");
|
||||
}
|
||||
Map<String,Object> result = pddApi.voidedPddMain(invoicingPddMainEntity);
|
||||
if (StringUtils.equals("true",result.get("success").toString())){
|
||||
if ((boolean)result.get("success")){
|
||||
return Result.OK(result.get("message"));
|
||||
}else{
|
||||
return Result.error(result.get("message").toString());
|
||||
|
|
@ -146,11 +146,11 @@ public class InvoicingPddApi {
|
|||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = pddApi.startDirectiveServe(dto);
|
||||
if ("0".equals(result.get("error_code"))) {
|
||||
return Result.OK(result.get("msg"));
|
||||
Map<String, Object> result = pddApi.startDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("msg"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -167,11 +167,11 @@ public class InvoicingPddApi {
|
|||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = pddApi.finishDirectiveServe(dto);
|
||||
if ("0".equals(result.get("error_code"))) {
|
||||
return Result.OK(result.get("msg"));
|
||||
Map<String, Object> result = pddApi.finishDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("msg"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -226,11 +226,11 @@ public class InvoicingQldApi {
|
|||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = qinglingApi.startDirectiveServe(dto);
|
||||
if ("0".equals(result.get("error_code"))) {
|
||||
return Result.OK(result.get("msg"));
|
||||
Map<String, Object> result = qinglingApi.startDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("msg"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -247,11 +247,11 @@ public class InvoicingQldApi {
|
|||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = qinglingApi.finishDirectiveServe(dto);
|
||||
if ("0".equals(result.get("error_code"))) {
|
||||
return Result.OK(result.get("msg"));
|
||||
Map<String, Object> result = qinglingApi.finishDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("msg"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -265,17 +265,20 @@ public class InvoicingQldApi {
|
|||
@AutoLog(value = "请领单-提交请领单", clientType = "app")
|
||||
@PostMapping(value = "/submitQld")
|
||||
public Result<?> submitQld(@RequestBody InvoicingQldGwcEntity dto) {
|
||||
//判断库房是否正在盘点中
|
||||
Map<String, Object> izPd = pddApi.queryPddStartInfo(null);
|
||||
if (izPd.get("success") != null && !(Boolean) izPd.get("success")) {
|
||||
return Result.error((String) izPd.get("message"));
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(dto.getNuId()) || StringUtils.isBlank(dto.getElderId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
return Result.ok(qinglingApi.submitQld(dto));
|
||||
|
||||
//判断库房是否正在盘点中
|
||||
Map<String, Object> pdResult = pddApi.queryPddStartInfo(null);
|
||||
if (!(boolean)pdResult.get("success")) {
|
||||
return Result.error(pdResult.get("message").toString());
|
||||
}
|
||||
Map<String, Object> result = qinglingApi.submitQld(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -321,14 +324,14 @@ public class InvoicingQldApi {
|
|||
if (StringUtils.isBlank(dto.getQldNo())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = qinglingApi.cancellation(dto);
|
||||
if ("success".equals(result.get("status"))) {
|
||||
Map<String, Object> result = qinglingApi.cancellation(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
Map<String, Object> r_ = Maps.newHashMap();
|
||||
r_.put("result", qinglingApi.queryQldByQldNo(dto.getQldNo()));
|
||||
r_.put("message", "作废成功");
|
||||
return Result.OK(r_);
|
||||
} else {
|
||||
return Result.error(result.get("message"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -363,23 +366,22 @@ public class InvoicingQldApi {
|
|||
@AutoLog(value = "请领单-确认收货", clientType = "app")
|
||||
@PostMapping(value = "/confirmReceipt")
|
||||
public Result<?> confirmReceipt(@RequestBody InvoicingQldMainEntity dto) {
|
||||
//库房是否正在盘点中
|
||||
Map<String, Object> izPd = pddApi.queryPddStartInfo(null);
|
||||
if (izPd.get("success") != null && !(Boolean) izPd.get("success")) {
|
||||
return Result.error((String) izPd.get("message"));
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(dto.getQldNo()) || StringUtils.isBlank(dto.getNuId()) || StringUtils.isBlank(dto.getElderId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = qinglingApi.confirmReceipt(dto);
|
||||
if ("success".equals(result.get("status"))) {
|
||||
//库房是否正在盘点中
|
||||
Map<String, Object> pdResult = pddApi.queryPddStartInfo(null);
|
||||
if (!(boolean) pdResult.get("success")) {
|
||||
return Result.error(pdResult.get("message").toString());
|
||||
}
|
||||
Map<String, Object> result = qinglingApi.confirmReceipt(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
Map<String, Object> r_ = Maps.newHashMap();
|
||||
r_.put("result", qinglingApi.queryQldByQldNo(dto.getQldNo()));
|
||||
r_.put("message", "收货成功");
|
||||
return Result.OK(r_);
|
||||
} else {
|
||||
return Result.error(result.get("message"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -396,14 +398,14 @@ public class InvoicingQldApi {
|
|||
if (StringUtils.isBlank(dto.getQldNo())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = qinglingApi.orderReturn(dto);
|
||||
if ("success".equals(result.get("status"))) {
|
||||
Map<String, Object> result = qinglingApi.orderReturn(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
Map<String, Object> r_ = Maps.newHashMap();
|
||||
r_.put("result", qinglingApi.queryQldByQldNo(dto.getQldNo()));
|
||||
r_.put("message", "回退成功");
|
||||
return Result.OK(r_);
|
||||
} else {
|
||||
return Result.error(result.get("message"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -417,12 +419,6 @@ public class InvoicingQldApi {
|
|||
@AutoLog(value = "请领单-出库(单个/批量)", clientType = "app")
|
||||
@PostMapping(value = "/outbound")
|
||||
public Result<Map<String, Object>> outbound(@RequestBody InvoicingQldMainEntity dto) {
|
||||
//判断库房是否正在盘点中
|
||||
Map<String, Object> izPd = pddApi.queryPddStartInfo(null);
|
||||
if (izPd.get("success") != null && !(Boolean) izPd.get("success")) {
|
||||
return Result.error((String) izPd.get("message"));
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(dto.getQldNo())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
|
|
@ -430,7 +426,17 @@ public class InvoicingQldApi {
|
|||
if (dto.getQldNo().indexOf(",") > 0) {
|
||||
return Result.error("出库失败");
|
||||
}
|
||||
return Result.ok(qinglingApi.outbound(dto));
|
||||
//判断库房是否正在盘点中
|
||||
Map<String, Object> pdResult = pddApi.queryPddStartInfo(null);
|
||||
if (!(boolean)pdResult.get("success")) {
|
||||
return Result.error(pdResult.get("message").toString());
|
||||
}
|
||||
Map<String, Object> result = qinglingApi.outbound(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.ok(result);
|
||||
} else {
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -74,11 +74,11 @@ public class InvoicingThdApi {
|
|||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = tuiHuoApi.startDirectiveServe(dto);
|
||||
if ("0".equals(result.get("error_code"))) {
|
||||
return Result.OK(result.get("msg"));
|
||||
Map<String, Object> result = tuiHuoApi.startDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("msg"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -95,11 +95,11 @@ public class InvoicingThdApi {
|
|||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
boolean result = tuiHuoApi.startServe(dto);
|
||||
if (result) {
|
||||
return Result.OK("操作成功");
|
||||
Map<String, Object> result = tuiHuoApi.startServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error("操作失败");
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -120,7 +120,12 @@ public class InvoicingThdApi {
|
|||
if (dto.getThNum() == null || dto.getThNum() == 0) {
|
||||
return Result.error("未填写退货数量");
|
||||
}
|
||||
return Result.ok(tuiHuoApi.addThc(dto));
|
||||
Map<String, Object> result = tuiHuoApi.addThc(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -193,18 +198,17 @@ public class InvoicingThdApi {
|
|||
public Result<?> submitThd(@RequestBody InvoicingThdMainEntity dto) {
|
||||
//库房是否正在盘点中
|
||||
Map<String, Object> izPd = pddApi.queryPddStartInfo(null);
|
||||
if (izPd.get("success") != null && !(Boolean) izPd.get("success")) {
|
||||
return Result.error((String) izPd.get("message"));
|
||||
if (!(boolean) izPd.get("success")) {
|
||||
return Result.error(izPd.get("message").toString());
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = tuiHuoApi.submitThd(dto);
|
||||
if ("success".equals(result.get("status"))) {
|
||||
return Result.OK("入库成功");
|
||||
Map<String, Object> result = tuiHuoApi.submitThd(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("message"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -221,11 +225,11 @@ public class InvoicingThdApi {
|
|||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = tuiHuoApi.finishDirectiveServe(dto);
|
||||
if ("0".equals(result.get("error_code"))) {
|
||||
return Result.OK(result.get("msg"));
|
||||
Map<String, Object> result = tuiHuoApi.finishDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("msg"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -242,11 +246,11 @@ public class InvoicingThdApi {
|
|||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
boolean result = tuiHuoApi.finishServe(dto);
|
||||
if (result) {
|
||||
return Result.OK("操作成功");
|
||||
Map<String, Object> result = tuiHuoApi.finishServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error("操作失败");
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -284,11 +288,11 @@ public class InvoicingThdApi {
|
|||
if (StringUtils.isBlank(dto.getNuId()) || StringUtils.isBlank(dto.getElderId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String,String> result = tuiHuoApi.requireTH(dto);
|
||||
if (result.get("error_code").equals("0")) {
|
||||
return Result.OK("操作成功");
|
||||
Map<String, Object> result = tuiHuoApi.requireTH(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("msg"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ public class ShiroConfig {
|
|||
filterChainDefinitionMap.put("/api/tplink/videoStorage/**", "anon"); //视频缓存存储接口
|
||||
filterChainDefinitionMap.put("/api/pad/invoicing/getShareInfoByCgdId", "anon"); //查询采购单信息(分享接口使用)
|
||||
// filterChainDefinitionMap.put("/api/pad/invoicing/pdd/**", "anon"); //查询盘点单
|
||||
// filterChainDefinitionMap.put("/api/employessInfo/**", "anon"); //测试员工接口
|
||||
// filterChainDefinitionMap.put("/api/pad/invoicing/**", "anon"); //测试进销存对应的接口
|
||||
// filterChainDefinitionMap.put("/api/pad/qingling/**", "anon"); //测试请领对应的接口
|
||||
// filterChainDefinitionMap.put("/api/pad/care/**", "anon"); //服务指令
|
||||
|
|
|
|||
|
|
@ -90,6 +90,8 @@ public class NuBaseInfoEntity implements Serializable {
|
|||
//长者信息
|
||||
private ElderInfoEntity elderInfo;
|
||||
|
||||
private List<NuidPermissionEntity> permissionList;
|
||||
|
||||
private java.lang.String fzr;
|
||||
|
||||
private java.lang.String fzrTel;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: nu_app_nuid_permission
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_app_nuid_permission")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_app_nuid_permission对象", description="nu_app_nuid_permission")
|
||||
public class NuidPermissionEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
/**角色id*/
|
||||
@Excel(name = "角色id", width = 15)
|
||||
@ApiModelProperty(value = "角色id")
|
||||
private String roleId;
|
||||
/**权限id*/
|
||||
@Excel(name = "权限id", width = 15)
|
||||
@ApiModelProperty(value = "权限id")
|
||||
private String permissionId;
|
||||
/**数据权限ids*/
|
||||
@Excel(name = "数据权限ids", width = 15)
|
||||
@ApiModelProperty(value = "数据权限ids")
|
||||
private String dataRuleIds;
|
||||
/**操作时间*/
|
||||
@Excel(name = "操作时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "操作时间")
|
||||
private Date operateDate;
|
||||
/**操作ip*/
|
||||
@Excel(name = "操作ip", width = 15)
|
||||
@ApiModelProperty(value = "操作ip")
|
||||
private String operateIp;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String menuName;
|
||||
@TableField(exist = false)
|
||||
private String menuCode;
|
||||
|
||||
|
||||
|
||||
public NuidPermissionEntity(String roleId, String permissionId) {
|
||||
this.roleId = roleId;
|
||||
this.permissionId = permissionId;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package com.nu.modules;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IEmployeesInfoApi {
|
||||
List<Map<String ,String>> getPermissionList(String employessId);
|
||||
}
|
||||
|
|
@ -45,6 +45,18 @@
|
|||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-admin-biz</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-nu-biz</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,24 @@
|
|||
package com.nu.modules.employeesInfo.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nu.modules.IEmployeesInfoApi;
|
||||
import com.nu.modules.employeesInfo.entity.BizEmployeesInfo;
|
||||
import com.nu.modules.employeesInfo.mapper.BizEmployeesInfoMapper;
|
||||
import com.nu.modules.employeesInfo.service.IBizEmployeesInfoService;
|
||||
import com.nu.modules.employessPermission.entity.NuAppEmployessPermission;
|
||||
import com.nu.modules.employessPermission.service.INuAppEmployessPermissionService;
|
||||
import com.nu.modules.nuidPermission.entity.NuAppNuidPermission;
|
||||
import com.nu.modules.nuidPermission.service.INuAppNuidPermissionService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 员工信息
|
||||
* @Author: jeecg-boot
|
||||
|
|
@ -14,6 +26,21 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class BizEmployeesInfoServiceImpl extends ServiceImpl<BizEmployeesInfoMapper, BizEmployeesInfo> implements IBizEmployeesInfoService {
|
||||
public class BizEmployeesInfoServiceImpl extends ServiceImpl<BizEmployeesInfoMapper, BizEmployeesInfo> implements IBizEmployeesInfoService, IEmployeesInfoApi {
|
||||
|
||||
@Autowired
|
||||
private INuAppEmployessPermissionService nuAppEmployessPermissionService;
|
||||
|
||||
@Override
|
||||
public List<Map<String ,String>> getPermissionList(String employessId) {
|
||||
List<Map<String ,String>> mapList = new ArrayList<>();
|
||||
List<NuAppEmployessPermission> permissionList = nuAppEmployessPermissionService.listByEmployessId(employessId);
|
||||
for(NuAppEmployessPermission par:permissionList){
|
||||
Map<String,String> map = new HashMap<>();
|
||||
map.put("menuName", par.getMenuName());
|
||||
map.put("menuCode", par.getMenuCode());
|
||||
mapList.add(map);
|
||||
}
|
||||
return mapList;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,288 @@
|
|||
package com.nu.modules.employessPermission.controller;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.nu.modules.appConfig.entity.NuAppPermission;
|
||||
import com.nu.modules.appConfig.entity.TreeModel;
|
||||
import com.nu.modules.appConfig.service.INuAppPermissionService;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nu.modules.employessPermission.entity.NuAppEmployessPermission;
|
||||
import com.nu.modules.employessPermission.service.INuAppEmployessPermissionService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecg.modules.base.service.BaseCommonService;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: nu_app_employess_permission
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="nu_app_employess_permission")
|
||||
@RestController
|
||||
@RequestMapping("/employessPermission/nuAppEmployessPermission")
|
||||
@Slf4j
|
||||
public class NuAppEmployessPermissionController extends JeecgController<NuAppEmployessPermission, INuAppEmployessPermissionService> {
|
||||
@Autowired
|
||||
private INuAppEmployessPermissionService nuAppEmployessPermissionService;
|
||||
|
||||
@Autowired
|
||||
private INuAppPermissionService nuAppPermissionService;
|
||||
@Autowired
|
||||
private BaseCommonService baseCommonService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuAppEmployessPermission
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "nu_app_employess_permission-分页列表查询")
|
||||
@ApiOperation(value="nu_app_employess_permission-分页列表查询", notes="nu_app_employess_permission-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<NuAppEmployessPermission>> queryPageList(NuAppEmployessPermission nuAppEmployessPermission,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<NuAppEmployessPermission> queryWrapper = QueryGenerator.initQueryWrapper(nuAppEmployessPermission, req.getParameterMap());
|
||||
Page<NuAppEmployessPermission> page = new Page<NuAppEmployessPermission>(pageNo, pageSize);
|
||||
IPage<NuAppEmployessPermission> pageList = nuAppEmployessPermissionService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param nuAppEmployessPermission
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "nu_app_employess_permission-添加")
|
||||
@ApiOperation(value="nu_app_employess_permission-添加", notes="nu_app_employess_permission-添加")
|
||||
@RequiresPermissions("employessPermission:nu_app_employess_permission:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody NuAppEmployessPermission nuAppEmployessPermission) {
|
||||
nuAppEmployessPermissionService.save(nuAppEmployessPermission);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param nuAppEmployessPermission
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "nu_app_employess_permission-编辑")
|
||||
@ApiOperation(value="nu_app_employess_permission-编辑", notes="nu_app_employess_permission-编辑")
|
||||
@RequiresPermissions("employessPermission:nu_app_employess_permission:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody NuAppEmployessPermission nuAppEmployessPermission) {
|
||||
nuAppEmployessPermissionService.updateById(nuAppEmployessPermission);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "nu_app_employess_permission-通过id删除")
|
||||
@ApiOperation(value="nu_app_employess_permission-通过id删除", notes="nu_app_employess_permission-通过id删除")
|
||||
@RequiresPermissions("employessPermission:nu_app_employess_permission:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
nuAppEmployessPermissionService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "nu_app_employess_permission-批量删除")
|
||||
@ApiOperation(value="nu_app_employess_permission-批量删除", notes="nu_app_employess_permission-批量删除")
|
||||
@RequiresPermissions("employessPermission:nu_app_employess_permission:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.nuAppEmployessPermissionService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "nu_app_employess_permission-通过id查询")
|
||||
@ApiOperation(value="nu_app_employess_permission-通过id查询", notes="nu_app_employess_permission-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<NuAppEmployessPermission> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
NuAppEmployessPermission nuAppEmployessPermission = nuAppEmployessPermissionService.getById(id);
|
||||
if(nuAppEmployessPermission==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuAppEmployessPermission);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param nuAppEmployessPermission
|
||||
*/
|
||||
@RequiresPermissions("employessPermission:nu_app_employess_permission:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, NuAppEmployessPermission nuAppEmployessPermission) {
|
||||
return super.exportXls(request, nuAppEmployessPermission, NuAppEmployessPermission.class, "nu_app_employess_permission");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("employessPermission:nu_app_employess_permission:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, NuAppEmployessPermission.class);
|
||||
}
|
||||
/**
|
||||
* 用户角色授权功能,查询菜单权限树
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/queryTreeList", method = RequestMethod.GET)
|
||||
public Result<Map<String,Object>> queryTreeList(HttpServletRequest request) {
|
||||
Result<Map<String,Object>> result = new Result<>();
|
||||
//全部权限ids
|
||||
List<String> ids = new ArrayList<>();
|
||||
try {
|
||||
LambdaQueryWrapper<NuAppPermission> query = new LambdaQueryWrapper<NuAppPermission>();
|
||||
query.eq(NuAppPermission::getDelFlag, CommonConstant.DEL_FLAG_0);
|
||||
query.orderByAsc(NuAppPermission::getSortNo);
|
||||
List<NuAppPermission> list = nuAppPermissionService.list(query);
|
||||
for(NuAppPermission sysPer : list) {
|
||||
ids.add(sysPer.getId());
|
||||
}
|
||||
List<TreeModel> treeList = new ArrayList<>();
|
||||
getTreeModelList(treeList, list, null);
|
||||
Map<String,Object> resMap = new HashMap(5);
|
||||
//全部树节点数据
|
||||
resMap.put("treeList", treeList);
|
||||
//全部树ids
|
||||
resMap.put("ids", ids);
|
||||
result.setResult(resMap);
|
||||
result.setSuccess(true);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private void getTreeModelList(List<TreeModel> treeList, List<NuAppPermission> metaList, TreeModel temp) {
|
||||
for (NuAppPermission permission : metaList) {
|
||||
String tempPid = permission.getParentId();
|
||||
TreeModel tree = new TreeModel(permission.getId(), tempPid, permission.getName(),permission.getRuleFlag(), permission.isLeaf(),permission.getMenuCode());
|
||||
if(temp==null && oConvertUtils.isEmpty(tempPid)) {
|
||||
treeList.add(tree);
|
||||
if(!tree.getIsLeaf()) {
|
||||
getTreeModelList(treeList, metaList, tree);
|
||||
}
|
||||
}else if(temp!=null && tempPid!=null && tempPid.equals(temp.getKey())){
|
||||
temp.getChildren().add(tree);
|
||||
if(!tree.getIsLeaf()) {
|
||||
getTreeModelList(treeList, metaList, tree);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询角色授权
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/queryEmployessPermission", method = RequestMethod.GET)
|
||||
public Result<List<String>> queryEmployessPermission(@RequestParam(name = "employessId", required = true) String employessId) {
|
||||
Result<List<String>> result = new Result<>();
|
||||
try {
|
||||
List<NuAppEmployessPermission> list = nuAppEmployessPermissionService.list(new QueryWrapper<NuAppEmployessPermission>().lambda().eq(NuAppEmployessPermission::getRoleId, employessId));
|
||||
result.setResult(list.stream().map(sysRolePermission -> String.valueOf(sysRolePermission.getPermissionId())).collect(Collectors.toList()));
|
||||
result.setSuccess(true);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存角色授权
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/saveRolePermission", method = RequestMethod.POST)
|
||||
// @RequiresPermissions("system:permission:saveRole")
|
||||
public Result<String> saveRolePermission(@RequestBody JSONObject json) {
|
||||
long start = System.currentTimeMillis();
|
||||
Result<String> result = new Result<>();
|
||||
try {
|
||||
String roleId = json.getString("roleId");
|
||||
String permissionIds = json.getString("permissionIds");
|
||||
String lastPermissionIds = json.getString("lastpermissionIds");
|
||||
this.nuAppEmployessPermissionService.saveRolePermission(roleId, permissionIds, lastPermissionIds);
|
||||
//update-begin---author:wangshuai ---date:20220316 for:[VUEN-234]用户管理角色授权添加敏感日志------------
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
baseCommonService.addLog("修改角色ID: "+roleId+" 的权限配置,操作人: " +loginUser.getUsername() ,CommonConstant.LOG_TYPE_2, 2);
|
||||
//update-end---author:wangshuai ---date:20220316 for:[VUEN-234]用户管理角色授权添加敏感日志------------
|
||||
result.success("保存成功!");
|
||||
log.info("======角色授权成功=====耗时:" + (System.currentTimeMillis() - start) + "毫秒");
|
||||
|
||||
} catch (Exception e) {
|
||||
result.error500("授权失败!");
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package com.nu.modules.employessPermission.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: nu_app_employess_permission
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_app_employess_permission")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_app_employess_permission对象", description="nu_app_employess_permission")
|
||||
public class NuAppEmployessPermission implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**角色id*/
|
||||
@Excel(name = "角色id", width = 15)
|
||||
@ApiModelProperty(value = "角色id")
|
||||
private java.lang.String roleId;
|
||||
/**权限id*/
|
||||
@Excel(name = "权限id", width = 15)
|
||||
@ApiModelProperty(value = "权限id")
|
||||
private java.lang.String permissionId;
|
||||
/**数据权限ids*/
|
||||
@Excel(name = "数据权限ids", width = 15)
|
||||
@ApiModelProperty(value = "数据权限ids")
|
||||
private java.lang.String dataRuleIds;
|
||||
/**操作时间*/
|
||||
@Excel(name = "操作时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "操作时间")
|
||||
private java.util.Date operateDate;
|
||||
/**操作ip*/
|
||||
@Excel(name = "操作ip", width = 15)
|
||||
@ApiModelProperty(value = "操作ip")
|
||||
private java.lang.String operateIp;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String menuName;
|
||||
@TableField(exist = false)
|
||||
private String menuCode;
|
||||
|
||||
|
||||
public NuAppEmployessPermission(String roleId, String permissionId) {
|
||||
this.roleId = roleId;
|
||||
this.permissionId = permissionId;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.nu.modules.employessPermission.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nu.modules.nuidPermission.entity.NuAppNuidPermission;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.employessPermission.entity.NuAppEmployessPermission;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: nu_app_employess_permission
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface NuAppEmployessPermissionMapper extends BaseMapper<NuAppEmployessPermission> {
|
||||
|
||||
List<NuAppEmployessPermission> listByEmployessId(@Param("roleId") String employessId);
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?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.nu.modules.employessPermission.mapper.NuAppEmployessPermissionMapper">
|
||||
<select id="listByEmployessId" resultType="com.nu.modules.employessPermission.entity.NuAppEmployessPermission">
|
||||
select a.*,b.name as menu_name,b.menu_code from nu_app_employess_permission a
|
||||
left join nu_app_permission b on a.permission_id = b.id
|
||||
<where>
|
||||
<if test="roleId != null and roleId !=''">
|
||||
and a.role_id = #{roleId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.nu.modules.employessPermission.service;
|
||||
|
||||
import com.nu.modules.employessPermission.entity.NuAppEmployessPermission;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.nuidPermission.entity.NuAppNuidPermission;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: nu_app_employess_permission
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface INuAppEmployessPermissionService extends IService<NuAppEmployessPermission> {
|
||||
|
||||
void saveRolePermission(String roleId, String permissionIds, String lastPermissionIds);
|
||||
|
||||
List<NuAppEmployessPermission> listByEmployessId(String employessId);
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package com.nu.modules.employessPermission.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nu.modules.employessPermission.entity.NuAppEmployessPermission;
|
||||
import com.nu.modules.employessPermission.mapper.NuAppEmployessPermissionMapper;
|
||||
import com.nu.modules.employessPermission.service.INuAppEmployessPermissionService;
|
||||
import com.nu.modules.nuidPermission.entity.NuAppNuidPermission;
|
||||
import org.jeecg.common.util.IpUtils;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: nu_app_employess_permission
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class NuAppEmployessPermissionServiceImpl extends ServiceImpl<NuAppEmployessPermissionMapper, NuAppEmployessPermission> implements INuAppEmployessPermissionService {
|
||||
|
||||
@Override
|
||||
public void saveRolePermission(String roleId, String permissionIds, String lastPermissionIds) {
|
||||
String ip = "";
|
||||
try {
|
||||
//获取request
|
||||
HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
|
||||
//获取IP地址
|
||||
ip = IpUtils.getIpAddr(request);
|
||||
} catch (Exception e) {
|
||||
ip = "127.0.0.1";
|
||||
}
|
||||
List<String> add = getDiff(lastPermissionIds,permissionIds);
|
||||
if(add!=null && add.size()>0) {
|
||||
List<NuAppEmployessPermission> list = new ArrayList<NuAppEmployessPermission>();
|
||||
for (String p : add) {
|
||||
if(oConvertUtils.isNotEmpty(p)) {
|
||||
NuAppEmployessPermission rolepms = new NuAppEmployessPermission(roleId, p);
|
||||
rolepms.setOperateDate(new Date());
|
||||
rolepms.setOperateIp(ip);
|
||||
list.add(rolepms);
|
||||
}
|
||||
}
|
||||
this.saveBatch(list);
|
||||
}
|
||||
|
||||
List<String> delete = getDiff(permissionIds,lastPermissionIds);
|
||||
if(delete!=null && delete.size()>0) {
|
||||
for (String permissionId : delete) {
|
||||
this.remove(new QueryWrapper<NuAppEmployessPermission>().lambda().eq(NuAppEmployessPermission::getRoleId, roleId).eq(NuAppEmployessPermission::getPermissionId, permissionId));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NuAppEmployessPermission> listByEmployessId(String employessId) {
|
||||
return baseMapper.listByEmployessId(employessId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 从diff中找出main中没有的元素
|
||||
* @param main
|
||||
* @param diff
|
||||
* @return
|
||||
*/
|
||||
private List<String> getDiff(String main,String diff){
|
||||
if(oConvertUtils.isEmpty(diff)) {
|
||||
return null;
|
||||
}
|
||||
if(oConvertUtils.isEmpty(main)) {
|
||||
return Arrays.asList(diff.split(","));
|
||||
}
|
||||
|
||||
String[] mainArr = main.split(",");
|
||||
String[] diffArr = diff.split(",");
|
||||
Map<String, Integer> map = new HashMap(5);
|
||||
for (String string : mainArr) {
|
||||
map.put(string, 1);
|
||||
}
|
||||
List<String> res = new ArrayList<String>();
|
||||
for (String key : diffArr) {
|
||||
if(oConvertUtils.isNotEmpty(key) && !map.containsKey(key)) {
|
||||
res.add(key);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
@ -25,7 +25,7 @@ public interface IPddApi {
|
|||
|
||||
Map<String, Object> queryPddStartInfo(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||
|
||||
Map<String, String> startDirectiveServe(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||
Map<String, Object> startDirectiveServe(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||
|
||||
Map<String, String> finishDirectiveServe(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||
Map<String, Object> finishDirectiveServe(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,11 +37,11 @@ public interface IQinglingApi {
|
|||
|
||||
boolean transRead(InvoicingQldMainEntity dto);
|
||||
|
||||
Map<String, String> cancellation(InvoicingQldMainEntity dto);
|
||||
Map<String, Object> cancellation(InvoicingQldMainEntity dto);
|
||||
|
||||
Map<String, String> confirmReceipt(InvoicingQldMainEntity dto);
|
||||
Map<String, Object> confirmReceipt(InvoicingQldMainEntity dto);
|
||||
|
||||
Map<String, String> orderReturn(InvoicingQldMainEntity dto);
|
||||
Map<String, Object> orderReturn(InvoicingQldMainEntity dto);
|
||||
|
||||
Map<String, Object> outbound(InvoicingQldMainEntity dto);
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ public interface IQinglingApi {
|
|||
|
||||
InvoicingQldMainEntity queryQldByQldNo(String qldNo);
|
||||
|
||||
Map<String, String> startDirectiveServe(InvoicingQldQueryEntity dto);
|
||||
Map<String, Object> startDirectiveServe(InvoicingQldQueryEntity dto);
|
||||
|
||||
Map<String, String> finishDirectiveServe(InvoicingQldQueryEntity dto);
|
||||
Map<String, Object> finishDirectiveServe(InvoicingQldQueryEntity dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ public interface ITuiHuoApi {
|
|||
|
||||
List<NuKcslEntity> thdNuMaterialList(InvoicingThdMainEntity dto);
|
||||
|
||||
Map<String, String> startDirectiveServe(InvoicingThdMainEntity dto);
|
||||
Map<String, Object> startDirectiveServe(InvoicingThdMainEntity dto);
|
||||
|
||||
boolean startServe(InvoicingThdMainEntity dto);
|
||||
Map<String, Object> startServe(InvoicingThdMainEntity dto);
|
||||
|
||||
Map<String,Object> addThc(InvoicingThdGwcEntity dto);
|
||||
|
||||
|
|
@ -28,15 +28,15 @@ public interface ITuiHuoApi {
|
|||
|
||||
boolean removeAll(InvoicingThdGwcEntity dto);
|
||||
|
||||
Map<String,String> submitThd(InvoicingThdMainEntity dto);
|
||||
Map<String,Object> submitThd(InvoicingThdMainEntity dto);
|
||||
|
||||
Map<String, String> finishDirectiveServe(InvoicingThdMainEntity dto);
|
||||
Map<String, Object> finishDirectiveServe(InvoicingThdMainEntity dto);
|
||||
|
||||
boolean finishServe(InvoicingThdMainEntity dto);
|
||||
Map<String, Object> finishServe(InvoicingThdMainEntity dto);
|
||||
|
||||
boolean transRead(InvoicingThdMainEntity dto);
|
||||
|
||||
Map<String,String> requireTH(InvoicingThdMainEntity dto);
|
||||
Map<String,Object> requireTH(InvoicingThdMainEntity dto);
|
||||
|
||||
List<NuKcslEntity> thdMaterialList(InvoicingThdMainEntity dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
private DictUtils dictUtils;
|
||||
@Autowired
|
||||
private IInvoicingOrdersApi invoicingOrdersApi;
|
||||
@Autowired
|
||||
private IInvoicingPdOrdersApi invoicingPdOrdersApi;
|
||||
// @Autowired
|
||||
// private IInvoicingPdOrdersApi invoicingPdOrdersApi;
|
||||
|
||||
@Override
|
||||
public IPage<InvoicingPddMainEntity> queryPddList(Integer pageNo, Integer pageSize, InvoicingPddMainEntity invoicingPddMainEntity, HttpServletRequest req) {
|
||||
|
|
@ -102,7 +102,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
|
||||
List<NuInvoicingPddMain> list = baseMapper.selectList(new QueryWrapper<NuInvoicingPddMain>().eq("nu_id",invoicingPddMainEntity.getNuId()).eq("pdd_type","1"));
|
||||
if(list.size() > 0){
|
||||
map.put("success","false");
|
||||
map.put("success",false);
|
||||
map.put("message","盘点单已存在,不可重复创建");
|
||||
return map;
|
||||
}
|
||||
|
|
@ -138,7 +138,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
|
||||
redisUtil.set("pdd"+qgdDate,qgdXlhInt);
|
||||
invoicingPddMainEntity.setPddType_dictText("盘点中");
|
||||
map.put("success","true");
|
||||
map.put("success",true);
|
||||
map.put("message",invoicingPddMainEntity);
|
||||
return map;
|
||||
}
|
||||
|
|
@ -198,7 +198,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
nuInvoicingPddMain.setPydNum(pydNum);
|
||||
nuInvoicingPddMain.setPkdNum(pkdNum);
|
||||
baseMapper.updateById(nuInvoicingPddMain);
|
||||
map.put("success","true");
|
||||
map.put("success",true);
|
||||
map.put("message",nuInvoicingPddInfo);
|
||||
return map;
|
||||
}
|
||||
|
|
@ -215,7 +215,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
}
|
||||
NuInvoicingPddMain nuInvoicingPddMainInfo =baseMapper.selectById(invoicingPddMainEntity.getId());
|
||||
if(!StringUtils.equals("1",nuInvoicingPddMainInfo.getPddType())){
|
||||
map.put("success","false");
|
||||
map.put("success",false);
|
||||
map.put("message","盘点单状态不是盘点中,不能提交盘点单");
|
||||
return map;
|
||||
}
|
||||
|
|
@ -229,7 +229,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
}
|
||||
}
|
||||
if(sfwc == 1){
|
||||
map.put("success","false");
|
||||
map.put("success",false);
|
||||
map.put("message","有未完成的盘点信息,不能提交盘点单");
|
||||
return map;
|
||||
}
|
||||
|
|
@ -292,7 +292,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
}
|
||||
}
|
||||
|
||||
map.put("success","true");
|
||||
map.put("success",true);
|
||||
map.put("message","操作成功");
|
||||
return map;
|
||||
}
|
||||
|
|
@ -320,7 +320,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
}
|
||||
NuInvoicingPddMain nuInvoicingPddMainInfo =baseMapper.selectById(invoicingPddMainEntity.getId());
|
||||
if(!StringUtils.equals("1",nuInvoicingPddMainInfo.getPddType())){
|
||||
map.put("success","false");
|
||||
map.put("success",false);
|
||||
map.put("message","盘点单状态不是盘点中,不能作废盘点单");
|
||||
return map;
|
||||
}
|
||||
|
|
@ -334,7 +334,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
nuInvoicingPddMainInfo.setPddStatus("3");
|
||||
nuInvoicingPddMainInfo.setPddType("3");
|
||||
baseMapper.updateById(nuInvoicingPddMainInfo);
|
||||
map.put("success","true");
|
||||
map.put("success",true);
|
||||
map.put("message","操作成功");
|
||||
return map;
|
||||
}
|
||||
|
|
@ -349,7 +349,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
return map;
|
||||
}
|
||||
map.put("success",true);
|
||||
map.put("message","操作成功");
|
||||
map.put("message","入库成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -360,12 +360,12 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> startDirectiveServe(InvoicingPddInfoEntity dto) {
|
||||
public Map<String, Object> startDirectiveServe(InvoicingPddInfoEntity dto) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
orderEntity.setId(dto.getId());//指令id
|
||||
orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
Map<String, String> result = invoicingOrdersApi.beginOrder(orderEntity);
|
||||
Map<String, Object> result = invoicingOrdersApi.beginOrder(orderEntity);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -376,7 +376,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> finishDirectiveServe(InvoicingPddInfoEntity dto){
|
||||
public Map<String, Object> finishDirectiveServe(InvoicingPddInfoEntity dto){
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
p_.setId(dto.getId());
|
||||
|
|
|
|||
|
|
@ -106,8 +106,8 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
private QingLingServiceImpl ownService;
|
||||
@Autowired
|
||||
private IInvoicingOrdersApi invoicingOrdersApi;
|
||||
@Autowired
|
||||
private IInvoicingQlOrdersApi invoicingQlOrdersApi;
|
||||
// @Autowired
|
||||
// private IInvoicingQlOrdersApi invoicingQlOrdersApi;
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getMaterialTreeData(MaterialCategoryEntity materialCategoryEntity) {
|
||||
|
|
@ -287,8 +287,8 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
|
||||
//检测是否可以正常提交
|
||||
if (!invoicingQldLogService.opeNodeJudgeCanStatus(dto.getQldNo(), "3")) {
|
||||
result.put("status", "faild");
|
||||
result.put("message", "提交失败,请重新提交");
|
||||
result.put("success", false);
|
||||
result.put("message", "提交失败");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -297,8 +297,8 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
infoQW.eq("qld_no", dto.getQldNo());
|
||||
List<NuInvoicingQldInfo> infoList = invoicingQldInfoMapper.selectList(infoQW);
|
||||
if (CollectionUtils.isEmpty(infoList)) {
|
||||
result.put("status", "faild");
|
||||
result.put("message", "不存在物料,无法提交");
|
||||
result.put("success", false);
|
||||
result.put("message", "物料不存在");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -330,7 +330,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
one.setTjTime(new Date());//作废时间
|
||||
invoicingQldMainService.updateById(one);
|
||||
|
||||
result.put("status", "success");
|
||||
result.put("success", true);
|
||||
result.put("message", "提交成功");
|
||||
result.put("result", ownService.queryQldByQldNo(dto.getQldNo()));
|
||||
return result;
|
||||
|
|
@ -371,7 +371,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
|
||||
//请购车未添加物料
|
||||
if (CollectionUtils.isEmpty(gwcList)) {
|
||||
result.put("status", "empty");
|
||||
result.put("success", false);
|
||||
result.put("message", "请选择请领物料");
|
||||
return result;
|
||||
}
|
||||
|
|
@ -393,14 +393,15 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
.collect(Collectors.toList());
|
||||
|
||||
if (!CollectionUtils.isEmpty(disabledWlList)) {
|
||||
result.put("status", "exist");
|
||||
result.put("existList", disabledWlList);
|
||||
// result.put("status", "exist");
|
||||
// result.put("existList", disabledWlList);
|
||||
|
||||
// 将materialName用顿号拼接
|
||||
String materialNames = disabledWlList.stream()
|
||||
.map(InvoicingQldInfoEntity::getMaterialName)
|
||||
.collect(Collectors.joining("、"));
|
||||
result.put("message", "以下物料请领中,请勿重复请领:" + materialNames);
|
||||
result.put("success", false);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -502,7 +503,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
logData.setElderId(dto.getElderId());//长者id
|
||||
invoicingQldLogMapper.insert(logData);
|
||||
|
||||
result.put("status", "success");
|
||||
result.put("success", true);
|
||||
result.put("message", "提交成功");
|
||||
|
||||
// InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
|
|
@ -616,12 +617,12 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> cancellation(InvoicingQldMainEntity dto) {
|
||||
Map<String, String> result = Maps.newHashMap();
|
||||
public Map<String, Object> cancellation(InvoicingQldMainEntity dto) {
|
||||
Map<String, Object> result = Maps.newHashMap();
|
||||
//检测是否可以正常作废
|
||||
if (!invoicingQldLogService.opeNodeJudgeCanStatus(dto.getQldNo(), "1,3")) {
|
||||
result.put("status", "faild");
|
||||
result.put("message", "请先开始指令");
|
||||
result.put("success", false);
|
||||
result.put("message", "作废失败");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -691,7 +692,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
// invoicingQlOrdersApi.flowQlzf(orderEntity);
|
||||
// }
|
||||
invoicingQldMainService.updateById(one);
|
||||
result.put("status", "success");
|
||||
result.put("success", true);
|
||||
result.put("message", "作废成功");
|
||||
return result;
|
||||
}
|
||||
|
|
@ -729,8 +730,8 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> confirmReceipt(InvoicingQldMainEntity dto) {
|
||||
Map<String, String> result = Maps.newHashMap();
|
||||
public Map<String, Object> confirmReceipt(InvoicingQldMainEntity dto) {
|
||||
Map<String, Object> result = Maps.newHashMap();
|
||||
|
||||
//检测是否已经开始服务
|
||||
// {
|
||||
|
|
@ -747,7 +748,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
|
||||
//检测是否可以正常收货
|
||||
if (!invoicingQldLogService.opeNodeJudgeCanStatus(dto.getQldNo(), "4")) {
|
||||
result.put("status", "faild");
|
||||
result.put("success", false);
|
||||
result.put("message", "收货失败");
|
||||
return result;
|
||||
}
|
||||
|
|
@ -914,7 +915,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
}
|
||||
});
|
||||
warehouseMaterialInfoService.updateBatchById(kfUpdateList);
|
||||
result.put("status", "success");
|
||||
result.put("success", true);
|
||||
result.put("message", "收货完成");
|
||||
return result;
|
||||
}
|
||||
|
|
@ -927,8 +928,8 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> orderReturn(InvoicingQldMainEntity dto) {
|
||||
Map<String, String> result = Maps.newHashMap();
|
||||
public Map<String, Object> orderReturn(InvoicingQldMainEntity dto) {
|
||||
Map<String, Object> result = Maps.newHashMap();
|
||||
//检测是否已经开始服务
|
||||
// {
|
||||
// InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
|
|
@ -944,7 +945,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
|
||||
//检测是否可以正常回退
|
||||
if (!invoicingQldLogService.opeNodeJudgeCanStatus(dto.getQldNo(), "1,4")) {
|
||||
result.put("status", "faild");
|
||||
result.put("success", false);
|
||||
result.put("message", "回退失败");
|
||||
return result;
|
||||
}
|
||||
|
|
@ -974,7 +975,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
one.setHtTime(new Date());//回退时间
|
||||
boolean r_ = invoicingQldMainService.updateById(one);
|
||||
|
||||
result.put("status", "success");
|
||||
result.put("success", true);
|
||||
result.put("message", "回退成功");
|
||||
return result;
|
||||
}
|
||||
|
|
@ -1005,7 +1006,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
|
||||
//检测单子状态是否正确
|
||||
if (!invoicingQldLogService.opeNodeJudgeCanStatus(dto.getQldNo(), "1")) {
|
||||
map.put("status", "faild");
|
||||
map.put("success", false);
|
||||
map.put("message", "出库失败");
|
||||
return map;
|
||||
}
|
||||
|
|
@ -1031,7 +1032,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
}
|
||||
}
|
||||
if (!errorWl.isEmpty()) {
|
||||
map.put("status", "faild");
|
||||
map.put("success", false);
|
||||
map.put("message", "以下物料库存不足,无法出库:" + errorWl);
|
||||
return map;
|
||||
}
|
||||
|
|
@ -1060,7 +1061,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
qldData.setCkBy(sysUser.getId());//出库人
|
||||
qldData.setCkTime(new Date());//出库时间
|
||||
invoicingQldMainService.update(qldData, qw);
|
||||
map.put("status", "success");
|
||||
map.put("success", true);
|
||||
map.put("message", "出库成功");
|
||||
return map;
|
||||
}
|
||||
|
|
@ -1227,7 +1228,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> startDirectiveServe(InvoicingQldQueryEntity dto) {
|
||||
public Map<String, Object> startDirectiveServe(InvoicingQldQueryEntity dto) {
|
||||
//delete by caolei 2025-12-25
|
||||
// Map<String, String> result = Maps.newHashMap();
|
||||
//检测上一操作节点是否已完成(指动作完成,非点击了结束服务)
|
||||
|
|
@ -1299,7 +1300,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> finishDirectiveServe(InvoicingQldQueryEntity dto) {
|
||||
public Map<String, Object> finishDirectiveServe(InvoicingQldQueryEntity dto) {
|
||||
// Map<String,String> map = new HashMap();
|
||||
// map.put("error_code","0");
|
||||
// map.put("msg","可以提交");
|
||||
|
|
@ -1354,72 +1355,72 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
return invoicingOrdersApi.finishOrder(p_);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否可结束工单
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private Map<String, String> izCanFinish(String flowCode, String status) {
|
||||
Map<String, String> map = new HashMap();
|
||||
map.put("error_code", "0");
|
||||
map.put("msg", "可以结束");
|
||||
//完成结束判断算法:
|
||||
//一、申请可完成 flowCode=ql_sq,完成时只有2种判断,1、业务单号qldNo不为空 ;2、已提交status=1
|
||||
//二、出库可完成 flowCode=ql_ck,完成时只有2种判断,1、已出库status=4 ;2、已回退status=3
|
||||
//三、收货可完成 flowCode=ql_sh,完成时只有1种判断,1、已收货status=5
|
||||
//不考虑作废情况,作废时会将ql_sq的工单状态恢复成最原始状态,判断算法使用根据一、申请可完成
|
||||
//一、申请可完成判断
|
||||
if (flowCode.equals("ql_sq")) {
|
||||
if (!status.equals("1")) {
|
||||
map.put("error_code", "1");
|
||||
map.put("msg", "请先提交请领单");
|
||||
}
|
||||
}
|
||||
//二、出库可完成判断
|
||||
if (flowCode.equals("ql_ck")) {
|
||||
if (status.equals("3") || status.equals("4")) {
|
||||
} else {
|
||||
map.put("error_code", "1");
|
||||
map.put("msg", "请先出库或回退");
|
||||
}
|
||||
}
|
||||
//三、收货可完成判断
|
||||
if (flowCode.equals("ql_sh")) {
|
||||
if (!status.equals("5")) {
|
||||
map.put("error_code", "1");
|
||||
map.put("msg", "请先收货");
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成下一服务指令工单
|
||||
*/
|
||||
private void createNextOrder(InvoicingOrdersEntity entity, NuInvoicingQldMain main) {
|
||||
String flowCode = entity.getFlowCode();
|
||||
String status = main.getStatus();
|
||||
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
orderEntity.setFlowCode(flowCode);//ql_sq
|
||||
orderEntity.setBizId(main.getQldNo());//请领单号
|
||||
orderEntity.setNuId(main.getNuId());//护理单元id
|
||||
orderEntity.setElderId(main.getElderId());//长者id
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
orderEntity.setInitiatorId(sysUser.getEmployessId());//提交人id
|
||||
//生成请领下一步服务指令
|
||||
if (flowCode.equals("ql_sq")) {
|
||||
invoicingQlOrdersApi.flowQlsq(orderEntity);
|
||||
}
|
||||
if (flowCode.equals("ql_ck")) {
|
||||
//生成出库下一步服务指令
|
||||
if (status.equals("4")) {
|
||||
invoicingQlOrdersApi.flowQlck(orderEntity);
|
||||
}
|
||||
//生成回退下一步服务指令
|
||||
if (status.equals("3")) {
|
||||
invoicingQlOrdersApi.flowQlht(orderEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
// /**
|
||||
// * 判断是否可结束工单
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// private Map<String, String> izCanFinish(String flowCode, String status) {
|
||||
// Map<String, String> map = new HashMap();
|
||||
// map.put("error_code", "0");
|
||||
// map.put("msg", "可以结束");
|
||||
// //完成结束判断算法:
|
||||
// //一、申请可完成 flowCode=ql_sq,完成时只有2种判断,1、业务单号qldNo不为空 ;2、已提交status=1
|
||||
// //二、出库可完成 flowCode=ql_ck,完成时只有2种判断,1、已出库status=4 ;2、已回退status=3
|
||||
// //三、收货可完成 flowCode=ql_sh,完成时只有1种判断,1、已收货status=5
|
||||
// //不考虑作废情况,作废时会将ql_sq的工单状态恢复成最原始状态,判断算法使用根据一、申请可完成
|
||||
// //一、申请可完成判断
|
||||
// if (flowCode.equals("ql_sq")) {
|
||||
// if (!status.equals("1")) {
|
||||
// map.put("error_code", "1");
|
||||
// map.put("msg", "请先提交请领单");
|
||||
// }
|
||||
// }
|
||||
// //二、出库可完成判断
|
||||
// if (flowCode.equals("ql_ck")) {
|
||||
// if (status.equals("3") || status.equals("4")) {
|
||||
// } else {
|
||||
// map.put("error_code", "1");
|
||||
// map.put("msg", "请先出库或回退");
|
||||
// }
|
||||
// }
|
||||
// //三、收货可完成判断
|
||||
// if (flowCode.equals("ql_sh")) {
|
||||
// if (!status.equals("5")) {
|
||||
// map.put("error_code", "1");
|
||||
// map.put("msg", "请先收货");
|
||||
// }
|
||||
// }
|
||||
// return map;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 生成下一服务指令工单
|
||||
// */
|
||||
// private void createNextOrder(InvoicingOrdersEntity entity, NuInvoicingQldMain main) {
|
||||
// String flowCode = entity.getFlowCode();
|
||||
// String status = main.getStatus();
|
||||
// InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
// orderEntity.setFlowCode(flowCode);//ql_sq
|
||||
// orderEntity.setBizId(main.getQldNo());//请领单号
|
||||
// orderEntity.setNuId(main.getNuId());//护理单元id
|
||||
// orderEntity.setElderId(main.getElderId());//长者id
|
||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// orderEntity.setInitiatorId(sysUser.getEmployessId());//提交人id
|
||||
// //生成请领下一步服务指令
|
||||
// if (flowCode.equals("ql_sq")) {
|
||||
// invoicingQlOrdersApi.flowQlsq(orderEntity);
|
||||
// }
|
||||
// if (flowCode.equals("ql_ck")) {
|
||||
// //生成出库下一步服务指令
|
||||
// if (status.equals("4")) {
|
||||
// invoicingQlOrdersApi.flowQlck(orderEntity);
|
||||
// }
|
||||
// //生成回退下一步服务指令
|
||||
// if (status.equals("3")) {
|
||||
// invoicingQlOrdersApi.flowQlht(orderEntity);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -81,8 +81,8 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
private ConfigMaterialInfoMapper configMaterialInfoMapper;
|
||||
@Autowired
|
||||
private IInvoicingOrdersApi invoicingOrdersApi;
|
||||
@Autowired
|
||||
private IInvoicingThOrdersApi invoicingThOrdersApi;
|
||||
// @Autowired
|
||||
// private IInvoicingThOrdersApi invoicingThOrdersApi;
|
||||
|
||||
@Override
|
||||
public IPage<InvoicingThdMainEntity> thdList(Integer pageNo, Integer pageSize, InvoicingThdMainEntity dto) {
|
||||
|
|
@ -138,13 +138,13 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> startDirectiveServe(InvoicingThdMainEntity dto) {
|
||||
public Map<String, Object> startDirectiveServe(InvoicingThdMainEntity dto) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
// orderEntity.setFlowCode("dyth_cksh");//指令流程flow_code 看接口有标明
|
||||
orderEntity.setId(dto.getId());//退货指令id
|
||||
orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
Map<String, String> result = invoicingOrdersApi.beginOrder(orderEntity);
|
||||
Map<String, Object> result = invoicingOrdersApi.beginOrder(orderEntity);
|
||||
//delete by caolei 2025-12-25
|
||||
// if ("0".equals(result.get("error_code"))) {
|
||||
// InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
|
|
@ -165,14 +165,18 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean startServe(InvoicingThdMainEntity dto) {
|
||||
public Map<String, Object> startServe(InvoicingThdMainEntity dto) {
|
||||
Map<String, Object> map = new HashMap();
|
||||
map.put("success", true);
|
||||
map.put("message", "操作成功");
|
||||
//查询当前状态
|
||||
QueryWrapper<NuInvoicingThdMain> qw = new QueryWrapper<>();
|
||||
qw.eq("id", dto.getId());
|
||||
NuInvoicingThdMain main = thdMainMapper.selectOne(qw);
|
||||
|
||||
if (main == null || !"0".equals(main.getStatus())) {
|
||||
return false;
|
||||
map.put("success", false);
|
||||
map.put("message", "操作失败");
|
||||
} else {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String status = "1";
|
||||
|
|
@ -192,15 +196,15 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
logData.setNuId(main.getNuId());//护理单元id
|
||||
logData.setElderId(main.getElderId());//长者id
|
||||
thdLogMapper.insert(logData);
|
||||
|
||||
return true;
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> addThc(InvoicingThdGwcEntity dto) {
|
||||
Map<String, Object> result = Maps.newHashMap();
|
||||
|
||||
result.put("success", true);
|
||||
result.put("message", "添加成功");
|
||||
//检测退货数量是否小于等于护理单元库存数量 无需检查
|
||||
// QueryWrapper<NuInvoicingNuKcsl> kcslQW = new QueryWrapper<>();
|
||||
// kcslQW.eq("nu_id", dto.getNuId());
|
||||
|
|
@ -221,8 +225,8 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
List<NuInvoicingThdGwc> thcList = thdGwcMapper.selectList(thcQW);
|
||||
if (!CollectionUtils.isEmpty(thcList)) {
|
||||
//已存在该物料
|
||||
result.put("status", "existed");
|
||||
result.put("message", "已添加该物料,请勿重复添加");
|
||||
result.put("success", false);
|
||||
result.put("message", "已添加该物料");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -235,8 +239,6 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
thc.setWlId(dto.getWlId());//物料id
|
||||
thc.setThNum(dto.getThNum());//退货数量
|
||||
thdGwcMapper.insert(thc);//新增
|
||||
|
||||
result.put("status", "success");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -271,17 +273,19 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> submitThd(InvoicingThdMainEntity dto) {
|
||||
Map<String, String> result = Maps.newHashMap();
|
||||
//指令工单处判断是否允许提交
|
||||
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
p_.setPoolId(dto.getId());
|
||||
Map<String,String> j = invoicingThOrdersApi.izCanSubmit(p_);
|
||||
if(!j.get("error_code").equals("0")){
|
||||
result.put("status", "nodeError");
|
||||
result.put("message", j.get("msg"));
|
||||
return result;
|
||||
}
|
||||
public Map<String, Object> submitThd(InvoicingThdMainEntity dto) {
|
||||
Map<String, Object> result = Maps.newHashMap();
|
||||
result.put("success", true);
|
||||
result.put("message", "入库成功");
|
||||
// //指令工单处判断是否允许提交
|
||||
// InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
// p_.setPoolId(dto.getId());
|
||||
// Map<String,String> j = invoicingThOrdersApi.izCanSubmit(p_);
|
||||
// if(!j.get("error_code").equals("0")){
|
||||
// result.put("status", "nodeError");
|
||||
// result.put("message", j.get("msg"));
|
||||
// return result;
|
||||
// }
|
||||
|
||||
//查询主表信息
|
||||
QueryWrapper<NuInvoicingThdMain> qw = new QueryWrapper<>();
|
||||
|
|
@ -297,7 +301,7 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
{
|
||||
//检测单子状态是否正确
|
||||
if (main == null || !"0".equals(main.getStatus())) {
|
||||
result.put("status", "nodeError");
|
||||
result.put("success", false);
|
||||
result.put("message", "入库失败");
|
||||
return result;
|
||||
}
|
||||
|
|
@ -311,7 +315,7 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
// }
|
||||
//未添加退货物料检测
|
||||
if (CollectionUtils.isEmpty(gwcList)) {
|
||||
result.put("status", "faild");
|
||||
result.put("success", false);
|
||||
result.put("message", "未添加物料");
|
||||
return result;
|
||||
}
|
||||
|
|
@ -539,44 +543,43 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
}
|
||||
}
|
||||
|
||||
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
orderEntity.setPoolId(dto.getId());//退货主表id 入库时会根据更新为对应退货单号(入库时才生成的退货单号)
|
||||
orderEntity.setBizId(main.getThdNo());
|
||||
orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
// InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
// orderEntity.setPoolId(dto.getId());//退货主表id 入库时会根据更新为对应退货单号(入库时才生成的退货单号)
|
||||
// orderEntity.setBizId(main.getThdNo());
|
||||
// orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
//delete by caolei 2025-12-25
|
||||
// orderEntity.setNuId(main.getNuId());//护理单元id
|
||||
// orderEntity.setElderId(main.getElderId());//长者id
|
||||
// orderEntity.setFlowCode("dyth_cksh");//指令流程flow_code 看接口有标明
|
||||
invoicingThOrdersApi.updateOrderBizId(orderEntity);
|
||||
// invoicingThOrdersApi.updateOrderBizId(orderEntity);
|
||||
|
||||
result.put("status", "success");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> finishDirectiveServe(InvoicingThdMainEntity dto) {
|
||||
Map<String, String> r_ = Maps.newHashMap();
|
||||
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
p_.setId(dto.getId());
|
||||
InvoicingOrdersEntity v_ = invoicingThOrdersApi.getOrderInfo(p_);
|
||||
if (v_ == null || StringUtils.isBlank(v_.getPoolId())) {
|
||||
r_.put("error_code", "1");
|
||||
r_.put("msg", "工单不存在");
|
||||
return r_;
|
||||
}
|
||||
String mainId = v_.getPoolId();//退货单id
|
||||
//查询当前状态
|
||||
QueryWrapper<NuInvoicingThdMain> qw = new QueryWrapper<>();
|
||||
qw.eq("id", mainId);
|
||||
NuInvoicingThdMain main = thdMainMapper.selectOne(qw);
|
||||
|
||||
//检测是否已入库
|
||||
if (main == null || !"1".equals(main.getStatus())) {
|
||||
r_.put("error_code", "1");
|
||||
r_.put("msg", "退货单未入库");
|
||||
return r_;
|
||||
}
|
||||
public Map<String, Object> finishDirectiveServe(InvoicingThdMainEntity dto) {
|
||||
// Map<String, Object> r_ = Maps.newHashMap();
|
||||
// InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
// p_.setId(dto.getId());
|
||||
// InvoicingOrdersEntity v_ = invoicingThOrdersApi.getOrderInfo(p_);
|
||||
// if (v_ == null || StringUtils.isBlank(v_.getPoolId())) {
|
||||
// r_.put("success", false);
|
||||
// r_.put("message", "工单不存在");
|
||||
// return r_;
|
||||
// }
|
||||
// String mainId = v_.getPoolId();//退货单id
|
||||
// //查询当前状态
|
||||
// QueryWrapper<NuInvoicingThdMain> qw = new QueryWrapper<>();
|
||||
// qw.eq("id", mainId);
|
||||
// NuInvoicingThdMain main = thdMainMapper.selectOne(qw);
|
||||
//
|
||||
// //检测是否已入库
|
||||
// if (main == null || !"1".equals(main.getStatus())) {
|
||||
// r_.put("success", false);
|
||||
// r_.put("message", "退货单未入库");
|
||||
// return r_;
|
||||
// }
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
|
|
@ -584,7 +587,7 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
orderEntity.setId(dto.getId());//退货指令的id
|
||||
// orderEntity.setBizId(main.getThdNo());
|
||||
orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
Map<String, String> result = invoicingOrdersApi.finishOrder(orderEntity);
|
||||
Map<String, Object> result = invoicingOrdersApi.finishOrder(orderEntity);
|
||||
// if ("0".equals(result.get("error_code"))) {
|
||||
// //将状态改为已开始
|
||||
// UpdateWrapper<NuInvoicingThdMain> thUW = new UpdateWrapper<>();
|
||||
|
|
@ -599,14 +602,18 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean finishServe(InvoicingThdMainEntity dto) {
|
||||
public Map<String, Object> finishServe(InvoicingThdMainEntity dto) {
|
||||
Map<String, Object> map = new HashMap();
|
||||
map.put("success", true);
|
||||
map.put("message", "操作成功");
|
||||
//查询当前状态
|
||||
QueryWrapper<NuInvoicingThdMain> qw = new QueryWrapper<>();
|
||||
qw.eq("id", dto.getId());
|
||||
NuInvoicingThdMain main = thdMainMapper.selectOne(qw);
|
||||
|
||||
if (main == null || !"2".equals(main.getStatus())) {
|
||||
return false;
|
||||
map.put("success", false);
|
||||
map.put("message", "操作失败");
|
||||
} else {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String status = "3";//已结束服务
|
||||
|
|
@ -627,9 +634,8 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
logData.setNuId(main.getNuId());//护理单元id
|
||||
logData.setElderId(main.getElderId());//长者id
|
||||
thdLogMapper.insert(logData);
|
||||
|
||||
return true;
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -642,10 +648,10 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String,String> requireTH(InvoicingThdMainEntity dto) {
|
||||
Map<String,String> map = new HashMap();
|
||||
map.put("error_code","0");
|
||||
map.put("msg","操作成功");
|
||||
public Map<String,Object> requireTH(InvoicingThdMainEntity dto) {
|
||||
Map<String,Object> map = new HashMap();
|
||||
map.put("success", true);
|
||||
map.put("message", "操作成功");
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String status = "0";//发起待执行
|
||||
|
||||
|
|
@ -655,8 +661,8 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
qw.eq("status", status);
|
||||
NuInvoicingThdMain qwMain = thdMainMapper.selectOne(qw);
|
||||
if(qwMain!=null){
|
||||
map.put("error_code","1");
|
||||
map.put("msg","退货单已存在");
|
||||
map.put("success", false);
|
||||
map.put("message", "退货单已存在");
|
||||
}
|
||||
|
||||
NuInvoicingThdMain main = new NuInvoicingThdMain();
|
||||
|
|
@ -677,16 +683,16 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
logData.setElderId(main.getElderId());//长者id
|
||||
thdLogMapper.insert(logData);
|
||||
|
||||
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
orderEntity.setFlowCode("dyth_cksh");//指令流程flow_code 看接口有标明
|
||||
orderEntity.setPoolId(main.getId());//退货主表id 入库时会根据更新为对应退货单号(入库时才生成的退货单号)
|
||||
orderEntity.setNuId(dto.getNuId());
|
||||
// orderEntity.setNuName(dto.getNuName());
|
||||
orderEntity.setElderId(dto.getElderId());//长者id
|
||||
// orderEntity.setElderName(dto.getElderName());//长者姓名
|
||||
orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
orderEntity.setInitiatorName(sysUser.getRealname());//员工姓名
|
||||
invoicingThOrdersApi.flowDythCksh(orderEntity);
|
||||
// InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
// orderEntity.setFlowCode("dyth_cksh");//指令流程flow_code 看接口有标明
|
||||
// orderEntity.setPoolId(main.getId());//退货主表id 入库时会根据更新为对应退货单号(入库时才生成的退货单号)
|
||||
// orderEntity.setNuId(dto.getNuId());
|
||||
//// orderEntity.setNuName(dto.getNuName());
|
||||
// orderEntity.setElderId(dto.getElderId());//长者id
|
||||
//// orderEntity.setElderName(dto.getElderName());//长者姓名
|
||||
// orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
// orderEntity.setInitiatorName(sysUser.getRealname());//员工姓名
|
||||
// invoicingThOrdersApi.flowDythCksh(orderEntity);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,18 @@
|
|||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-admin-biz</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-admin-biz</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,11 @@ package com.nu.modules.nubaseinfo.entity;
|
|||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.nu.entity.*;
|
||||
import com.nu.entity.CameraInfoEntity;
|
||||
import com.nu.entity.ElderInfoEntity;
|
||||
import com.nu.entity.ElderServerEntity;
|
||||
import com.nu.entity.HumidDeviceEntity;
|
||||
import com.nu.modules.nuidPermission.entity.NuAppNuidPermission;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
|
@ -172,5 +176,8 @@ public class NuBaseInfo implements Serializable {
|
|||
//温湿度计
|
||||
@TableField(exist = false)
|
||||
private List<HumidDeviceEntity> humidDeviceList;
|
||||
//单元对应外挂
|
||||
@TableField(exist = false)
|
||||
private List<NuAppNuidPermission> permissionList;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.entity.*;
|
||||
import com.nu.modules.appConfig.entity.NuAppPermission;
|
||||
import com.nu.modules.camerainfo.api.CameraInfoApi;
|
||||
import com.nu.modules.elder.api.IElderInfoApi;
|
||||
import com.nu.modules.humiddevice.api.IHumidAlarmApi;
|
||||
|
|
@ -17,6 +18,8 @@ import com.nu.modules.nubaseinfo.entity.NuBaseInfo;
|
|||
import com.nu.modules.nubaseinfo.mapper.NuBaseInfoMapper;
|
||||
import com.nu.modules.nubaseinfo.service.INuBaseInfoService;
|
||||
import com.nu.modules.nubaseinfo.api.INuBaseInfoApi;
|
||||
import com.nu.modules.nuidPermission.entity.NuAppNuidPermission;
|
||||
import com.nu.modules.nuidPermission.service.INuAppNuidPermissionService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
|
|
@ -54,6 +57,8 @@ public class NuBaseInfoServiceImpl extends ServiceImpl<NuBaseInfoMapper, NuBaseI
|
|||
@Autowired
|
||||
private IHumidDeviceApi humidDeviceApi;
|
||||
|
||||
@Autowired
|
||||
private INuAppNuidPermissionService nuAppNuidPermissionService;
|
||||
|
||||
@Override
|
||||
public void setNuId(NuBaseInfo nuBaseInfo) {
|
||||
|
|
@ -142,6 +147,10 @@ public class NuBaseInfoServiceImpl extends ServiceImpl<NuBaseInfoMapper, NuBaseI
|
|||
|
||||
List<HumidDeviceEntity> humidDeviceList = humidDeviceApi.listAll();
|
||||
|
||||
//查询护理单元对应菜单权限
|
||||
List<NuAppNuidPermission> permissionList = nuAppNuidPermissionService.listByNuId(null);
|
||||
|
||||
|
||||
//查找list集合里的nuid等于cameraList集合中nuid的就给list集合赋值
|
||||
list.getRecords().forEach(ni -> {
|
||||
//赋值摄像头信息
|
||||
|
|
@ -179,6 +188,17 @@ public class NuBaseInfoServiceImpl extends ServiceImpl<NuBaseInfoMapper, NuBaseI
|
|||
ni.setHumidDeviceList(humidDtoList);
|
||||
}
|
||||
});
|
||||
//赋值温湿度信息
|
||||
permissionList.forEach(humidDto -> {
|
||||
if (StringUtils.equals(ni.getNuId(), humidDto.getRoleId())) {
|
||||
List<NuAppNuidPermission> permissionDtoList = ni.getPermissionList();
|
||||
if (permissionDtoList == null) {
|
||||
permissionDtoList = new ArrayList<>();
|
||||
}
|
||||
permissionDtoList.add(humidDto);
|
||||
ni.setPermissionList(permissionDtoList);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
IPage<NuBaseInfoEntity> entityPage = new Page<>(page.getCurrent(), page.getSize(), page.getTotal());
|
||||
|
|
|
|||
|
|
@ -0,0 +1,291 @@
|
|||
package com.nu.modules.nuidPermission.controller;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.nu.modules.appConfig.entity.NuAppPermission;
|
||||
import com.nu.modules.appConfig.entity.TreeModel;
|
||||
import com.nu.modules.appConfig.service.INuAppPermissionService;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nu.modules.nuidPermission.entity.NuAppNuidPermission;
|
||||
import com.nu.modules.nuidPermission.service.INuAppNuidPermissionService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecg.modules.base.service.BaseCommonService;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: nu_app_nuid_permission
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="nu_app_nuid_permission")
|
||||
@RestController
|
||||
@RequestMapping("/nuidPermission/nuAppNuidPermission")
|
||||
@Slf4j
|
||||
public class NuAppNuidPermissionController extends JeecgController<NuAppNuidPermission, INuAppNuidPermissionService> {
|
||||
@Autowired
|
||||
private INuAppNuidPermissionService nuAppNuidPermissionService;
|
||||
@Autowired
|
||||
private INuAppPermissionService nuAppPermissionService;
|
||||
@Autowired
|
||||
private BaseCommonService baseCommonService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuAppNuidPermission
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "nu_app_nuid_permission-分页列表查询")
|
||||
@ApiOperation(value="nu_app_nuid_permission-分页列表查询", notes="nu_app_nuid_permission-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<NuAppNuidPermission>> queryPageList(NuAppNuidPermission nuAppNuidPermission,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<NuAppNuidPermission> queryWrapper = QueryGenerator.initQueryWrapper(nuAppNuidPermission, req.getParameterMap());
|
||||
Page<NuAppNuidPermission> page = new Page<NuAppNuidPermission>(pageNo, pageSize);
|
||||
IPage<NuAppNuidPermission> pageList = nuAppNuidPermissionService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param nuAppNuidPermission
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "nu_app_nuid_permission-添加")
|
||||
@ApiOperation(value="nu_app_nuid_permission-添加", notes="nu_app_nuid_permission-添加")
|
||||
@RequiresPermissions("nuidPermission:nu_app_nuid_permission:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody NuAppNuidPermission nuAppNuidPermission) {
|
||||
nuAppNuidPermissionService.save(nuAppNuidPermission);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param nuAppNuidPermission
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "nu_app_nuid_permission-编辑")
|
||||
@ApiOperation(value="nu_app_nuid_permission-编辑", notes="nu_app_nuid_permission-编辑")
|
||||
@RequiresPermissions("nuidPermission:nu_app_nuid_permission:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody NuAppNuidPermission nuAppNuidPermission) {
|
||||
nuAppNuidPermissionService.updateById(nuAppNuidPermission);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "nu_app_nuid_permission-通过id删除")
|
||||
@ApiOperation(value="nu_app_nuid_permission-通过id删除", notes="nu_app_nuid_permission-通过id删除")
|
||||
@RequiresPermissions("nuidPermission:nu_app_nuid_permission:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
nuAppNuidPermissionService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "nu_app_nuid_permission-批量删除")
|
||||
@ApiOperation(value="nu_app_nuid_permission-批量删除", notes="nu_app_nuid_permission-批量删除")
|
||||
@RequiresPermissions("nuidPermission:nu_app_nuid_permission:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.nuAppNuidPermissionService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "nu_app_nuid_permission-通过id查询")
|
||||
@ApiOperation(value="nu_app_nuid_permission-通过id查询", notes="nu_app_nuid_permission-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<NuAppNuidPermission> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
NuAppNuidPermission nuAppNuidPermission = nuAppNuidPermissionService.getById(id);
|
||||
if(nuAppNuidPermission==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuAppNuidPermission);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param nuAppNuidPermission
|
||||
*/
|
||||
@RequiresPermissions("nuidPermission:nu_app_nuid_permission:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, NuAppNuidPermission nuAppNuidPermission) {
|
||||
return super.exportXls(request, nuAppNuidPermission, NuAppNuidPermission.class, "nu_app_nuid_permission");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("nuidPermission:nu_app_nuid_permission:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, NuAppNuidPermission.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户角色授权功能,查询菜单权限树
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/queryTreeList", method = RequestMethod.GET)
|
||||
public Result<Map<String,Object>> queryTreeList(HttpServletRequest request) {
|
||||
Result<Map<String,Object>> result = new Result<>();
|
||||
//全部权限ids
|
||||
List<String> ids = new ArrayList<>();
|
||||
try {
|
||||
LambdaQueryWrapper<NuAppPermission> query = new LambdaQueryWrapper<NuAppPermission>();
|
||||
query.eq(NuAppPermission::getDelFlag, CommonConstant.DEL_FLAG_0);
|
||||
query.orderByAsc(NuAppPermission::getSortNo);
|
||||
List<NuAppPermission> list = nuAppPermissionService.list(query);
|
||||
for(NuAppPermission sysPer : list) {
|
||||
ids.add(sysPer.getId());
|
||||
}
|
||||
List<TreeModel> treeList = new ArrayList<>();
|
||||
getTreeModelList(treeList, list, null);
|
||||
Map<String,Object> resMap = new HashMap(5);
|
||||
//全部树节点数据
|
||||
resMap.put("treeList", treeList);
|
||||
//全部树ids
|
||||
resMap.put("ids", ids);
|
||||
result.setResult(resMap);
|
||||
result.setSuccess(true);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private void getTreeModelList(List<TreeModel> treeList, List<NuAppPermission> metaList, TreeModel temp) {
|
||||
for (NuAppPermission permission : metaList) {
|
||||
String tempPid = permission.getParentId();
|
||||
TreeModel tree = new TreeModel(permission.getId(), tempPid, permission.getName(),permission.getRuleFlag(), permission.isLeaf(),permission.getMenuCode());
|
||||
if(temp==null && oConvertUtils.isEmpty(tempPid)) {
|
||||
treeList.add(tree);
|
||||
if(!tree.getIsLeaf()) {
|
||||
getTreeModelList(treeList, metaList, tree);
|
||||
}
|
||||
}else if(temp!=null && tempPid!=null && tempPid.equals(temp.getKey())){
|
||||
temp.getChildren().add(tree);
|
||||
if(!tree.getIsLeaf()) {
|
||||
getTreeModelList(treeList, metaList, tree);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询角色授权
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/queryNuidPermission", method = RequestMethod.GET)
|
||||
public Result<List<String>> queryNuidPermission(@RequestParam(name = "nuId", required = true) String nuId) {
|
||||
Result<List<String>> result = new Result<>();
|
||||
try {
|
||||
List<NuAppNuidPermission> list = nuAppNuidPermissionService.list(new QueryWrapper<NuAppNuidPermission>().lambda().eq(NuAppNuidPermission::getRoleId, nuId));
|
||||
result.setResult(list.stream().map(sysRolePermission -> String.valueOf(sysRolePermission.getPermissionId())).collect(Collectors.toList()));
|
||||
result.setSuccess(true);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存角色授权
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/saveRolePermission", method = RequestMethod.POST)
|
||||
// @RequiresPermissions("system:permission:saveRole")
|
||||
public Result<String> saveRolePermission(@RequestBody JSONObject json) {
|
||||
long start = System.currentTimeMillis();
|
||||
Result<String> result = new Result<>();
|
||||
try {
|
||||
String roleId = json.getString("roleId");
|
||||
String permissionIds = json.getString("permissionIds");
|
||||
String lastPermissionIds = json.getString("lastpermissionIds");
|
||||
this.nuAppNuidPermissionService.saveRolePermission(roleId, permissionIds, lastPermissionIds);
|
||||
//update-begin---author:wangshuai ---date:20220316 for:[VUEN-234]用户管理角色授权添加敏感日志------------
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
baseCommonService.addLog("修改角色ID: "+roleId+" 的权限配置,操作人: " +loginUser.getUsername() ,CommonConstant.LOG_TYPE_2, 2);
|
||||
//update-end---author:wangshuai ---date:20220316 for:[VUEN-234]用户管理角色授权添加敏感日志------------
|
||||
result.success("保存成功!");
|
||||
log.info("======角色授权成功=====耗时:" + (System.currentTimeMillis() - start) + "毫秒");
|
||||
|
||||
} catch (Exception e) {
|
||||
result.error500("授权失败!");
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.nu.modules.nuidPermission.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: nu_app_nuid_permission
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_app_nuid_permission")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_app_nuid_permission对象", description="nu_app_nuid_permission")
|
||||
public class NuAppNuidPermission implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**角色id*/
|
||||
@Excel(name = "角色id", width = 15)
|
||||
@ApiModelProperty(value = "角色id")
|
||||
private java.lang.String roleId;
|
||||
/**权限id*/
|
||||
@Excel(name = "权限id", width = 15)
|
||||
@ApiModelProperty(value = "权限id")
|
||||
private java.lang.String permissionId;
|
||||
/**数据权限ids*/
|
||||
@Excel(name = "数据权限ids", width = 15)
|
||||
@ApiModelProperty(value = "数据权限ids")
|
||||
private java.lang.String dataRuleIds;
|
||||
/**操作时间*/
|
||||
@Excel(name = "操作时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "操作时间")
|
||||
private java.util.Date operateDate;
|
||||
/**操作ip*/
|
||||
@Excel(name = "操作ip", width = 15)
|
||||
@ApiModelProperty(value = "操作ip")
|
||||
private java.lang.String operateIp;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String menuName;
|
||||
@TableField(exist = false)
|
||||
private String menuCode;
|
||||
|
||||
|
||||
|
||||
public NuAppNuidPermission(String roleId, String permissionId) {
|
||||
this.roleId = roleId;
|
||||
this.permissionId = permissionId;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.nu.modules.nuidPermission.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.nuidPermission.entity.NuAppNuidPermission;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: nu_app_nuid_permission
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface NuAppNuidPermissionMapper extends BaseMapper<NuAppNuidPermission> {
|
||||
|
||||
List<NuAppNuidPermission> listByNuId(@Param("roleId") String nuId);
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<?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.nu.modules.nuidPermission.mapper.NuAppNuidPermissionMapper">
|
||||
|
||||
<select id="listByNuId" resultType="com.nu.modules.nuidPermission.entity.NuAppNuidPermission">
|
||||
select a.*,b.name as menu_name,b.menu_code from nu_app_nuid_permission a
|
||||
left join nu_app_permission b on a.permission_id = b.id
|
||||
<where>
|
||||
<if test="roleId != null and roleId !=''">
|
||||
and a.role_id = #{roleId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.nu.modules.nuidPermission.service;
|
||||
|
||||
import com.nu.modules.nuidPermission.entity.NuAppNuidPermission;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: nu_app_nuid_permission
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface INuAppNuidPermissionService extends IService<NuAppNuidPermission> {
|
||||
|
||||
void saveRolePermission(String roleId, String permissionIds, String lastPermissionIds);
|
||||
|
||||
List<NuAppNuidPermission> listByNuId(String nuId);
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
package com.nu.modules.nuidPermission.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nu.modules.nuidPermission.entity.NuAppNuidPermission;
|
||||
import com.nu.modules.nuidPermission.mapper.NuAppNuidPermissionMapper;
|
||||
import com.nu.modules.nuidPermission.service.INuAppNuidPermissionService;
|
||||
import org.jeecg.common.util.IpUtils;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: nu_app_nuid_permission
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class NuAppNuidPermissionServiceImpl extends ServiceImpl<NuAppNuidPermissionMapper, NuAppNuidPermission> implements INuAppNuidPermissionService {
|
||||
|
||||
@Override
|
||||
public void saveRolePermission(String roleId, String permissionIds, String lastPermissionIds) {
|
||||
String ip = "";
|
||||
try {
|
||||
//获取request
|
||||
HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
|
||||
//获取IP地址
|
||||
ip = IpUtils.getIpAddr(request);
|
||||
} catch (Exception e) {
|
||||
ip = "127.0.0.1";
|
||||
}
|
||||
List<String> add = getDiff(lastPermissionIds,permissionIds);
|
||||
if(add!=null && add.size()>0) {
|
||||
List<NuAppNuidPermission> list = new ArrayList<NuAppNuidPermission>();
|
||||
for (String p : add) {
|
||||
if(oConvertUtils.isNotEmpty(p)) {
|
||||
NuAppNuidPermission rolepms = new NuAppNuidPermission(roleId, p);
|
||||
rolepms.setOperateDate(new Date());
|
||||
rolepms.setOperateIp(ip);
|
||||
list.add(rolepms);
|
||||
}
|
||||
}
|
||||
this.saveBatch(list);
|
||||
}
|
||||
|
||||
List<String> delete = getDiff(permissionIds,lastPermissionIds);
|
||||
if(delete!=null && delete.size()>0) {
|
||||
for (String permissionId : delete) {
|
||||
this.remove(new QueryWrapper<NuAppNuidPermission>().lambda().eq(NuAppNuidPermission::getRoleId, roleId).eq(NuAppNuidPermission::getPermissionId, permissionId));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NuAppNuidPermission> listByNuId(String nuId) {
|
||||
return baseMapper.listByNuId(nuId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 从diff中找出main中没有的元素
|
||||
* @param main
|
||||
* @param diff
|
||||
* @return
|
||||
*/
|
||||
private List<String> getDiff(String main,String diff){
|
||||
if(oConvertUtils.isEmpty(diff)) {
|
||||
return null;
|
||||
}
|
||||
if(oConvertUtils.isEmpty(main)) {
|
||||
return Arrays.asList(diff.split(","));
|
||||
}
|
||||
|
||||
String[] mainArr = main.split(",");
|
||||
String[] diffArr = diff.split(",");
|
||||
Map<String, Integer> map = new HashMap(5);
|
||||
for (String string : mainArr) {
|
||||
map.put(string, 1);
|
||||
}
|
||||
List<String> res = new ArrayList<String>();
|
||||
for (String key : diffArr) {
|
||||
if(oConvertUtils.isNotEmpty(key) && !map.containsKey(key)) {
|
||||
res.add(key);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
@ -14,23 +14,23 @@ import java.util.Map;
|
|||
*/
|
||||
public interface IInvoicingOrdersApi {
|
||||
|
||||
/**
|
||||
* 获取指令工单信息
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
// /**
|
||||
// * 获取指令工单信息
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 点击开始
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
Map<String,String> beginOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
Map<String,Object> beginOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 点击完成
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
Map<String,String> finishOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
Map<String,Object> finishOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 根据工单id查询工单信息+对应服务指令信息
|
||||
|
|
|
|||
|
|
@ -6,30 +6,30 @@ import org.jeecg.common.api.vo.Result;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令盘点工单
|
||||
* @Description: 仓库类服务指令盘点工单 作废
|
||||
* @Author: caolei
|
||||
* @Date: 2025-12-29
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IInvoicingPdOrdersApi {
|
||||
|
||||
/**
|
||||
* 获取工单信息
|
||||
* @param invoicingOrdersEntity
|
||||
* @return
|
||||
*/
|
||||
InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 是否可提交
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
Result<String> izCanAdd(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 单元退货-提交时修改业务单号
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
// /**
|
||||
// * 获取工单信息
|
||||
// * @param invoicingOrdersEntity
|
||||
// * @return
|
||||
// */
|
||||
// InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 是否可提交
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// Result<String> izCanAdd(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 单元退货-提交时修改业务单号
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,72 +5,72 @@ import com.nu.entity.InvoicingOrdersEntity;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令请领工单
|
||||
* @Description: 仓库类服务指令请领工单 作废
|
||||
* @Author: caolei
|
||||
* @Date: 2025-12-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IInvoicingQlOrdersApi {
|
||||
|
||||
/**
|
||||
* 请领是否可提交
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
Map<String,String> izCanSubmit(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 请领是否可重新提交
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
Map<String,String> izCanReSubmit(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 请领是否可继续
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
Map<String,String> izCanGoOn(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 请领是否可作废
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
Map<String,String> izCanCancel(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 流程中提交时修改业务单号
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 请领流程-获取指令工单信息
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
InvoicingOrdersEntity getQlOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 请领流程-请领申请 ql_sq
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
void flowQlsq(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 请领流程-出库 ql_ck
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
void flowQlck(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 请领流程-回退 ql_ht
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
void flowQlht(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 请领流程-作废 ql_zf
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
void flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
// /**
|
||||
// * 请领是否可提交
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// Map<String,String> izCanSubmit(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 请领是否可重新提交
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// Map<String,String> izCanReSubmit(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 请领是否可继续
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// Map<String,String> izCanGoOn(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 请领是否可作废
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// Map<String,String> izCanCancel(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 流程中提交时修改业务单号
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 请领流程-获取指令工单信息
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// InvoicingOrdersEntity getQlOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 请领流程-请领申请 ql_sq
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void flowQlsq(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 请领流程-出库 ql_ck
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void flowQlck(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 请领流程-回退 ql_ht
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void flowQlht(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 请领流程-作废 ql_zf
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,36 +5,36 @@ import com.nu.entity.InvoicingOrdersEntity;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令退货工单
|
||||
* @Description: 仓库类服务指令退货工单 作废
|
||||
* @Author: caolei
|
||||
* @Date: 2025-12-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IInvoicingThOrdersApi {
|
||||
|
||||
/**
|
||||
* 获取工单信息
|
||||
* @param invoicingOrdersEntity
|
||||
* @return
|
||||
*/
|
||||
InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 单元退货-仓库收货 dyth_cksh
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
void flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 是否可提交
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
Map<String,String> izCanSubmit(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 单元退货-提交时修改业务单号
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
// /**
|
||||
// * 获取工单信息
|
||||
// * @param invoicingOrdersEntity
|
||||
// * @return
|
||||
// */
|
||||
// InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 单元退货-仓库收货 dyth_cksh
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 是否可提交
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// Map<String,String> izCanSubmit(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 单元退货-提交时修改业务单号
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ import java.util.Date;
|
|||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_nu_care_directive_order")
|
||||
@TableName("nu_biz_nu_directive_order")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_nu_care_directive_order对象", description="服务指令工单主表")
|
||||
@ApiModel(value="nu_biz_nu_directive_order对象", description="服务指令工单主表")
|
||||
public class CareOrders implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**id*/
|
||||
|
|
@ -34,6 +34,8 @@ public class CareOrders implements Serializable {
|
|||
private String id;
|
||||
/**单号*/
|
||||
private String orderNo;
|
||||
/**工单类型*/
|
||||
private String orderType;
|
||||
/**数据池子表ID*/
|
||||
private String poolId;
|
||||
/**主表id*/
|
||||
|
|
|
|||
|
|
@ -21,15 +21,19 @@ import java.util.Date;
|
|||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_nu_care_directive_order_sub")
|
||||
@TableName("nu_biz_nu_directive_order_sub")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_nu_care_directive_order_sub对象", description="服务指令工单子表")
|
||||
@ApiModel(value="nu_biz_nu_directive_order_sub对象", description="服务指令工单子表")
|
||||
public class CareOrdersSub implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
/**单号*/
|
||||
private String orderNo;
|
||||
/**工单类型*/
|
||||
private String orderType;
|
||||
/**主表id*/
|
||||
private String mainId;
|
||||
/**数据池子表ID*/
|
||||
|
|
|
|||
|
|
@ -60,15 +60,17 @@
|
|||
round(sum(ifnull(com_price,0)),4) as totalComPrice,
|
||||
max(start_time) as maxTime,
|
||||
sum(case when iz_finish='N' then 1 else 0 end) as ownCn
|
||||
from nu_biz_nu_care_directive_order_sub
|
||||
where start_time >=DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00')
|
||||
from nu_biz_nu_directive_order_sub
|
||||
where order_type = '1'
|
||||
and start_time >=DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00')
|
||||
and start_time <=DATE_FORMAT(NOW(), '%Y-%m-%d 23:59:59')
|
||||
group by employee_id
|
||||
) e on a.id = e.employee_id
|
||||
left join (
|
||||
select employee_id,sum(case when iz_finish='N' then 1 else 0 end) as orderNum
|
||||
from nu_biz_nu_care_directive_order_sub
|
||||
where start_time = #{startTime}
|
||||
from nu_biz_nu_directive_order_sub
|
||||
where order_type = '1'
|
||||
and start_time = #{startTime}
|
||||
or (start_time < #{startTime} and end_time > #{startTime})
|
||||
group by employee_id
|
||||
) f on a.id = f.employee_id
|
||||
|
|
|
|||
|
|
@ -121,19 +121,23 @@ public class CareOrdersServiceImpl extends ServiceImpl<CareOrdersMapper, CareOrd
|
|||
//获取满足条件的员工
|
||||
CareOrders employee = employeeScreening(directiveIds,orders.getElderId(),null,orders.getStartTime());
|
||||
if(employee!=null){
|
||||
getOrderNo(orders);
|
||||
String orderNo = getOrderNo();
|
||||
orders.setOrderNo(orderNo);
|
||||
orders.setEmployeeId(employee.getEmployeeId());
|
||||
orders.setEmployeeName(employee.getEmployeeName());
|
||||
orders.setIzStart("N");
|
||||
orders.setIzFinish("N");
|
||||
orders.setOrderType("1");
|
||||
this.save(orders);//生成工单主表
|
||||
for(int i=0;i<ordersSubList.size();i++){
|
||||
CareOrdersSub ordersSub = ordersSubList.get(i);
|
||||
ordersSub.setOrderNo(getOrderSubNo(orderNo));
|
||||
ordersSub.setMainId(orders.getId());
|
||||
ordersSub.setEmployeeId(employee.getEmployeeId());
|
||||
ordersSub.setEmployeeName(employee.getEmployeeName());
|
||||
ordersSub.setIzStart("N");
|
||||
ordersSub.setIzFinish("N");
|
||||
ordersSub.setOrderType("1");
|
||||
ordersSubService.save(ordersSub);//生成工单子表
|
||||
}
|
||||
baseMapper.updatePoolIzOrder(orders.getPoolId());
|
||||
|
|
@ -148,7 +152,8 @@ public class CareOrdersServiceImpl extends ServiceImpl<CareOrdersMapper, CareOrd
|
|||
String employeeIds = emps.stream().map(CareOrders::getEmployeeId).collect(Collectors.joining(","));
|
||||
CareOrders employee = employeeScreening(directiveIds,orders.getElderId(),employeeIds,orders.getStartTime());
|
||||
if(employee!=null){
|
||||
getOrderNo(orders);
|
||||
String orderNo = getOrderNo();
|
||||
orders.setOrderNo(orderNo);
|
||||
orders.setEmployeeId(employee.getEmployeeId());
|
||||
orders.setEmployeeName(employee.getEmployeeName());
|
||||
orders.setIzStart("N");
|
||||
|
|
@ -156,6 +161,7 @@ public class CareOrdersServiceImpl extends ServiceImpl<CareOrdersMapper, CareOrd
|
|||
this.save(orders);//生成工单主表
|
||||
for(int i=0;i<ordersSubList.size();i++){
|
||||
CareOrdersSub ordersSub = ordersSubList.get(i);
|
||||
ordersSub.setOrderNo(getOrderSubNo(orderNo));
|
||||
ordersSub.setMainId(orders.getId());
|
||||
ordersSub.setEmployeeId(employee.getEmployeeId());
|
||||
ordersSub.setEmployeeName(employee.getEmployeeName());
|
||||
|
|
@ -524,7 +530,7 @@ public class CareOrdersServiceImpl extends ServiceImpl<CareOrdersMapper, CareOrd
|
|||
* 获取单号
|
||||
* @return
|
||||
*/
|
||||
private void getOrderNo(CareOrders orders){
|
||||
private String getOrderNo(){
|
||||
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||
String deptCode = deptInfo.getString("code");
|
||||
String today = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
|
|
@ -537,21 +543,39 @@ public class CareOrdersServiceImpl extends ServiceImpl<CareOrdersMapper, CareOrd
|
|||
qw.last("limit 1");
|
||||
CareOrders entity = this.getOne(qw);
|
||||
int todayNo = 0;
|
||||
int totalNo = 0;
|
||||
if(entity!=null){
|
||||
String orderNo = entity.getOrderNo();
|
||||
if(orderNo!=null&&!orderNo.equals("")){
|
||||
String no = orderNo.substring(todayPrefix.length());
|
||||
String todayNoStr = no.substring(0,4);
|
||||
String totalNoStr = no.substring(5);
|
||||
String todayNoStr = orderNo.substring(todayPrefix.length());
|
||||
todayNo = Integer.parseInt(todayNoStr);
|
||||
totalNo = Integer.parseInt(totalNoStr);
|
||||
}
|
||||
}
|
||||
todayNo = todayNo +1;
|
||||
totalNo = totalNo +1;
|
||||
String frontNo = String.format("%04d", todayNo);
|
||||
String backNo = String.format("%07d", totalNo);
|
||||
orders.setOrderNo(todayPrefix+frontNo+backNo);
|
||||
return todayPrefix+frontNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取子单号
|
||||
* @return
|
||||
*/
|
||||
private String getOrderSubNo(String mainOrderNo){
|
||||
QueryWrapper<CareOrdersSub> qw = new QueryWrapper<>();
|
||||
qw.likeRight("order_no", mainOrderNo);
|
||||
qw.select("order_no");
|
||||
qw.orderByDesc("order_no");
|
||||
qw.last("limit 1");
|
||||
CareOrdersSub entity = ordersSubService.getOne(qw);
|
||||
int todayNo = 0;
|
||||
if(entity!=null){
|
||||
String orderNo = entity.getOrderNo();
|
||||
if(orderNo!=null&&!orderNo.equals("")){
|
||||
String todayNoStr = orderNo.substring(mainOrderNo.length());
|
||||
todayNo = Integer.parseInt(todayNoStr);
|
||||
}
|
||||
}
|
||||
todayNo = todayNo +1;
|
||||
String frontNo = String.format("%03d", todayNo);
|
||||
return mainOrderNo+frontNo;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ public class InvoicingOrders implements Serializable {
|
|||
private String id;
|
||||
/**单号*/
|
||||
private String orderNo;
|
||||
/**工单类型*/
|
||||
private String orderType;
|
||||
/**数据池子表ID*/
|
||||
private String poolId;
|
||||
/**业务主表id,或者主表单号*/
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ public interface InvoicingOrdersMapper extends BaseMapper<InvoicingOrders> {
|
|||
List<InvoicingOrders> getPermissionEmps(@Param("directiveIds") String directiveIds);
|
||||
List<InvoicingOrders> getFlowList(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
InvoicingOrders getFlowOne(InvoicingOrders invoicingOrders);
|
||||
void cancelOrder(InvoicingOrders invoicingOrders);
|
||||
InvoicingOrders getOrderOne(InvoicingOrders invoicingOrders);
|
||||
|
||||
InvoicingDirectiveEntity selectInfoById(@Param("id") String id);
|
||||
|
|
|
|||
|
|
@ -94,16 +94,18 @@
|
|||
round(sum(ifnull(com_price,0)),4) as totalComPrice,
|
||||
max(start_time) as maxTime,
|
||||
sum(case when iz_finish='N' then 1 else 0 end) as ownCn
|
||||
from nu_biz_nu_invoicing_directive_order
|
||||
where start_time >=DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00')
|
||||
from nu_biz_nu_directive_order
|
||||
where order_type = '3'
|
||||
and start_time >=DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00')
|
||||
and start_time <=DATE_FORMAT(NOW(), '%Y-%m-%d 23:59:59')
|
||||
and del_flag = '0'
|
||||
group by employee_id
|
||||
) e on a.id = e.employee_id
|
||||
left join (
|
||||
select employee_id,sum(case when iz_finish='N' then 1 else 0 end) as orderNum
|
||||
from nu_biz_nu_invoicing_directive_order
|
||||
where start_time = #{startTime}
|
||||
from nu_biz_nu_directive_order
|
||||
where order_type = '3'
|
||||
and start_time = #{startTime}
|
||||
or (start_time < #{startTime} and end_time > #{startTime})
|
||||
and del_flag = '0'
|
||||
group by employee_id
|
||||
|
|
@ -201,15 +203,6 @@
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<update id="cancelOrder">
|
||||
update nu_biz_nu_invoicing_directive_order
|
||||
set iz_cancel = 'Y',
|
||||
cancel_time = #{cancelTime},
|
||||
cancel_emp = #{cancelEmp},
|
||||
remarks = #{remarks}
|
||||
where biz_id = #{bizId}
|
||||
</update>
|
||||
|
||||
<select id="getOrderOne" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select
|
||||
a.id,
|
||||
|
|
@ -255,9 +248,8 @@
|
|||
a.initiator_id as initiatorId,
|
||||
a.initiator_name as initiatorName,
|
||||
a.remarks,
|
||||
a.biz_type as flowCode,
|
||||
a.pad_path as padPath
|
||||
from nu_biz_nu_invoicing_directive_order a
|
||||
a.biz_type as flowCode
|
||||
from nu_biz_nu_directive_order a
|
||||
<where>
|
||||
<if test="id != null and id != ''">
|
||||
and id = #{id}
|
||||
|
|
@ -302,7 +294,7 @@
|
|||
<select id="selectInfoById" resultType="com.nu.entity.InvoicingDirectiveEntity">
|
||||
select a.*,
|
||||
mainStatus.item_text AS optTypeName
|
||||
from nu_biz_nu_invoicing_directive_order a
|
||||
from nu_biz_nu_directive_order a
|
||||
LEFT JOIN sys_dict dict ON dict.dict_code = 'directive_order_opt_type'
|
||||
LEFT JOIN sys_dict_item mainStatus
|
||||
ON mainStatus.dict_id = dict.id AND mainStatus.item_value = a.opt_type
|
||||
|
|
|
|||
|
|
@ -69,31 +69,28 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
|||
orders.setEmployeeName(employee.getEmployeeName());
|
||||
orders.setIzStart("N");
|
||||
orders.setIzFinish("N");
|
||||
orders.setIzRollback("N");
|
||||
orders.setOrderType("3");
|
||||
this.save(orders);//生成工单主表
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指令工单信息
|
||||
*
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
@Override
|
||||
public InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||
log.info("function:getOrderInfo");
|
||||
log.info("id:" + invoicingOrdersEntity.getId());
|
||||
log.info("Object:", invoicingOrdersEntity);
|
||||
InvoicingOrders io = new InvoicingOrders();
|
||||
BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
if (entity != null) {
|
||||
InvoicingOrdersEntity ioe = new InvoicingOrdersEntity();
|
||||
BeanUtils.copyProperties(entity, ioe);
|
||||
return ioe;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
// /**
|
||||
// * 获取指令工单信息
|
||||
// *
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
// InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
// if (entity != null) {
|
||||
// InvoicingOrdersEntity ioe = new InvoicingOrdersEntity();
|
||||
// BeanUtils.copyProperties(entity, ioe);
|
||||
// return ioe;
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 点击开始
|
||||
|
|
@ -101,12 +98,10 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
|||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> beginOrder(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||
log.info("Id:" + invoicingOrdersEntity.getId());
|
||||
log.info("UpdateBy:" + invoicingOrdersEntity.getInitiatorId());
|
||||
Map<String, String> map = new HashMap();
|
||||
map.put("error_code", "0");
|
||||
map.put("msg", "开始成功");
|
||||
public Map<String, Object> beginOrder(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||
Map<String, Object> map = new HashMap();
|
||||
map.put("success", true);
|
||||
map.put("message", "开始成功");
|
||||
InvoicingOrders io = new InvoicingOrders();
|
||||
BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
InvoicingOrders invoicingOrders = baseMapper.getOrderOne(io);
|
||||
|
|
@ -120,12 +115,12 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
|||
entity.setId(invoicingOrdersEntity.getId());
|
||||
baseMapper.updateById(entity);
|
||||
} else {
|
||||
map.put("error_code", "1");
|
||||
map.put("msg", "工单已开始");
|
||||
map.put("success", false);
|
||||
map.put("message", "工单已开始");
|
||||
}
|
||||
} else {
|
||||
map.put("error_code", "1");
|
||||
map.put("msg", "工单不存在");
|
||||
map.put("success", false);
|
||||
map.put("message", "工单不存在");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
@ -136,12 +131,10 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
|||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> finishOrder(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||
log.info("Id:" + invoicingOrdersEntity.getId());
|
||||
log.info("UpdateBy:" + invoicingOrdersEntity.getInitiatorId());
|
||||
Map<String, String> map = new HashMap();
|
||||
map.put("error_code", "0");
|
||||
map.put("msg", "结束成功");
|
||||
public Map<String, Object> finishOrder(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||
Map<String, Object> map = new HashMap();
|
||||
map.put("success",true);
|
||||
map.put("message","结束成功");
|
||||
InvoicingOrders io = new InvoicingOrders();
|
||||
BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
InvoicingOrders invoicingOrders = baseMapper.getOrderOne(io);
|
||||
|
|
@ -162,16 +155,16 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
|||
entity.setComPrice(DirectivePrice.getComPrice());
|
||||
baseMapper.updateById(entity);
|
||||
} else {
|
||||
map.put("error_code", "1");
|
||||
map.put("msg", "工单已结束");
|
||||
map.put("success", false);
|
||||
map.put("message", "工单已结束");
|
||||
}
|
||||
} else {
|
||||
map.put("error_code", "1");
|
||||
map.put("msg", "工单未开始");
|
||||
map.put("success", false);
|
||||
map.put("message", "工单未开始");
|
||||
}
|
||||
} else {
|
||||
map.put("error_code", "1");
|
||||
map.put("msg", "工单不存在");
|
||||
map.put("success", false);
|
||||
map.put("message", "工单不存在");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,76 +25,76 @@ import java.util.*;
|
|||
@Slf4j
|
||||
public class PdOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, InvoicingOrders> implements IPdOrdersService, IInvoicingPdOrdersApi {
|
||||
|
||||
@Autowired
|
||||
IEmpOrdersService empOrdersService;
|
||||
// @Autowired
|
||||
// IEmpOrdersService empOrdersService;
|
||||
|
||||
/**
|
||||
* 获取工单信息
|
||||
* @param invoicingOrdersEntity
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
log.info("function:getOrderInfo");
|
||||
log.info("id:"+invoicingOrdersEntity.getId());
|
||||
InvoicingOrders io = new InvoicingOrders();
|
||||
BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
if(entity!=null){
|
||||
InvoicingOrdersEntity ioe = new InvoicingOrdersEntity();
|
||||
BeanUtils.copyProperties(entity, ioe);
|
||||
return ioe;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
// /**
|
||||
// * 获取工单信息
|
||||
// * @param invoicingOrdersEntity
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:getOrderInfo");
|
||||
// log.info("id:"+invoicingOrdersEntity.getId());
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
// InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
// if(entity!=null){
|
||||
// InvoicingOrdersEntity ioe = new InvoicingOrdersEntity();
|
||||
// BeanUtils.copyProperties(entity, ioe);
|
||||
// return ioe;
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 是否可提交
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
@Override
|
||||
public Result<String> izCanAdd(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
InvoicingOrders io = new InvoicingOrders();
|
||||
BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
if(entity!=null){
|
||||
if(!"Y".equals(entity.getIzStart())) {
|
||||
return Result.error("工单未开始");
|
||||
}
|
||||
if(!"".equals(entity.getBizId())) {
|
||||
return Result.error("工单未开始");
|
||||
}
|
||||
}else{
|
||||
return Result.error("工单不存在");
|
||||
}
|
||||
return Result.OK("可以新增");
|
||||
}
|
||||
// /**
|
||||
// * 是否可提交
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public Result<String> izCanAdd(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
// InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
// if(entity!=null){
|
||||
// if(!"Y".equals(entity.getIzStart())) {
|
||||
// return Result.error("工单未开始");
|
||||
// }
|
||||
// if(!"".equals(entity.getBizId())) {
|
||||
// return Result.error("工单未开始");
|
||||
// }
|
||||
// }else{
|
||||
// return Result.error("工单不存在");
|
||||
// }
|
||||
// return Result.OK("可以新增");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 单元退货流程中提交时修改业务单号
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
@Override
|
||||
public void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
log.info("function:updateOrderBizId");
|
||||
log.info("PoolId:"+invoicingOrdersEntity.getPoolId());
|
||||
log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
empOrdersService.getNames(invoicingOrdersEntity);
|
||||
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
|
||||
ioQw.eq("pool_id", invoicingOrdersEntity.getPoolId());
|
||||
InvoicingOrders order = this.getOne(ioQw);
|
||||
log.info("order:"+order);
|
||||
if(order!=null){
|
||||
log.info("OrderId:"+order.getId());
|
||||
//修改请领单的bizId
|
||||
InvoicingOrders entity = new InvoicingOrders();
|
||||
entity.setId(order.getId());
|
||||
entity.setBizId(invoicingOrdersEntity.getBizId());
|
||||
entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
entity.setUpdateTime(new Date());
|
||||
baseMapper.updateById(entity);
|
||||
}
|
||||
}
|
||||
// /**
|
||||
// * 单元退货流程中提交时修改业务单号
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:updateOrderBizId");
|
||||
// log.info("PoolId:"+invoicingOrdersEntity.getPoolId());
|
||||
// log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
// log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
// empOrdersService.getNames(invoicingOrdersEntity);
|
||||
// QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
|
||||
// ioQw.eq("pool_id", invoicingOrdersEntity.getPoolId());
|
||||
// InvoicingOrders order = this.getOne(ioQw);
|
||||
// log.info("order:"+order);
|
||||
// if(order!=null){
|
||||
// log.info("OrderId:"+order.getId());
|
||||
// //修改请领单的bizId
|
||||
// InvoicingOrders entity = new InvoicingOrders();
|
||||
// entity.setId(order.getId());
|
||||
// entity.setBizId(invoicingOrdersEntity.getBizId());
|
||||
// entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
// entity.setUpdateTime(new Date());
|
||||
// baseMapper.updateById(entity);
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -32,252 +32,252 @@ import java.util.*;
|
|||
@Slf4j
|
||||
public class ThOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, InvoicingOrders> implements IThOrdersService, IInvoicingThOrdersApi {
|
||||
|
||||
@Autowired
|
||||
IEmpOrdersService empOrdersService;
|
||||
@Autowired
|
||||
private ISysConfigApi sysConfigApi;
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
private String serverNetUrl;
|
||||
|
||||
/**
|
||||
* 获取工单信息
|
||||
* @param invoicingOrdersEntity
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
log.info("function:getOrderInfo");
|
||||
log.info("id:"+invoicingOrdersEntity.getId());
|
||||
InvoicingOrders io = new InvoicingOrders();
|
||||
BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
if(entity!=null){
|
||||
InvoicingOrdersEntity ioe = new InvoicingOrdersEntity();
|
||||
BeanUtils.copyProperties(entity, ioe);
|
||||
return ioe;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 单元退货-仓库收货
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
@Override
|
||||
public void flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
empOrdersService.getNames(invoicingOrdersEntity);
|
||||
List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
|
||||
if(flowList!=null){
|
||||
Calendar c = Calendar.getInstance();
|
||||
InvoicingOrders flow = flowList.get(0);
|
||||
if(flow!=null){
|
||||
InvoicingOrders employee = empOrdersService.employeeScreening(flow.getDirectiveId(), invoicingOrdersEntity.getElderId(), c.getTime());
|
||||
insertNextOrder(flow,invoicingOrdersEntity,employee.getEmployeeId(),employee.getEmployeeName(),invoicingOrdersEntity.getInitiatorId(),invoicingOrdersEntity.getInitiatorName(),flow.getFlowCode(),"N");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否可提交
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
@Override
|
||||
public Map<String,String> izCanSubmit(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
log.info("function:izCanSubmit");
|
||||
log.info("PoolId:"+invoicingOrdersEntity.getPoolId());
|
||||
Map<String,String> map = new HashMap();
|
||||
map.put("error_code","0");
|
||||
map.put("msg","可以提交");
|
||||
InvoicingOrders io = new InvoicingOrders();
|
||||
BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
if(entity!=null){
|
||||
if(!"Y".equals(entity.getIzStart())) {
|
||||
map.put("error_code", "1");
|
||||
map.put("msg", "工单未开始");
|
||||
}
|
||||
}else{
|
||||
map.put("error_code","1");
|
||||
map.put("msg","工单不存在");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 单元退货流程中提交时修改业务单号
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
@Override
|
||||
public void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
log.info("function:updateOrderBizId");
|
||||
log.info("PoolId:"+invoicingOrdersEntity.getPoolId());
|
||||
log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
empOrdersService.getNames(invoicingOrdersEntity);
|
||||
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
|
||||
ioQw.eq("pool_id", invoicingOrdersEntity.getPoolId());
|
||||
InvoicingOrders order = this.getOne(ioQw);
|
||||
log.info("order:"+order);
|
||||
if(order!=null){
|
||||
log.info("OrderId:"+order.getId());
|
||||
//修改请领单的bizId
|
||||
InvoicingOrders entity = new InvoicingOrders();
|
||||
entity.setId(order.getId());
|
||||
entity.setBizId(invoicingOrdersEntity.getBizId());
|
||||
entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
entity.setUpdateTime(new Date());
|
||||
baseMapper.updateById(entity);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加下一步的工单
|
||||
* @param invoicingOrdersEntity
|
||||
* @param flowSub 下一节点
|
||||
* @param invoicingOrdersEntity 业务数据
|
||||
* @param employeeId 员工ID
|
||||
* @param employeeName 员工名称
|
||||
* @param bizType 操作指令编码
|
||||
*/
|
||||
private void insertNextOrder(InvoicingOrders flowSub,InvoicingOrdersEntity invoicingOrdersEntity,String employeeId,String employeeName,String initiatorId,String initiatorName,String bizType,String izRollback){
|
||||
Calendar c = Calendar.getInstance();
|
||||
getNetImages(flowSub);
|
||||
InvoicingOrders nextEntity = new InvoicingOrders();
|
||||
nextEntity.setPoolId(invoicingOrdersEntity.getPoolId());
|
||||
nextEntity.setBizType(bizType);
|
||||
nextEntity.setNuId(invoicingOrdersEntity.getNuId());
|
||||
nextEntity.setNuName(invoicingOrdersEntity.getNuName());
|
||||
nextEntity.setElderId(invoicingOrdersEntity.getElderId());
|
||||
nextEntity.setElderName(invoicingOrdersEntity.getElderName());
|
||||
nextEntity.setDirectiveId(flowSub.getDirectiveId());
|
||||
nextEntity.setDirectiveName(flowSub.getDirectiveName());
|
||||
nextEntity.setCycleTypeId(flowSub.getCycleTypeId());
|
||||
nextEntity.setCycleType(flowSub.getCycleType());
|
||||
nextEntity.setPreviewFile(flowSub.getPreviewFile());
|
||||
nextEntity.setNetPreviewFile(flowSub.getNetPreviewFile());
|
||||
nextEntity.setPreviewFileSmall(flowSub.getPreviewFileSmall());
|
||||
nextEntity.setNetPreviewFileSmall(flowSub.getNetPreviewFileSmall());
|
||||
nextEntity.setMp3File(flowSub.getMp3File());
|
||||
nextEntity.setNetMp3File(flowSub.getNetMp3File());
|
||||
nextEntity.setMp4File(flowSub.getMp4File());
|
||||
nextEntity.setNetMp4File(flowSub.getNetMp4File());
|
||||
nextEntity.setServiceDuration(flowSub.getServiceDuration());
|
||||
nextEntity.setServiceContent(flowSub.getServiceContent());
|
||||
nextEntity.setIzStart("N");
|
||||
nextEntity.setIzFinish("N");
|
||||
nextEntity.setIzRollback(izRollback);
|
||||
nextEntity.setCreateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
nextEntity.setCreateTime(c.getTime());
|
||||
nextEntity.setDelFlag("0");
|
||||
nextEntity.setInitiatorId(initiatorId);
|
||||
nextEntity.setInitiatorName(initiatorName);
|
||||
nextEntity.setStartTime(c.getTime());
|
||||
c.add(Calendar.MINUTE,Integer.valueOf(flowSub.getServiceDuration()));
|
||||
nextEntity.setEndTime(c.getTime());
|
||||
nextEntity.setEmployeeId(employeeId);
|
||||
nextEntity.setEmployeeName(employeeName);
|
||||
nextEntity.setPadPath(flowSub.getPadPath());
|
||||
getOrderNo(nextEntity);
|
||||
baseMapper.insert(nextEntity);
|
||||
|
||||
//ws推送 employeeId
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单号
|
||||
* @return
|
||||
*/
|
||||
private void getOrderNo(InvoicingOrders orders){
|
||||
String flowCode = orders.getBizType().toUpperCase();
|
||||
String[] parts = flowCode.split("_");
|
||||
String prefix = "";
|
||||
if(parts.length>0){
|
||||
prefix = parts[0];
|
||||
}
|
||||
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||
String deptCode = deptInfo.getString("code");
|
||||
String today = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
// 构建今天的前缀模式
|
||||
String todayPrefix = "CK" + prefix + deptCode + today;
|
||||
QueryWrapper<InvoicingOrders> qw = new QueryWrapper<>();
|
||||
qw.likeRight("order_no", todayPrefix);
|
||||
qw.select("order_no");
|
||||
qw.orderByDesc("order_no");
|
||||
qw.last("limit 1");
|
||||
InvoicingOrders entity = this.getOne(qw);
|
||||
int todayNo = 0;
|
||||
int totalNo = 0;
|
||||
if(entity!=null){
|
||||
String orderNo = entity.getOrderNo();
|
||||
if(orderNo!=null&&!orderNo.equals("")){
|
||||
String no = orderNo.substring(todayPrefix.length());
|
||||
String todayNoStr = no.substring(0,4);
|
||||
String totalNoStr = no.substring(5);
|
||||
todayNo = Integer.parseInt(todayNoStr);
|
||||
totalNo = Integer.parseInt(totalNoStr);
|
||||
}
|
||||
}
|
||||
todayNo = todayNo +1;
|
||||
totalNo = totalNo +1;
|
||||
String frontNo = String.format("%04d", todayNo);
|
||||
String backNo = String.format("%07d", totalNo);
|
||||
orders.setOrderNo(todayPrefix+frontNo+backNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取管理平台静态资源路径
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private void getOpeMediaAddress() {
|
||||
if (serverNetUrl == null || serverNetUrl.equals("")) {
|
||||
JSONObject json = sysConfigApi.getByKey("ope_media_address");
|
||||
if (json != null) {
|
||||
String configValue = json.getString("configValue");
|
||||
if (!configValue.endsWith("/")) {
|
||||
configValue += "/";
|
||||
}
|
||||
serverNetUrl = configValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getImageNetUrl(String imageUrl) {
|
||||
getOpeMediaAddress();
|
||||
return serverNetUrl + imageUrl;
|
||||
}
|
||||
|
||||
private InvoicingOrders getNetImages(InvoicingOrders invoicingOrders) {
|
||||
if (invoicingOrders.getPreviewFile() != null && !invoicingOrders.getPreviewFile().equals("")) {
|
||||
String netPreviewFile = getImageNetUrl(invoicingOrders.getPreviewFile());
|
||||
invoicingOrders.setNetPreviewFile(netPreviewFile);
|
||||
} else {
|
||||
invoicingOrders.setPreviewFile("");
|
||||
invoicingOrders.setNetPreviewFile("");
|
||||
}
|
||||
if (invoicingOrders.getPreviewFileSmall() != null && !invoicingOrders.getPreviewFileSmall().equals("")) {
|
||||
String netPreviewFileSmall = getImageNetUrl(invoicingOrders.getPreviewFileSmall());
|
||||
invoicingOrders.setNetPreviewFileSmall(netPreviewFileSmall);
|
||||
} else {
|
||||
invoicingOrders.setPreviewFileSmall("");
|
||||
invoicingOrders.setNetPreviewFileSmall("");
|
||||
}
|
||||
if (invoicingOrders.getMp3File() != null && !invoicingOrders.getMp3File().equals("")) {
|
||||
String netMp3File = getImageNetUrl(invoicingOrders.getMp3File());
|
||||
invoicingOrders.setNetMp3File(netMp3File);
|
||||
} else {
|
||||
invoicingOrders.setMp3File("");
|
||||
invoicingOrders.setNetMp3File("");
|
||||
}
|
||||
if (invoicingOrders.getMp4File() != null && !invoicingOrders.getMp4File().equals("")) {
|
||||
String netMp4File = getImageNetUrl(invoicingOrders.getMp4File());
|
||||
invoicingOrders.setNetMp4File(netMp4File);
|
||||
} else {
|
||||
invoicingOrders.setMp4File("");
|
||||
invoicingOrders.setNetMp4File("");
|
||||
}
|
||||
return invoicingOrders;
|
||||
}
|
||||
// @Autowired
|
||||
// IEmpOrdersService empOrdersService;
|
||||
// @Autowired
|
||||
// private ISysConfigApi sysConfigApi;
|
||||
// @Autowired
|
||||
// private ISysBaseAPI sysBaseAPI;
|
||||
// private String serverNetUrl;
|
||||
//
|
||||
// /**
|
||||
// * 获取工单信息
|
||||
// * @param invoicingOrdersEntity
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:getOrderInfo");
|
||||
// log.info("id:"+invoicingOrdersEntity.getId());
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
// InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
// if(entity!=null){
|
||||
// InvoicingOrdersEntity ioe = new InvoicingOrdersEntity();
|
||||
// BeanUtils.copyProperties(entity, ioe);
|
||||
// return ioe;
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 单元退货-仓库收货
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public void flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// empOrdersService.getNames(invoicingOrdersEntity);
|
||||
// List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
|
||||
// if(flowList!=null){
|
||||
// Calendar c = Calendar.getInstance();
|
||||
// InvoicingOrders flow = flowList.get(0);
|
||||
// if(flow!=null){
|
||||
// InvoicingOrders employee = empOrdersService.employeeScreening(flow.getDirectiveId(), invoicingOrdersEntity.getElderId(), c.getTime());
|
||||
// insertNextOrder(flow,invoicingOrdersEntity,employee.getEmployeeId(),employee.getEmployeeName(),invoicingOrdersEntity.getInitiatorId(),invoicingOrdersEntity.getInitiatorName(),flow.getFlowCode(),"N");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 是否可提交
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public Map<String,String> izCanSubmit(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:izCanSubmit");
|
||||
// log.info("PoolId:"+invoicingOrdersEntity.getPoolId());
|
||||
// Map<String,String> map = new HashMap();
|
||||
// map.put("error_code","0");
|
||||
// map.put("msg","可以提交");
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
// InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
// if(entity!=null){
|
||||
// if(!"Y".equals(entity.getIzStart())) {
|
||||
// map.put("error_code", "1");
|
||||
// map.put("msg", "工单未开始");
|
||||
// }
|
||||
// }else{
|
||||
// map.put("error_code","1");
|
||||
// map.put("msg","工单不存在");
|
||||
// }
|
||||
// return map;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 单元退货流程中提交时修改业务单号
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:updateOrderBizId");
|
||||
// log.info("PoolId:"+invoicingOrdersEntity.getPoolId());
|
||||
// log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
// log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
// empOrdersService.getNames(invoicingOrdersEntity);
|
||||
// QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
|
||||
// ioQw.eq("pool_id", invoicingOrdersEntity.getPoolId());
|
||||
// InvoicingOrders order = this.getOne(ioQw);
|
||||
// log.info("order:"+order);
|
||||
// if(order!=null){
|
||||
// log.info("OrderId:"+order.getId());
|
||||
// //修改请领单的bizId
|
||||
// InvoicingOrders entity = new InvoicingOrders();
|
||||
// entity.setId(order.getId());
|
||||
// entity.setBizId(invoicingOrdersEntity.getBizId());
|
||||
// entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
// entity.setUpdateTime(new Date());
|
||||
// baseMapper.updateById(entity);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 增加下一步的工单
|
||||
// * @param invoicingOrdersEntity
|
||||
// * @param flowSub 下一节点
|
||||
// * @param invoicingOrdersEntity 业务数据
|
||||
// * @param employeeId 员工ID
|
||||
// * @param employeeName 员工名称
|
||||
// * @param bizType 操作指令编码
|
||||
// */
|
||||
// private void insertNextOrder(InvoicingOrders flowSub,InvoicingOrdersEntity invoicingOrdersEntity,String employeeId,String employeeName,String initiatorId,String initiatorName,String bizType,String izRollback){
|
||||
// Calendar c = Calendar.getInstance();
|
||||
// getNetImages(flowSub);
|
||||
// InvoicingOrders nextEntity = new InvoicingOrders();
|
||||
// nextEntity.setPoolId(invoicingOrdersEntity.getPoolId());
|
||||
// nextEntity.setBizType(bizType);
|
||||
// nextEntity.setNuId(invoicingOrdersEntity.getNuId());
|
||||
// nextEntity.setNuName(invoicingOrdersEntity.getNuName());
|
||||
// nextEntity.setElderId(invoicingOrdersEntity.getElderId());
|
||||
// nextEntity.setElderName(invoicingOrdersEntity.getElderName());
|
||||
// nextEntity.setDirectiveId(flowSub.getDirectiveId());
|
||||
// nextEntity.setDirectiveName(flowSub.getDirectiveName());
|
||||
// nextEntity.setCycleTypeId(flowSub.getCycleTypeId());
|
||||
// nextEntity.setCycleType(flowSub.getCycleType());
|
||||
// nextEntity.setPreviewFile(flowSub.getPreviewFile());
|
||||
// nextEntity.setNetPreviewFile(flowSub.getNetPreviewFile());
|
||||
// nextEntity.setPreviewFileSmall(flowSub.getPreviewFileSmall());
|
||||
// nextEntity.setNetPreviewFileSmall(flowSub.getNetPreviewFileSmall());
|
||||
// nextEntity.setMp3File(flowSub.getMp3File());
|
||||
// nextEntity.setNetMp3File(flowSub.getNetMp3File());
|
||||
// nextEntity.setMp4File(flowSub.getMp4File());
|
||||
// nextEntity.setNetMp4File(flowSub.getNetMp4File());
|
||||
// nextEntity.setServiceDuration(flowSub.getServiceDuration());
|
||||
// nextEntity.setServiceContent(flowSub.getServiceContent());
|
||||
// nextEntity.setIzStart("N");
|
||||
// nextEntity.setIzFinish("N");
|
||||
// nextEntity.setIzRollback(izRollback);
|
||||
// nextEntity.setCreateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
// nextEntity.setCreateTime(c.getTime());
|
||||
// nextEntity.setDelFlag("0");
|
||||
// nextEntity.setInitiatorId(initiatorId);
|
||||
// nextEntity.setInitiatorName(initiatorName);
|
||||
// nextEntity.setStartTime(c.getTime());
|
||||
// c.add(Calendar.MINUTE,Integer.valueOf(flowSub.getServiceDuration()));
|
||||
// nextEntity.setEndTime(c.getTime());
|
||||
// nextEntity.setEmployeeId(employeeId);
|
||||
// nextEntity.setEmployeeName(employeeName);
|
||||
// nextEntity.setPadPath(flowSub.getPadPath());
|
||||
// getOrderNo(nextEntity);
|
||||
// baseMapper.insert(nextEntity);
|
||||
//
|
||||
// //ws推送 employeeId
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取单号
|
||||
// * @return
|
||||
// */
|
||||
// private void getOrderNo(InvoicingOrders orders){
|
||||
// String flowCode = orders.getBizType().toUpperCase();
|
||||
// String[] parts = flowCode.split("_");
|
||||
// String prefix = "";
|
||||
// if(parts.length>0){
|
||||
// prefix = parts[0];
|
||||
// }
|
||||
// JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||
// String deptCode = deptInfo.getString("code");
|
||||
// String today = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
// // 构建今天的前缀模式
|
||||
// String todayPrefix = "CK" + prefix + deptCode + today;
|
||||
// QueryWrapper<InvoicingOrders> qw = new QueryWrapper<>();
|
||||
// qw.likeRight("order_no", todayPrefix);
|
||||
// qw.select("order_no");
|
||||
// qw.orderByDesc("order_no");
|
||||
// qw.last("limit 1");
|
||||
// InvoicingOrders entity = this.getOne(qw);
|
||||
// int todayNo = 0;
|
||||
// int totalNo = 0;
|
||||
// if(entity!=null){
|
||||
// String orderNo = entity.getOrderNo();
|
||||
// if(orderNo!=null&&!orderNo.equals("")){
|
||||
// String no = orderNo.substring(todayPrefix.length());
|
||||
// String todayNoStr = no.substring(0,4);
|
||||
// String totalNoStr = no.substring(5);
|
||||
// todayNo = Integer.parseInt(todayNoStr);
|
||||
// totalNo = Integer.parseInt(totalNoStr);
|
||||
// }
|
||||
// }
|
||||
// todayNo = todayNo +1;
|
||||
// totalNo = totalNo +1;
|
||||
// String frontNo = String.format("%04d", todayNo);
|
||||
// String backNo = String.format("%07d", totalNo);
|
||||
// orders.setOrderNo(todayPrefix+frontNo+backNo);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取管理平台静态资源路径
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// private void getOpeMediaAddress() {
|
||||
// if (serverNetUrl == null || serverNetUrl.equals("")) {
|
||||
// JSONObject json = sysConfigApi.getByKey("ope_media_address");
|
||||
// if (json != null) {
|
||||
// String configValue = json.getString("configValue");
|
||||
// if (!configValue.endsWith("/")) {
|
||||
// configValue += "/";
|
||||
// }
|
||||
// serverNetUrl = configValue;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private String getImageNetUrl(String imageUrl) {
|
||||
// getOpeMediaAddress();
|
||||
// return serverNetUrl + imageUrl;
|
||||
// }
|
||||
//
|
||||
// private InvoicingOrders getNetImages(InvoicingOrders invoicingOrders) {
|
||||
// if (invoicingOrders.getPreviewFile() != null && !invoicingOrders.getPreviewFile().equals("")) {
|
||||
// String netPreviewFile = getImageNetUrl(invoicingOrders.getPreviewFile());
|
||||
// invoicingOrders.setNetPreviewFile(netPreviewFile);
|
||||
// } else {
|
||||
// invoicingOrders.setPreviewFile("");
|
||||
// invoicingOrders.setNetPreviewFile("");
|
||||
// }
|
||||
// if (invoicingOrders.getPreviewFileSmall() != null && !invoicingOrders.getPreviewFileSmall().equals("")) {
|
||||
// String netPreviewFileSmall = getImageNetUrl(invoicingOrders.getPreviewFileSmall());
|
||||
// invoicingOrders.setNetPreviewFileSmall(netPreviewFileSmall);
|
||||
// } else {
|
||||
// invoicingOrders.setPreviewFileSmall("");
|
||||
// invoicingOrders.setNetPreviewFileSmall("");
|
||||
// }
|
||||
// if (invoicingOrders.getMp3File() != null && !invoicingOrders.getMp3File().equals("")) {
|
||||
// String netMp3File = getImageNetUrl(invoicingOrders.getMp3File());
|
||||
// invoicingOrders.setNetMp3File(netMp3File);
|
||||
// } else {
|
||||
// invoicingOrders.setMp3File("");
|
||||
// invoicingOrders.setNetMp3File("");
|
||||
// }
|
||||
// if (invoicingOrders.getMp4File() != null && !invoicingOrders.getMp4File().equals("")) {
|
||||
// String netMp4File = getImageNetUrl(invoicingOrders.getMp4File());
|
||||
// invoicingOrders.setNetMp4File(netMp4File);
|
||||
// } else {
|
||||
// invoicingOrders.setMp4File("");
|
||||
// invoicingOrders.setNetMp4File("");
|
||||
// }
|
||||
// return invoicingOrders;
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue