Compare commits
2 Commits
9d129fae53
...
f32f647c11
Author | SHA1 | Date |
---|---|---|
|
f32f647c11 | |
|
bf1d2ce0a7 |
|
@ -115,7 +115,7 @@ public class ProProjectInfoSubdeptsUsers extends BaseEntity
|
||||||
@Excel(name = "学历类型")
|
@Excel(name = "学历类型")
|
||||||
private String degreeGradeName;
|
private String degreeGradeName;
|
||||||
|
|
||||||
/** 手机号码 */
|
/** 用户详情 */
|
||||||
private String userInfos;
|
private String userInfos;
|
||||||
|
|
||||||
/** 工种类型 */
|
/** 工种类型 */
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.yanzhu.manage.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsGroup;
|
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsGroup;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分包单位班组Mapper接口
|
* 分包单位班组Mapper接口
|
||||||
|
@ -64,4 +65,6 @@ public interface ProProjectInfoSubdeptsGroupMapper
|
||||||
* @param subDeptId
|
* @param subDeptId
|
||||||
*/
|
*/
|
||||||
public void updateUseStatusByParams(Long subDeptId);
|
public void updateUseStatusByParams(Long subDeptId);
|
||||||
|
|
||||||
|
public int updatePhone(@Param("oldUserPhone")String oldUserPhone, @Param("newUserPhone")String newUserPhone);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.yanzhu.manage.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.yanzhu.manage.domain.ProProjectInfoSubdepts;
|
import com.yanzhu.manage.domain.ProProjectInfoSubdepts;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分包单位Mapper接口
|
* 分包单位Mapper接口
|
||||||
|
@ -58,4 +59,6 @@ public interface ProProjectInfoSubdeptsMapper
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteProProjectInfoSubdeptsByIds(Long[] ids);
|
public int deleteProProjectInfoSubdeptsByIds(Long[] ids);
|
||||||
|
|
||||||
|
public int updatePhone(@Param("oldUserPhone")String oldUserPhone, @Param("newUserPhone")String newUserPhone);
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,5 +114,11 @@ public interface ProProjectInfoSubdeptsUsersMapper
|
||||||
* @param id 项目人员主键
|
* @param id 项目人员主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int editDefaultProjectById(Long id);
|
public int editDefaultProjectById(Long id);
|
||||||
|
|
||||||
|
public Map<String, Object> findUserPhone(String userPhone);
|
||||||
|
|
||||||
|
public int updateUserPhone(@Param("oldUserPhone")String oldUserPhone, @Param("newUserPhone")String newUserPhone);
|
||||||
|
|
||||||
|
public int updatePhone(@Param("oldUserPhone")String oldUserPhone, @Param("newUserPhone")String newUserPhone);
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,4 +162,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
update pro_project_info_subdepts_group set use_status = 2 where sub_dept_id = #{subDeptId}
|
update pro_project_info_subdepts_group set use_status = 2 where sub_dept_id = #{subDeptId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updatePhone">
|
||||||
|
update pro_project_info_subdepts_group set group_leader_phone = #{newUserPhone} where group_leader_phone = #{oldUserPhone}
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -164,4 +164,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updatePhone">
|
||||||
|
update pro_project_info_subdepts set sub_dept_leader_phone = #{newUserPhone} where sub_dept_leader_phone = #{oldUserPhone}
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -350,4 +350,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
update pro_project_info_subdepts_users set sort_by = project_id where user_id = #{userId}
|
update pro_project_info_subdepts_users set sort_by = project_id where user_id = #{userId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="findUserPhone" resultType="Map">
|
||||||
|
select count(1) as total from sys_user su where (user_name = #{userPhone} or phonenumber = #{userPhone})
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updateUserPhone">
|
||||||
|
update sys_user set user_name = #{newUserPhone}, phonenumber = #{newUserPhone} where phonenumber = #{oldUserPhone}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="updatePhone">
|
||||||
|
update pro_project_info_subdepts_users set user_phone = #{newUserPhone} where user_phone = #{oldUserPhone}
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -21,7 +21,6 @@ import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -126,6 +125,18 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
|
||||||
return toAjax(proProjectInfoSubdeptsUsersService.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers));
|
return toAjax(proProjectInfoSubdeptsUsersService.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更手机号码
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("manage:proProjectInfoSubdeptsUsers:editPhone")
|
||||||
|
@Log(title = "变更手机号", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/editPhone")
|
||||||
|
public AjaxResult editPhone(@RequestBody ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
|
||||||
|
{
|
||||||
|
proProjectInfoSubdeptsUsersService.updateProProjectInfoSubdeptsUsersPhone(proProjectInfoSubdeptsUsers);
|
||||||
|
return success();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除分包单位工人
|
* 删除分包单位工人
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -63,6 +63,14 @@ public interface IProProjectInfoSubdeptsUsersService
|
||||||
*/
|
*/
|
||||||
public int updateProProjectInfoSubdeptsUsers(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
|
public int updateProProjectInfoSubdeptsUsers(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更手机号码
|
||||||
|
*
|
||||||
|
* @param proProjectInfoSubdeptsUsers 分包单位工人
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public void updateProProjectInfoSubdeptsUsersPhone(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改分包单位工人
|
* 修改分包单位工人
|
||||||
*
|
*
|
||||||
|
|
|
@ -75,7 +75,14 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
||||||
@Override
|
@Override
|
||||||
public ProProjectInfoSubdepts selectProProjectInfoSubdeptsById(Long id)
|
public ProProjectInfoSubdepts selectProProjectInfoSubdeptsById(Long id)
|
||||||
{
|
{
|
||||||
return proProjectInfoSubdeptsMapper.selectProProjectInfoSubdeptsById(id);
|
ProProjectInfoSubdepts proProjectInfoSubdepts = proProjectInfoSubdeptsMapper.selectProProjectInfoSubdeptsById(id);
|
||||||
|
if(Objects.equals(proProjectInfoSubdepts.getSubDeptType(),SubDeptsEnums.ZYFB.getCode()) || Objects.equals(proProjectInfoSubdepts.getSubDeptType(),SubDeptsEnums.LWFB.getCode())){
|
||||||
|
ProProjectInfoSubdeptsUsers leaderUser = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersByParamId(proProjectInfoSubdepts.getProjectId(),proProjectInfoSubdepts.getSubDeptLeaderId());
|
||||||
|
if(Objects.nonNull(leaderUser)){
|
||||||
|
proProjectInfoSubdepts.setProProjectInfoSubdeptsUsers(leaderUser);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return proProjectInfoSubdepts;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -598,6 +598,26 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 变更手机号码
|
||||||
|
*
|
||||||
|
* @param proProjectInfoSubdeptsUsers 分包单位工人
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void updateProProjectInfoSubdeptsUsersPhone(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers){
|
||||||
|
Map<String, Object> map = proProjectInfoSubdeptsUsersMapper.findUserPhone(proProjectInfoSubdeptsUsers.getUserPhone());
|
||||||
|
if(Objects.nonNull(map) && Convert.toInt(map.get("total"),0)>0){
|
||||||
|
throw new ServiceException("手机号码已被注册");
|
||||||
|
}
|
||||||
|
ProProjectInfoSubdeptsUsers entity = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersById(proProjectInfoSubdeptsUsers.getId());
|
||||||
|
proProjectInfoSubdeptsMapper.updatePhone(entity.getUserPhone(),proProjectInfoSubdeptsUsers.getUserPhone());
|
||||||
|
proProjectInfoSubdeptsGroupMapper.updatePhone(entity.getUserPhone(),proProjectInfoSubdeptsUsers.getUserPhone());
|
||||||
|
proProjectInfoSubdeptsUsersMapper.updatePhone(entity.getUserPhone(),proProjectInfoSubdeptsUsers.getUserPhone());
|
||||||
|
proProjectInfoSubdeptsUsersMapper.(entity.getUserPhone(),proProjectInfoSubdeptsUsers.getUserPhone());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**updateUserPhone
|
||||||
* 修改分包单位工人
|
* 修改分包单位工人
|
||||||
*
|
*
|
||||||
* @param proProjectInfoSubdeptsUsers 分包单位工人
|
* @param proProjectInfoSubdeptsUsers 分包单位工人
|
||||||
|
|
|
@ -44,6 +44,15 @@ export function updateProProjectInfoSubdeptsUsers(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 修改手机号码
|
||||||
|
export function editPhone(data) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/proProjectInfoSubdeptsUsers/editPhone',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 删除分包单位工人
|
// 删除分包单位工人
|
||||||
export function delProProjectInfoSubdeptsUsers(id) {
|
export function delProProjectInfoSubdeptsUsers(id) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -196,12 +196,12 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="身份证正面">
|
<el-form-item label="身份证正面">
|
||||||
<image-upload v-model="form.leaderCardImgPos" :limit="1" />
|
<image-upload v-model="form.leaderUserInfos.cardImgPos" :limit="1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="身份证反面">
|
<el-form-item label="身份证反面">
|
||||||
<image-upload v-model="form.leaderCardImgInv" :limit="1" />
|
<image-upload v-model="form.leaderUserInfos.cardImgInv" :limit="1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -312,7 +312,8 @@ function reset() {
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null,
|
updateTime: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
subDeptInfos: {}
|
subDeptInfos: {},
|
||||||
|
leaderUserInfos:{}
|
||||||
};
|
};
|
||||||
proxy.resetForm("proProjectInfoSubdeptsRef");
|
proxy.resetForm("proProjectInfoSubdeptsRef");
|
||||||
}
|
}
|
||||||
|
@ -356,6 +357,13 @@ function handleUpdate(row) {
|
||||||
const _id = row.id || ids.value
|
const _id = row.id || ids.value
|
||||||
getProProjectInfoSubdepts(_id).then(response => {
|
getProProjectInfoSubdepts(_id).then(response => {
|
||||||
response.data.subDeptInfos = JSON.parse(response.data.subDeptInfos);
|
response.data.subDeptInfos = JSON.parse(response.data.subDeptInfos);
|
||||||
|
if(response.data.proProjectInfoSubdeptsUsers){
|
||||||
|
response.data.leaderUserPicture = response.data.proProjectInfoSubdeptsUsers.userPicture;
|
||||||
|
response.data.subDeptLeaderPowerPath = response.data.proProjectInfoSubdeptsUsers.subDeptPowerPath;
|
||||||
|
if(response.data.proProjectInfoSubdeptsUsers.userInfos){
|
||||||
|
response.data.leaderUserInfos = JSON.parse(response.data.proProjectInfoSubdeptsUsers.userInfos);
|
||||||
|
}
|
||||||
|
}
|
||||||
form.value = response.data;
|
form.value = response.data;
|
||||||
open.value = true;
|
open.value = true;
|
||||||
title.value = "修改参建单位";
|
title.value = "修改参建单位";
|
||||||
|
|
|
@ -109,6 +109,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="工种岗位" align="center" prop="craftPost">
|
<el-table-column label="工种岗位" align="center" prop="craftPost">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<div><el-button v-if="scope.row.userPost=='3'" link type="warning" disabled> 班组长 </el-button></div>
|
||||||
<dict-tag :options="pro_craft_post" :value="scope.row.craftPost" />
|
<dict-tag :options="pro_craft_post" :value="scope.row.craftPost" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -158,6 +159,7 @@
|
||||||
v-hasPermi="['manage:proProjectInfoSubdeptsUsers:edit']">重新生成文件</el-button>
|
v-hasPermi="['manage:proProjectInfoSubdeptsUsers:edit']">重新生成文件</el-button>
|
||||||
<el-button v-if="isSign(scope.row)" link type="primary" icon="StarFilled" @click="handleFileSign(scope.row)"
|
<el-button v-if="isSign(scope.row)" link type="primary" icon="StarFilled" @click="handleFileSign(scope.row)"
|
||||||
v-hasPermi="['manage:proProjectInfoSubdeptsUsers:edit']">文件重新签名</el-button>
|
v-hasPermi="['manage:proProjectInfoSubdeptsUsers:edit']">文件重新签名</el-button>
|
||||||
|
<el-button link type="primary" icon="WarnTriangleFilled" @click="handleUpdatePhone(scope.row)" v-hasPermi="['manage:proProjectInfoSubdeptsUsers:editPhone']">手机号变更</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -327,7 +329,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="ProProjectInfoSubdeptsUsers">
|
<script setup name="ProProjectInfoSubdeptsUsers">
|
||||||
import { listProProjectInfoSubdeptsUsers, getProProjectInfoSubdeptsUsers, updateEnterState, delProProjectInfoSubdeptsUsers, addProProjectInfoSubdeptsUsers, updateProProjectInfoSubdeptsUsers, fileSign } from "@/api/manage/proProjectInfoSubdeptsUsers";
|
import { listProProjectInfoSubdeptsUsers, getProProjectInfoSubdeptsUsers, updateEnterState, delProProjectInfoSubdeptsUsers, addProProjectInfoSubdeptsUsers, updateProProjectInfoSubdeptsUsers, editPhone, fileSign } from "@/api/manage/proProjectInfoSubdeptsUsers";
|
||||||
import { listProProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts";
|
import { listProProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts";
|
||||||
import { listProProjectInfoSubdeptsGroup } from "@/api/manage/proProjectInfoSubdeptsGroup";
|
import { listProProjectInfoSubdeptsGroup } from "@/api/manage/proProjectInfoSubdeptsGroup";
|
||||||
import { listUser } from "@/api/system/user";
|
import { listUser } from "@/api/system/user";
|
||||||
|
@ -786,6 +788,26 @@ function handleUpdate(row) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 修改手机号码 */
|
||||||
|
function handleUpdatePhone(row) {
|
||||||
|
proxy.$prompt('请输入"' + row.userName + '"的新手机号码', "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
closeOnClickModal: false,
|
||||||
|
inputPattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||||
|
inputErrorMessage: "请输入正确的手机号码",
|
||||||
|
}).then(({ value }) => {
|
||||||
|
let datas = {
|
||||||
|
id:row.id,
|
||||||
|
userPhone:value
|
||||||
|
}
|
||||||
|
editPhone(datas).then(response => {
|
||||||
|
proxy.$modal.msgSuccess("变更手机号成功");
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
|
|
||||||
function isSign(row){
|
function isSign(row){
|
||||||
if(row.approveStatus==100){
|
if(row.approveStatus==100){
|
||||||
if(row.userPost=='1' || row.userPost=='2' || row.userPost=='3' || row.userPost=='6' || row.userPost=='8'){
|
if(row.userPost=='1' || row.userPost=='2' || row.userPost=='3' || row.userPost=='6' || row.userPost=='8'){
|
||||||
|
|
Loading…
Reference in New Issue