Commit c76a2465 by jiangyun

修改

parent 65e22788
...@@ -115,4 +115,7 @@ public interface SysDeptMapper ...@@ -115,4 +115,7 @@ public interface SysDeptMapper
* @return 结果 * @return 结果
*/ */
public int deleteDeptById(Long deptId); public int deleteDeptById(Long deptId);
List<SysDept> selectDeptListByParentId(Long parentId);
} }
...@@ -133,4 +133,7 @@ public interface SysUserMapper ...@@ -133,4 +133,7 @@ public interface SysUserMapper
List<SysUser> selectUserListByRoleKey(String roleKey); List<SysUser> selectUserListByRoleKey(String roleKey);
List<SysUser> selectUserLoginNamesByRoleKeyAndDeptId(Long deptId, String roleKey, String deptName);
} }
...@@ -209,4 +209,7 @@ public interface ISysUserService ...@@ -209,4 +209,7 @@ public interface ISysUserService
List<String> selectUserLoginNamesByRoleKeyDept(Long secondaryUnit, String lcsp1); List<String> selectUserLoginNamesByRoleKeyDept(Long secondaryUnit, String lcsp1);
List<String> selectUserLoginNamesByRoleKeyDept2(Long secondaryUnit, String s); List<String> selectUserLoginNamesByRoleKeyDept2(Long secondaryUnit, String s);
List<String> selectUserLoginNamesByRoleKeyAndDeptId(Long secondaryUnit, String gcAqsp,String deptName);
} }
package com.zjsgfa.project.system.service.impl; package com.zjsgfa.project.system.service.impl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.validation.Validator; import javax.validation.Validator;
...@@ -557,9 +558,7 @@ public class SysUserServiceImpl implements ISysUserService ...@@ -557,9 +558,7 @@ public class SysUserServiceImpl implements ISysUserService
public List<String> selectUserLoginNamesByRoleKeyDept(Long deptId, String roleKey) { public List<String> selectUserLoginNamesByRoleKeyDept(Long deptId, String roleKey) {
List<SysUser> userList=userMapper.selectUserLoginNamesByRoleKeyDept(deptId,roleKey); List<SysUser> userList=userMapper.selectUserLoginNamesByRoleKeyDept(deptId,roleKey);
List<String> collect = userList.stream().map(SysUser::getUserName).collect(Collectors.toList()); List<String> collect = userList.stream().map(SysUser::getUserName).collect(Collectors.toList());
if(collect.size()==0){
collect.add("chenggq58");
}
return collect; return collect;
} }
...@@ -567,9 +566,13 @@ public class SysUserServiceImpl implements ISysUserService ...@@ -567,9 +566,13 @@ public class SysUserServiceImpl implements ISysUserService
public List<String> selectUserLoginNamesByRoleKeyDept2(Long deptId, String roleKey) { public List<String> selectUserLoginNamesByRoleKeyDept2(Long deptId, String roleKey) {
List<SysUser> userList=userMapper.selectUserLoginNamesByRoleKeyDept(deptId,roleKey); List<SysUser> userList=userMapper.selectUserLoginNamesByRoleKeyDept(deptId,roleKey);
List<String> collect = userList.stream().map(SysUser::getNickName).collect(Collectors.toList()); List<String> collect = userList.stream().map(SysUser::getNickName).collect(Collectors.toList());
if(collect.size()==0){ return collect;
collect.add("成冠琪");
} }
@Override
public List<String> selectUserLoginNamesByRoleKeyAndDeptId(Long deptId, String roleKey, String deptName) {
List<SysUser> userList=userMapper.selectUserLoginNamesByRoleKeyAndDeptId(deptId,roleKey,deptName);
List<String> collect = userList.stream().map(SysUser::getUserName).collect(Collectors.toList());
return collect; return collect;
} }
} }
...@@ -114,6 +114,12 @@ public class SjLjfzqkController extends BaseController ...@@ -114,6 +114,12 @@ public class SjLjfzqkController extends BaseController
} }
@PostMapping("/plSave")
public AjaxResult plSave(@RequestBody List<SjLjfzqk> list) throws Exception
{
return toAjax(sjLjfzqkService.insertSjLjfzqkBatch2(list));
}
} }
...@@ -110,7 +110,7 @@ public class SjLjjw extends BaseEntity ...@@ -110,7 +110,7 @@ public class SjLjjw extends BaseEntity
//完钻垂直井深 //完钻垂直井深
private Double wzczjs; private Double wzczjs;
//钻机台月 //钻机台月
private Double zjy; private String zjy;
//建井周期 //建井周期
private String jjzq1; private String jjzq1;
......
...@@ -62,4 +62,5 @@ public interface ISjLjfzqkService ...@@ -62,4 +62,5 @@ public interface ISjLjfzqkService
int insertSjLjfzqkBatch(List<SjLjjw> list); int insertSjLjfzqkBatch(List<SjLjjw> list);
int insertSjLjfzqkBatch2(List<SjLjfzqk> list);
} }
...@@ -124,4 +124,13 @@ public class SjLjfzqkServiceImpl implements ISjLjfzqkService ...@@ -124,4 +124,13 @@ public class SjLjfzqkServiceImpl implements ISjLjfzqkService
return 1; return 1;
} }
@Override
public int insertSjLjfzqkBatch2(List<SjLjfzqk> list) {
String jh = list.get(0).getJh();
SjDjjc sjDjjc = sjDjjcMapper.selectSjDjjcByJh(jh);
//先删除已有数据
sjLjfzqkMapper.deleteSjLjfzqkByJh(sjDjjc.getId());
return sjLjfzqkMapper.insertSjLjfzqkBatch(list);
}
} }
...@@ -59,7 +59,7 @@ public class SjZysxServiceImpl implements ISjZysxService ...@@ -59,7 +59,7 @@ public class SjZysxServiceImpl implements ISjZysxService
public int insertSjZysx(SjZysx sjZysx) public int insertSjZysx(SjZysx sjZysx)
{ {
String lb = sjZysx.getLb(); String lb = sjZysx.getLb();
if("喷漏卡塌".equals(lb) || "特殊岩性风险".equals(lb)){ if("喷漏卡塌".equals(lb) || "特殊岩性风险".equals(lb)|| "浅层气".equals(lb)){
if(StringUtils.isNotEmpty(sjZysx.getZysx())){ if(StringUtils.isNotEmpty(sjZysx.getZysx())){
sjZysx.setZysx(new String(Base64.decode(sjZysx.getZysx()), StandardCharsets.UTF_8)); sjZysx.setZysx(new String(Base64.decode(sjZysx.getZysx()), StandardCharsets.UTF_8));
} }
...@@ -77,7 +77,7 @@ public class SjZysxServiceImpl implements ISjZysxService ...@@ -77,7 +77,7 @@ public class SjZysxServiceImpl implements ISjZysxService
public int updateSjZysx(SjZysx sjZysx) public int updateSjZysx(SjZysx sjZysx)
{ {
String lb = sjZysx.getLb(); String lb = sjZysx.getLb();
if("喷漏卡塌".equals(lb) || "特殊岩性风险".equals(lb)){ if("喷漏卡塌".equals(lb) || "特殊岩性风险".equals(lb)|| "浅层气".equals(lb)){
if(StringUtils.isNotEmpty(sjZysx.getZysx())){ if(StringUtils.isNotEmpty(sjZysx.getZysx())){
sjZysx.setZysx(new String(Base64.decode(sjZysx.getZysx()), StandardCharsets.UTF_8)); sjZysx.setZysx(new String(Base64.decode(sjZysx.getZysx()), StandardCharsets.UTF_8));
} }
......
...@@ -86,6 +86,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -86,6 +86,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectDeptVo"/> <include refid="selectDeptVo"/>
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1 where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
</select> </select>
<select id="selectDeptListByParentId" resultType="com.zjsgfa.project.system.domain.SysDept">
select * from sys_dept where parent_id = #{parentId} and del_flag = '0'
</select>
<insert id="insertDept" parameterType="SysDept"> <insert id="insertDept" parameterType="SysDept">
insert into sys_dept( insert into sys_dept(
......
...@@ -159,6 +159,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -159,6 +159,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select * from sys_user where user_id in ( select user_id from sys_user_role where role_id = ( select role_id from sys_role where role_key = #{roleKey} ) ) select * from sys_user where user_id in ( select user_id from sys_user_role where role_id = ( select role_id from sys_role where role_key = #{roleKey} ) )
and del_flag = '0' and del_flag = '0'
</select> </select>
<select id="selectUserLoginNamesByRoleKeyAndDeptId" resultType="com.zjsgfa.project.system.domain.SysUser">
select a.*, r.role_key, role_name
from sys_user a
left join sys_dept d on a.dept_id = d.dept_id
left join sys_user_role ur on a.user_id = ur.user_id
left join sys_role r on ur.role_id = r.role_id
where 1 = 1
and a.dept_id in (select dept_id from sys_dept where parent_id = #{deptId} and dept_name = #{deptName})
and role_key =#{roleKey}
</select>
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId"> <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
insert into sys_user( insert into sys_user(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment