|
|
|
@ -21,6 +21,7 @@ import com.spring.modules.sys.dao.SysUserDao; |
|
|
|
import com.spring.modules.sys.entity.SysUserEntity; |
|
|
|
import ifs.fnd.ap.Server; |
|
|
|
import org.apache.shiro.SecurityUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
@ -54,6 +55,8 @@ public class ToolServiceImpl implements ToolService { |
|
|
|
@Autowired |
|
|
|
private SysUserDao sysUserDao; |
|
|
|
|
|
|
|
private static final Logger logger = org.slf4j.LoggerFactory.getLogger(ToolServiceImpl.class); |
|
|
|
|
|
|
|
@Value("${ifs-api.api-url}") |
|
|
|
private String apiUrl; |
|
|
|
@Value("${ifs-control.control-flag}") |
|
|
|
@ -155,6 +158,7 @@ public class ToolServiceImpl implements ToolService { |
|
|
|
if (controlFlag) { |
|
|
|
//获取当前操作的账号 |
|
|
|
String username = ((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername(); |
|
|
|
logger.info("当前操作的账号为:{}", username); |
|
|
|
SysUserEntity ifsUser = sysUserDao.selectOne(new QueryWrapper<SysUserEntity>().eq("username", username)); |
|
|
|
if (ifsUser == null || !org.apache.commons.lang3.StringUtils.isNotBlank(ifsUser.getIfsUsername()) || !org.apache.commons.lang3.StringUtils.isNotBlank(ifsUser.getIfsPassword())) { |
|
|
|
throw new RuntimeException("请维护IFS账号和密码!"); |
|
|
|
@ -909,7 +913,7 @@ public class ToolServiceImpl implements ToolService { |
|
|
|
throw new RuntimeException("ifs Tool新增异常:" + returnMap.get("resultMsg")); |
|
|
|
} |
|
|
|
// 更新 ifs_row_id ifs_row_version |
|
|
|
String objStr = returnMap.get("objStr"); |
|
|
|
String objStr = returnMap.get("obj"); |
|
|
|
ToolInfo returnTool = JSON.parseObject(objStr, ToolInfo.class); |
|
|
|
ifsTool.setIfsRowId(returnTool.getIfsRowId()); |
|
|
|
ifsTool.setIfsRowVersion(returnTool.getIfsRowVersion()); |
|
|
|
@ -930,7 +934,7 @@ public class ToolServiceImpl implements ToolService { |
|
|
|
throw new RuntimeException("ifs Tool修改异常:" + returnMap.get("resultMsg")); |
|
|
|
} |
|
|
|
// 更新 ifs_row_id ifs_row_version |
|
|
|
String objStr = returnMap.get("objStr"); |
|
|
|
String objStr = returnMap.get("obj"); |
|
|
|
ToolInfo returnTool = JSON.parseObject(objStr, ToolInfo.class); |
|
|
|
ifsTool.setIfsRowId(returnTool.getIfsRowId()); |
|
|
|
ifsTool.setIfsRowVersion(returnTool.getIfsRowVersion()); |
|
|
|
@ -966,7 +970,7 @@ public class ToolServiceImpl implements ToolService { |
|
|
|
throw new RuntimeException("ifs Tool Instance新增异常:" + returnMap.get("resultMsg")); |
|
|
|
} |
|
|
|
// 更新 ifs_row_id ifs_row_version |
|
|
|
String objStr = returnMap.get("objStr"); |
|
|
|
String objStr = returnMap.get("obj"); |
|
|
|
ToolInfo returnTool = JSON.parseObject(objStr, ToolInfo.class); |
|
|
|
ifsTool.setIfsRowId(returnTool.getIfsRowId()); |
|
|
|
ifsTool.setIfsRowVersion(returnTool.getIfsRowVersion()); |
|
|
|
@ -987,7 +991,7 @@ public class ToolServiceImpl implements ToolService { |
|
|
|
throw new RuntimeException("ifs Tool Instance修改异常:" + returnMap.get("resultMsg")); |
|
|
|
} |
|
|
|
// 更新 ifs_row_id ifs_row_version |
|
|
|
String objStr = returnMap.get("objStr"); |
|
|
|
String objStr = returnMap.get("obj"); |
|
|
|
ToolInfo returnTool = JSON.parseObject(objStr, ToolInfo.class); |
|
|
|
ifsTool.setIfsRowId(returnTool.getIfsRowId()); |
|
|
|
ifsTool.setIfsRowVersion(returnTool.getIfsRowVersion()); |
|
|
|
|