提交代码

dev_xd
姜玉琦 2025-03-05 23:22:11 +08:00
parent c02f15dc7b
commit 7820a68145
32 changed files with 432 additions and 250 deletions

View File

@ -25,6 +25,17 @@ public class PageUtils extends PageHelper
PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
}
/**
*
*/
public static void startPage(Integer pageNum, Integer pageSize)
{
PageDomain pageDomain = TableSupport.buildPageRequest();
String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
Boolean reasonable = pageDomain.getReasonable();
PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
}
/**
* 线
*/

View File

@ -49,6 +49,14 @@ public class BaseController
PageUtils.startPage();
}
/**
*
*/
protected void startPage(Integer pageNum, Integer pageSize)
{
PageUtils.startPage(pageNum,pageSize);
}
/**
* 线
*/

View File

@ -145,6 +145,10 @@ public class SmzSspProblemmodify extends BaseEntity
@Excel(name = "问题类型", readConverterExp = "1=常规问题2专项问题")
private String problemType;
private String problemTypeName;
private String dangerTypeName;
private String createUserName;
public void setId(Long id)
{
this.id = id;
@ -434,6 +438,30 @@ public class SmzSspProblemmodify extends BaseEntity
return problemType;
}
public String getProblemTypeName() {
return problemTypeName;
}
public void setProblemTypeName(String problemTypeName) {
this.problemTypeName = problemTypeName;
}
public String getDangerTypeName() {
return dangerTypeName;
}
public void setDangerTypeName(String dangerTypeName) {
this.dangerTypeName = dangerTypeName;
}
public String getCreateUserName() {
return createUserName;
}
public void setCreateUserName(String createUserName) {
this.createUserName = createUserName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -153,7 +153,7 @@
<!--查询我的已办任务-->
<select id="selectMySubdeptsGroups" resultType="Map">
select id, sub_dept_group from pro_project_info_subdepts_users where project_id = #{proId} and user_id = #{userId} and user_post = 3 and approve_status <![CDATA[ >= ]]> 100 and is_del=0 and sub_dept_group is not null
select id, sub_dept_name, sub_dept_group, user_post from pro_project_info_subdepts_users where project_id = #{proId} and user_id = #{userId} and approve_status <![CDATA[ >= ]]> 100 and is_del=0 and sub_dept_group is not null
</select>
</mapper>

View File

@ -405,7 +405,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="comId != null "> and pi.com_id = #{comId}</if>
<if test="disDeptId != null "> and pi.dis_dept_id = #{disDeptId}</if>
<if test="activeComId != null "> and pi.com_id = #{activeComId}</if>
<if test="currentUserId != null"> and psu.user_id = #{currentUserId} and psu.approve_status <![CDATA[ >= ]]> 100 and psu.user_id = #{currentUserId} and psu.use_status='0' and psu.is_del=0</if>
<if test="currentUserId != null"> and psu.user_id = #{currentUserId} and psu.approve_status <![CDATA[ >= ]]> 100 and psu.use_status='0' and psu.is_del=0</if>
<if test="projectName != null and projectName != ''"> and pi.project_name like concat('%', #{projectName}, '%')</if>
<if test="projectCode != null and projectCode != ''"> and pi.project_code = #{projectCode}</if>
<if test="simpleName != null and simpleName != ''"> and pi.simple_name like concat('%', #{simpleName}, '%')</if>

View File

@ -96,7 +96,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userPhone != null and userPhone != ''"> and psu.user_phone = #{userPhone}</if>
<if test='activeTags == "finished"'> and psu.approve_status <![CDATA[ >= ]]> 100 </if>
<if test="isDel != null "> and psu.is_del = #{isDel}</if>
<if test='searchValue == "active1"'> and psu.user_post != '66' </if>
<if test='searchValue == "subUsers"'> and psu.user_post != '66' </if>
<if test='searchValue == "sedUsers"'> and psu.sub_dept_type in ('1','4','5') and psu.user_post not in ('4','5') </if>
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and date(psu.use_date) between #{params.beginTime} and #{params.endTime}</if>
and psu.is_del != 2
</where>

View File

@ -92,18 +92,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--查询角色相关菜单-->
<select id="findUserMenuList" parameterType="WxMenuConfig" resultMap="WxMenuConfigResult">
SELECT
DISTINCT smc.id,
select
distinct smc.id,
smc.menu_name,
smc.menu_identi,
smc.menu_img,
smc.menu_url,
smc.menu_sort
FROM
from
wx_menu_config smc
LEFT JOIN wx_menu_config_role smcr ON smcr.smcid = smc.id
LEFT JOIN sys_user_role ur ON ur.role_id = smcr.role_id
WHERE smc.del_flag = 0
left join wx_menu_config_role smcr on smcr.smcid = smc.id
left join sys_user_role ur on ur.role_id = smcr.role_id
where smc.del_flag = 0
and (ur.user_id = #{currentUserId} or smcr.user_id = #{currentUserId})
<if test="activeProjectId != null"> and smc.project_id = #{activeProjectId}</if>
<if test="menuType != null and menuType != ''"> and smc.menu_type = #{menuType}</if>

View File

@ -31,62 +31,99 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="smarkUrl" column="smark_url" />
<result property="isDel" column="isDel" />
<result property="createUser" column="createUser" />
<result property="createUserName" column="createUserName" />
<result property="createTime" column="createTime" />
<result property="updateUser" column="updateUser" />
<result property="updateTime" column="updateTime" />
<result property="dangerType" column="danger_type" />
<result property="dangerTypeName" column="danger_type_name" />
<result property="recheckSend" column="recheckSend" />
<result property="recheckSendUser" column="recheckSendUser" />
<result property="roleType" column="roleType" />
<result property="problemType" column="problemType" />
<result property="problemTypeName" column="problemTypeName" />
</resultMap>
<sql id="selectSmzSspProblemmodifyVo">
select id, comId, projectId, infoType, marks_picture, marks_video, correction_picture, problemArea, workParts, changeInfo, lordSent, lordSentUser, copySend, copySendUser, checkState, nickedArea, nickedTime, projectType, processName, projectName, nickedInfo, checkUser, checkUserPhone, smark_url, isDel, createUser, createTime, updateUser, updateTime, danger_type, recheckSend, recheckSendUser, roleType, problemType from smz_ssp_problemmodify
select
ssp.id,
ssp.comId,
ssp.projectId,
ssp.infoType,
ssp.marks_picture,
ssp.marks_video,
ssp.correction_picture,
ssp.problemArea,
ssp.workParts,
ssp.changeInfo,
ssp.lordSent,
ssp.lordSentUser,
ssp.copySend,
ssp.copySendUser,
ssp.checkState,
ssp.nickedArea,
ssp.nickedTime,
ssp.projectType,
ssp.processName,
ssp.projectName,
ssp.nickedInfo,
ssp.checkUser,
ssp.checkUserPhone,
ssp.smark_url,
ssp.isDel,
ssp.createUser,
su.nick_name as createUserName
ssp.createTime,
ssp.updateUser,
ssp.updateTime,
ssp.danger_type,
sdd2.dict_label AS danger_type_name,
ssp.recheckSend,
ssp.recheckSendUser,
ssp.roleType,
ssp.problemType,
sdd1.dict_label AS problemTypeName
from
smz_ssp_problemmodify ssp
left join sys_dict_data sdd1 on sdd1.dict_type = 'ssp_proble_type'
and sdd1.dict_value = ssp.problemType
left join sys_dict_data sdd2 on sdd2.dict_type = 'ssp_proble_sub_type'
and sdd2.dict_value = ssp.danger_type
left join sys_user su on su.user_id = ssp.createUser
</sql>
<select id="selectSmzSspProblemmodifyList" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
<include refid="selectSmzSspProblemmodifyVo"/>
<where>
<if test="comId != null "> and comId = #{comId}</if>
<if test="projectId != null "> and projectId = #{projectId}</if>
<if test="infoType != null "> and infoType = #{infoType}</if>
<if test="marksPicture != null and marksPicture != ''"> and marks_picture = #{marksPicture}</if>
<if test="marksVideo != null and marksVideo != ''"> and marks_video = #{marksVideo}</if>
<if test="correctionPicture != null and correctionPicture != ''"> and correction_picture = #{correctionPicture}</if>
<if test="problemArea != null and problemArea != ''"> and problemArea = #{problemArea}</if>
<if test="workParts != null and workParts != ''"> and workParts = #{workParts}</if>
<if test="changeInfo != null and changeInfo != ''"> and changeInfo = #{changeInfo}</if>
<if test="lordSent != null and lordSent != ''"> and lordSent = #{lordSent}</if>
<if test="lordSentUser != null and lordSentUser != ''"> and lordSentUser = #{lordSentUser}</if>
<if test="copySend != null and copySend != ''"> and copySend = #{copySend}</if>
<if test="copySendUser != null and copySendUser != ''"> and copySendUser = #{copySendUser}</if>
<if test="checkState != null "> and checkState = #{checkState}</if>
<if test="nickedArea != null and nickedArea != ''"> and nickedArea = #{nickedArea}</if>
<if test="nickedTime != null "> and nickedTime = #{nickedTime}</if>
<if test="projectType != null and projectType != ''"> and projectType = #{projectType}</if>
<if test="processName != null and processName != ''"> and processName like concat('%', #{processName}, '%')</if>
<if test="projectName != null and projectName != ''"> and projectName like concat('%', #{projectName}, '%')</if>
<if test="nickedInfo != null and nickedInfo != ''"> and nickedInfo = #{nickedInfo}</if>
<if test="checkUser != null and checkUser != ''"> and checkUser = #{checkUser}</if>
<if test="checkUserPhone != null and checkUserPhone != ''"> and checkUserPhone = #{checkUserPhone}</if>
<if test="smarkUrl != null and smarkUrl != ''"> and smark_url = #{smarkUrl}</if>
<if test="isDel != null "> and isDel = #{isDel}</if>
<if test="createUser != null and createUser != ''"> and createUser = #{createUser}</if>
<if test="createTime != null "> and createTime = #{createTime}</if>
<if test="updateUser != null and updateUser != ''"> and updateUser = #{updateUser}</if>
<if test="updateTime != null "> and updateTime = #{updateTime}</if>
<if test="dangerType != null and dangerType != ''"> and danger_type = #{dangerType}</if>
<if test="recheckSend != null and recheckSend != ''"> and recheckSend = #{recheckSend}</if>
<if test="recheckSendUser != null and recheckSendUser != ''"> and recheckSendUser = #{recheckSendUser}</if>
<if test="roleType != null "> and roleType = #{roleType}</if>
<if test="problemType != null and problemType != ''"> and problemType = #{problemType}</if>
<if test="comId != null "> and ssp.comId = #{comId}</if>
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
<if test="infoType != null "> and ssp.infoType = #{infoType}</if>
<if test="lordSent != null and lordSent != ''"> and ssp.lordSent = #{lordSent}</if>
<if test="lordSentUser != null and lordSentUser != ''"> and ssp.lordSentUser = #{lordSentUser}</if>
<if test="copySend != null and copySend != ''"> and find_in_set(#{copySend},ssp.copySend)</if>
<if test="copySendUser != null and copySendUser != ''"> and find_in_set(#{copySendUser},ssp.copySendUser)</if>
<if test="checkState != null "> and ssp.checkState = #{checkState}</if>
<if test="checkUser != null and checkUser != ''"> and ssp.checkUser = #{checkUser}</if>
<if test="checkUserPhone != null and checkUserPhone != ''"> and ssp.checkUserPhone = #{checkUserPhone}</if>
<if test="createUser != null and createUser != ''"> and ssp.createUser = #{createUser}</if>
<if test="dangerType != null and dangerType != ''"> and ssp.danger_type = #{dangerType}</if>
<if test="recheckSend != null and recheckSend != ''"> and ssp.recheckSend = #{recheckSend}</if>
<if test="recheckSendUser != null and recheckSendUser != ''"> and ssp.recheckSendUser = #{recheckSendUser}</if>
<if test="problemType != null and problemType != ''"> and ssp.problemType = #{problemType}</if>
<if test="currentUserId != null and currentUserId!=''">
and
(
ssp.createUser=#{currentUserId} or ssp.lordSent=#{currentUserId} or find_in_set(#{currentUserId},ssp.copySend) or ssp.recheckSend=#{currentUserId}
)
</if>
and isDel = 0
</where>
order by ssp.id desc
</select>
<select id="selectSmzSspProblemmodifyById" parameterType="Long" resultMap="SmzSspProblemmodifyResult">
<include refid="selectSmzSspProblemmodifyVo"/>
where id = #{id}
where ssp.id = #{id}
</select>
<insert id="insertSmzSspProblemmodify" parameterType="SmzSspProblemmodify" useGeneratedKeys="true" keyProperty="id">

View File

@ -0,0 +1,43 @@
package com.yanzhu.flowable.enums;
/**
*
*/
public enum UserPostEnums {
WTDL("1", "委托代理"),
XMJL("2", "项目经理"),
BZZ("3", "班组长"),
LWGR("4", "劳务工人"),
TSGZ("5", "特殊工种"),
CLRY("6", "材料员"),
AQRY("8", "安全员"),
JSDWGL("66", "建设单位管理"),
JLDWGL("71", "监理单位管理"),
SGDWGL("72", "施工单位管理"),
CLFBGL("73", "材料分包管理"),
HQFBGL("74", "后勤分包管理"),
TSSBGL("75", "特殊设备管理"),
KTDWGL("76", "勘探单位管理"),
SJDWGL("77", "设计单位管理"),
QTDWGL("78", "其它单位管理");
private final String code;
private final String info;
UserPostEnums(String code, String info)
{
this.code = code;
this.info = info;
}
public String getCode()
{
return code;
}
public String getInfo()
{
return info;
}
}

View File

@ -4,8 +4,10 @@ import com.yanzhu.common.core.text.Convert;
import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.common.security.utils.SecurityUtils;
import com.yanzhu.flowable.domain.my.FlowTaskEntity;
import com.yanzhu.flowable.enums.UserPostEnums;
import com.yanzhu.flowable.mapper.FlowBusinessKeyMapper;
import com.yanzhu.flowable.service.IFlowBusinessKeyService;
import liquibase.pro.packaged.S;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@ -99,10 +101,24 @@ public class FlowBusinessKeyServiceImpl implements IFlowBusinessKeyService {
public List<Map<String, Object>> selectMyAwaitFlowTask(FlowTaskEntity flowTaskEntity){
// 查询用户是否是班组长...
if(Objects.nonNull(flowTaskEntity.getAssigneeId())){
List<Map<String, Object>> groups = flowBusinessKeyMapper.selectMySubdeptsGroups(Convert.toLong(flowTaskEntity.getStartProId()),SecurityUtils.getUserId());
if(StringUtils.isNotEmpty(groups)){
List<Long> groupIds = groups.stream().map(group -> Convert.toLong(group.get("sub_dept_group"))).collect(Collectors.toList());
flowTaskEntity.setGroupIds(groupIds);
List<Map<String, Object>> users = flowBusinessKeyMapper.selectMySubdeptsGroups(Convert.toLong(flowTaskEntity.getStartProId()),SecurityUtils.getUserId());
if(StringUtils.isNotEmpty(users)){
List<Long> groupIds = new ArrayList<>();
for(Map<String, Object> userMap:users){
String userPost = Convert.toStr(userMap.get("user_post"));
if(Objects.equals(userPost, UserPostEnums.JSDWGL.getCode())){
//总包审批时忽略分包单位
}else if(Objects.equals(userPost, UserPostEnums.BZZ.getCode())){
groupIds.add(Convert.toLong(userMap.get("sub_dept_group")));
flowTaskEntity.setStartDeptName(Convert.toStr(userMap.get("sub_dept_name")));
}else{
flowTaskEntity.setStartDeptName(Convert.toStr(userMap.get("sub_dept_name")));
}
}
//班组长信息...
if(groupIds.size()>0){
flowTaskEntity.setGroupIds(groupIds);
}
}
}
return flowBusinessKeyMapper.selectMyAwaitFlowTask(flowTaskEntity);

View File

@ -16,7 +16,7 @@ spring:
# 服务注册地址
server-addr: @discovery.server-addr@
# 服务分组
group: lijun
group: JiangYuQi
config:
# 配置中心地址
server-addr: @discovery.server-addr@

View File

@ -142,7 +142,6 @@ public class ProProjectInfoController extends BaseController
{
startPage();
LoginUser loginUser = SecurityUtils.getLoginUser();
proProjectInfo.setComId(loginUser.getSysUser().getComId());
if(!SecurityUtils.isAdmin(loginUser.getUserid())){
if(SecurityUtils.isGSAdmin()){
proProjectInfo.setActiveComId(SecurityUtils.getLoginUser().getProjectDeptId());

View File

@ -2,6 +2,7 @@ package com.yanzhu.manage.controller;
import com.alibaba.fastjson2.JSONObject;
import com.yanzhu.common.core.domain.R;
import com.yanzhu.common.core.enums.UseStateEnums;
import com.yanzhu.common.core.text.Convert;
import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.common.core.utils.poi.ExcelUtil;
@ -305,4 +306,17 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
return success();
}
/**
*
*/
@GetMapping("/findAll")
public AjaxResult findAll(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
{
proProjectInfoSubdeptsUsers.setUseStatus(UseStateEnums.IN.getCode());
proProjectInfoSubdeptsUsers.setActiveTags("finished");
proProjectInfoSubdeptsUsers.setSearchValue("sedUsers");
List<ProProjectInfoSubdeptsUsers> list = proProjectInfoSubdeptsUsersService.selectProProjectInfoSubdeptsUsersList(proProjectInfoSubdeptsUsers);
return success(list);
}
}

View File

@ -4,6 +4,8 @@ import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import com.yanzhu.common.core.text.Convert;
import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.common.security.utils.SecurityUtils;
import com.yanzhu.manage.domain.SmzSspProblemmodify;
import com.yanzhu.manage.service.ISmzSspProblemmodifyService;
@ -143,4 +145,20 @@ public class SmzSspProblemmodifyController extends BaseController
{
return toAjax(smzSspProblemmodifyService.deleteSmzSspProblemmodifyByIds(ids));
}
/**
*
*
*/
@GetMapping(value = "/findMyLastProblemmodify/{proId}")
public AjaxResult findMyLastProblemmodify(@PathVariable("proId") Long proId,Long infoType)
{
startPage(1,1);
SmzSspProblemmodify query = new SmzSspProblemmodify();
query.setProjectId(proId);
query.setInfoType(infoType);
query.setCreateUser(Convert.toStr(SecurityUtils.getUserId()));
List<SmzSspProblemmodify> data = smzSspProblemmodifyService.selectSmzSspProblemmodifyList(query);
return success(data);
}
}

View File

@ -2,7 +2,6 @@ package com.yanzhu.manage.service.impl;
import cn.binarywang.wx.miniapp.api.WxMaService;
import com.yanzhu.common.core.constant.SecurityConstants;
import com.yanzhu.common.core.domain.R;
import com.yanzhu.common.core.enums.*;
import com.yanzhu.common.core.exception.ServiceException;
import com.yanzhu.common.core.text.Convert;
@ -473,7 +472,9 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
sysUser.setUpdateBy(SecurityUtils.getUsername());
sysUser.setUpdateTime(DateUtils.getNowDate());
sysUser.setRemark(proProjectInfoSubdeptsUsers.getSubDeptName());
log.info("insertProProjectInfoSubdeptsUsersWX==>{}",sysUser.getUserName());
Long userId = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER).getData();
log.info("insertProProjectInfoSubdeptsUsersWX==>{}",userId);
proProjectInfoSubdeptsUsers.setUserId(userId);
proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
return proProjectInfoSubdeptsUsers;
@ -627,6 +628,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
@Transactional
public ProProjectInfoSubdeptsUsers updateProProjectInfoSubdeptsUsersWX(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
{
log.info("updateProProjectInfoSubdeptsUsersWX==>");
ProProjectInfoSubdeptsUsers parUsers = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersById(proProjectInfoSubdeptsUsers.getParId());
if(Objects.isNull(parUsers)){
throw new ServiceException("用户信息异常...请重新扫码");
@ -1378,14 +1380,16 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
@Override
@Transactional
public int editDefaultProjectById(Long id){
int res = proProjectInfoSubdeptsUsersMapper.editDefaultProjectById(SecurityUtils.getUserId());
LoginUser loginUser = SecurityUtils.getLoginUser();
Long userId = loginUser.getUserid();
int res = proProjectInfoSubdeptsUsersMapper.editDefaultProjectById(userId);
if(res>0){
ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersByParamId(id,SecurityUtils.getUserId());
ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersByParamId(id,userId);
proProjectInfoSubdeptsUsers.setSortBy(0L);
res = proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
}
boolean isAdmin= (SecurityUtils.isAdmin(SecurityUtils.getUserId()) || SecurityUtils.isGSAdmin());
LoginUser loginUser = SecurityUtils.getLoginUser();
boolean isAdmin= (SecurityUtils.isAdmin(userId) || SecurityUtils.isGSAdmin());
if(isAdmin){
SysUserExt userExt = new SysUserExt();
userExt.setUserId(loginUser.getUserid());

View File

@ -11,11 +11,10 @@ export function list(query) {
})
}
// 查询隐患列表
export function list1(query) {
// 查询我上次提交的隐患信息
export function findMyLastProblemmodify(proId,type) {
return request({
url: '/manage/problemmodify/list',
method: 'get',
params: query
url: '/manage/problemmodify/findMyLastProblemmodify/'+proId+'?infoType='+type,
method: 'get'
})
}

View File

@ -98,4 +98,13 @@ export function findProjectDepts(proId) {
url: '/manage/proProjectInfoDepts/findAllDepts/' + proId,
method: 'get'
})
}
// 查询项目参建单位
export function findProjectDeptUsers(query) {
return request({
url: '/manage/proProjectInfoDepts/findAllDepts/' + proId,
method: 'get',
params: query
})
}

View File

@ -2028,3 +2028,14 @@ swiper-item video {
height: 180rpx;
padding-right: 15rpx;
}
.markers{
background: url("https://xiangguan.sxyanzhu.com/profile/icon/req.png") no-repeat left/40rpx;
height: 20px;
line-height: 20px;
padding-left: 42rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
}

View File

@ -2,10 +2,10 @@
module.exports = {
timeout: 60000,
appId: "wx46466c7828eede2b",
baseUrl: 'https://xiangguan.sxyanzhu.com',
//baseUrl: 'http://127.0.0.1:8080',
baseImgUrl: 'https://xiangguan.sxyanzhu.com',
//baseUrl: 'https://xiangguan.sxyanzhu.com',
baseUrl: 'http://127.0.0.1:8080',
//baseImgUrl: 'https://xiangguan.sxyanzhu.com',
//baseImgUrl: 'https:xiangguan.sxyanzhu.com/file',
//baseImgUrl: 'http://127.0.0.1:9300',
baseImgUrl: 'http://127.0.0.1:9300',
noSecuritys:['/code','/auth/wxLogin','/auth/getMaOpenId','/auth/getMaPhoneNumber','/auth/maLogin']
};

View File

@ -25,7 +25,7 @@
<view class="inspect_for_bgd">
<view class="inspect_list_title">
<view class="inspect_list_title_label inspect_list_title_width">
<view class="inspect_list_title_number">{{index < 9 ?'0'+(index+1):(index+1)}}</view>
<view class="inspect_list_title_number">{{index < 10 ?'0'+(index+1):(index+1)}}</view>
<view class="module_title module_title_flex">
<text wx:if="{{!item.endTime}}" class="color_purple">申请时间 {{item.createTime}}</text>
<text wx:if="{{item.endTime}}" class="color_purple">办结时间 {{item.endTime}}</text>

View File

@ -25,7 +25,7 @@
<view class="inspect_for_bgd">
<view class="inspect_list_title">
<view class="inspect_list_title_label inspect_list_title_width">
<view class="inspect_list_title_number">{{index < 9 ?'0'+(index+1):(index+1)}}</view>
<view class="inspect_list_title_number">{{index < 10 ?'0'+(index+1):(index+1)}}</view>
<view class="module_title module_title_flex">
<text wx:if="{{!item.endTime}}" class="color_purple">申请时间 {{item.createTime}}</text>
<text wx:if="{{item.endTime}}" class="color_purple">办结时间 {{item.endTime}}</text>

View File

@ -194,7 +194,7 @@
<view class="inspect_for_bgd">
<view class="inspect_list_title">
<view class="inspect_list_title_label inspect_list_title_width">
<view class="inspect_list_title_number">{{index < 9 ?'0'+(index+1):(index+1)}}</view>
<view class="inspect_list_title_number">{{index < 10 ?'0'+(index+1):(index+1)}}</view>
<view class="module_title module_title_flex inspect_list_title_label">考勤时间:{{format.dateStrEv(item.inTime,item.outTime)}}</view>
</view>
</view>

View File

@ -1,3 +1,17 @@
import config from '../../../config'
import {
getToken,
getUserInfo
} from '../../../utils/auth'
import {
findDictCache
} from '../../../api/publics'
import {
findProjectDeptUsers
} from '../../../api/project'
import {
findMyLastProblemmodify
} from '../../../api/problemmodify'
const app = getApp()
Page({
@ -6,15 +20,26 @@ Page({
*/
data: {
maxDate: new Date(2088, 1, 1).getTime(),
minDate: new Date().getTime() + (3600 * 48 * 1000),
projectId: "",
projectName: "",
type:"",
typeName:"",
projectId:"",
projectName:"",
problemTypeList: [],
problemSubTypeList: [],
imageInfoData: [],
form:{
infoType:"",
problemType:"1",
dangerType:null,
nickedTime:"",
},
active: 0,
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
loginName: "",
userName: "",
rectifierData: [],
rectifierData2: [],
rectifierData3: [],
imageInfoData: [],
//验收时间
nickedTime: '',
loadShow: false,
@ -32,53 +57,85 @@ Page({
selectIndex: "",
problemType: "1",
showHis: false,
problemTypeList: [{
id: "1",
text: "常规检查"
}, {
id: "2",
text: "专项检查"
}],
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
active: 0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let {
ts
} = options
this.setData({
projectId: app.globalData.projectId,
projectName: app.globalData.projectName,
loginName: res.data.loginName,
userName: res.data.nickName,
recheckSend: res.data.nickName,
recheckSendUser: res.data.loginName
});
//获取缓存数据
wx.getStorage({
key: 'YanZhu-XD-App-UserInfoKey',
success: res => {
this.setData({
projectId: app.globalData.projectId,
projectName: app.globalData.projectName,
loginName: res.data.loginName,
userName: res.data.nickName,
recheckSend: res.data.nickName,
recheckSendUser: res.data.loginName
});
this.getAllProjectUserData();
this.getDangerTypeList();
this.getHisInfo();
}
})
if(!getToken()){
wx.redirectTo({
url: '../../login/login',
})
}
const proUserInfo = getUserInfo();
this.setData({
type:options.type,
typeName:options.type==1?"质量":"安全",
projectId:app.globalData.useProjectId,
projectName:app.globalData.useProjectName,
"form.infoType":options.type,
"form.recheckSend": proUserInfo.nickName,
"form.recheckSendUser": proUserInfo.userId
});
this.getDictCache();
this.getHisInfo(options.type);
this.getProjectUsers();
},
//查询项目人员数据
getAllProjectUserData() {
/**
* 获取字典缓存数据
*/
getDictCache(signId) {
// 初始化检查类型
findDictCache("ssp_proble_type").then(res => {
if (res.code == 200) {
let list = [];
res.data.forEach(item => {
list.push({
"id": item.dictValue,
"text": item.dictLabel
});
});
this.setData({
problemTypeList: list
});
}
});
//初始化隐患类型
findDictCache("ssp_proble_sub_type").then(res => {
if (res.code == 200) {
let list = [];
res.data.forEach(item => {
list.push({
"id": item.dictValue,
"text": item.dictLabel
});
});
this.setData({
problemSubTypeList: list
});
}
});
},
/**
* 查询项目人员数据
* 获取项目所有人员在页面组装数据...
*/
getProjectUsers() {
let params = "projectId="+app.globalData.useProjectId;
findProjectDeptUsers(params).then(res =>{
let _lordSentList = [];
let _copySendList = [];
let _checkUserList = [];
res.data.forEach(item =>{
//if(item.subDeptType!='1' && _lordSentList)
});
});
let that = this
wx.request({
url: app.globalData.reqUrl + '/wechat/projectuserinfo/queryAllProjectUserByParams',
@ -136,96 +193,52 @@ Page({
})
},
getHisInfo() {
//这里查询当前登录人上次提交隐患,自动填充整改人,复检人,抄送人
let that = this
wx.request({
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/findLastDataByParams',
method: "get",
data: {
projectId: that.data.projectId,
createUser: that.data.loginName,
infoType: 1
},
header: {
'content-type': 'application/x-www-form-urlencoded'
},
success(res) {
res = res.data
if (res.code == 200 && res.data) {
that.setData({
showHis: true,
lordSent: res.data.lordSent,
lordSentUser: res.data.lordSentUser,
recheckSend: res.data.recheckSend,
recheckSendUser: res.data.recheckSendUser,
copySend: res.data.copySend,
copySendUser: res.data.copySendUser
})
}
/**
* 这里查询当前登录人上次提交隐患
* 自动填充整改人复检人抄送人
* @param {*} type
*/
getHisInfo(type) {
findMyLastProblemmodify(app.globalData.useProjectId,type).then(res => {
if(res.code==200 && res.data && res.data.length>0){
this.setData({
showHis: true,
"form.lordSent": res.data[0].lordSent,
"form.lordSentUser": res.data[0].lordSentUser,
"form.recheckSend": res.data[0].recheckSend,
"form.recheckSendUser": res.data[0].recheckSendUser,
"form.copySend": res.data[0].copySend,
"form.copySendUser": res.data[0].copySendUser
})
}
})
},
getDangerTypeList() {
let that = this
wx.request({
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/queryDangerType',
method: "get",
data: {
type: 'ssp_zlyhlx'
},
header: {
'content-type': 'application/x-www-form-urlencoded'
},
success(res) {
res = res.data
if (res.code == 200) {
let list = [];
res.data.forEach(it => {
list.push({
"id": it.dictValue,
"text": it.dictLabel
});
})
that.setData({
dangerTypeList: list
})
}
}
})
});
},
//隐患描述
onInputWorkParts(e) {
let workParts = e.detail.value
this.setData({
workParts
"form.workParts":e.detail.value
})
},
//整改要求
onInputChangeInfoValue(e) {
let changeInfo = e.detail.value
this.setData({
changeInfo
"form.changeInfo":e.detail.value
})
},
//验收时间
onInputTime(e) {
let nickedTime = e.detail
this.setData({
nickedTime
"form.nickedTime":e.detail
})
},
// list 上传图片
// 上传图片
onImagesArr(e) {
var data = this.data.imageInfoData
data = e.detail
this.setData({
imageInfoData: data
imageInfoData: e.detail
})
},
@ -435,53 +448,17 @@ Page({
})
},
/**
* 这里考虑上传图片异步问题封装为同步
*/
syncUploadImage(url, uploadFile, name) {
return new Promise((resolve, reject) => {
wx.uploadFile({
url, // 上传的服务器接口地址
filePath: uploadFile,
header: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
name, //上传的所需字段,后端提供
formData: {
user: 'test'
},
success: (res) => {
// 上传完成操作
const data = JSON.parse(res.data)
resolve({
data: data
})
},
fail: (err) => {
//上传失败修改pedding为reject
console.log("访问接口失败", err);
wx.showToast({
title: "网络出错,上传失败",
icon: 'none',
duration: 1000
});
reject(err)
}
});
})
},
//选择检查类型
onSelectProblemType(e) {
this.setData({
problemType: e.detail.id
"form.problemType": e.detail.id
})
},
//选择隐患类型
onSelectDangerType(e) {
this.setData({
dangerType: e.detail.id
"form.dangerType": e.detail.id
})
},

View File

@ -12,64 +12,64 @@
</view>
<view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
<view class="inspect_info ">
<view class="module_title module_title_flex">
<view class="inspect_info">
<view class="video_address_min_2">
<view>{{projectName}}</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">隐患图片</view>
<view class="markers inspect_info_title">隐患图片</view>
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArr"></file-uploader>
<file-uploader bindimages="onImagesArr"></file-uploader>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">检查类型</view>
<view class="markers inspect_info_title">检查类型</view>
<view class="inspect_info_content">
<voucher-select columns="{{problemTypeList}}" placeholder="请选择检查类型" bindchange="onSelectProblemType"></voucher-select>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">隐患类型</view>
<view class="markers inspect_info_title">隐患类型</view>
<view class="inspect_info_content">
<voucher-select columns="{{dangerTypeList}}" placeholder="请选择隐患类型" bindchange="onSelectDangerType" selectValue="{{activeName}}" selectIndex="{{activeIndex}}"></voucher-select>
<voucher-select columns="{{problemSubTypeList}}" placeholder="请选择隐患类型" bindchange="onSelectDangerType" selectValue="{{form.dangerType}}"></voucher-select>
</view>
</view>
<view class="inspect_info_list" >
<view class="inspect_info_title">隐患描述</view>
<view class="markers inspect_info_title">隐患描述</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写质量隐患描述"
placeholder-style="color:#6777aa;" bindinput="onInputWorkParts" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list" >
<view class="inspect_info_title">整改要求</view>
<view class="markers inspect_info_title">整改要求</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写隐患整改要求"
placeholder-style="color:#6777aa;" bindinput="onInputChangeInfoValue" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title">整改截至时间</view>
<view class="markers inspect_info_title">整改截至时间</view>
<view class="inspect_info_content">
<voucher-date counts="5" placeholder="请选择整改截至时间" minDate="{{minDate}}" maxDate="{{maxDate}}" bindchange="onInputTime"></voucher-date>
<voucher-date counts="5" placeholder="请选择整改截至时间" maxDate="{{maxDate}}" bindchange="onInputTime"></voucher-date>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">整改人</view>
<view class="markers inspect_info_title">整改人</view>
<view class="inspect_info_content">
<select-group-person rectifierData="{{rectifierData}}" multiple="{{fales}}" bindselected="onAddLordSent" index="1" title="请选择整改人" choose="{{lordSent}}">
</select-group-person>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">复检人</view>
<view class="markers inspect_info_title">复检人</view>
<view class="inspect_info_content">
<select-group-person rectifierData="{{rectifierData2}}" multiple="{{fales}}" bindselected="onAddRecheckSend" index="2" title="请选择复检人" choose="{{recheckSend}}">
</select-group-person>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">抄送人</view>
<view class="markers inspect_info_title">抄送人</view>
<view class="inspect_info_content">
<select-group-person rectifierData="{{rectifierData3}}" multiple="{{true}}" bindselected="onAddCopySend" index="3" title="请选择抄送人" choose="{{copySend}}">
</select-group-person>

View File

@ -4,3 +4,22 @@
.van-image__img{
border-radius: 10rpx !important;
}
.van-steps {
background-color: transparent !important;
}
.van-step--horizontal .van-step__circle-container {
background-color: transparent !important;
}
.van-steps--horizontal {
padding: 10px 20px !important;
}
.video_address_min_2 {
background: url("http://fileimg.makalu.cc/CORE_B1C818B4CF2C44FE9D96624589329EBC.png") no-repeat left/40rpx;
height: 40rpx;
line-height: 40rpx;
padding-left: 40rpx;
}

View File

@ -14,8 +14,8 @@ import {
data: {
type:"",
typeName:"",
addFlag:false,
addDraftFlag:false,
addFlag:true,
addDraftFlag:true,
projectId:"",
projectName:"",
initData: {},

View File

@ -25,7 +25,7 @@
<view class="inspect_for_bgd">
<view class="inspect_list_title">
<view class="inspect_list_title_label inspect_list_title_width">
<view class="inspect_list_title_number">{{index < 9 ?'0'+(index+1):(index+1)}}</view>
<view class="inspect_list_title_number">{{index < 10 ?'0'+(index+1):(index+1)}}</view>
<view class="module_title_3 module_title_flex inspect_list_title_text_2">
<view wx:if="{{item.checkState==0}}" class="code_label code_label_yellow">待整改</view>
<view wx:if="{{item.checkState==1}}" class="code_label code_label_blueviolet">待复检</view>

View File

@ -1212,7 +1212,6 @@ Page({
this.setData({
"form.cardImgPos": file
});
console.log("filefilefilefile", file)
file.forEach(async (item, idx) => {
let obj = await this.syncUploadImage(item);
findCardOcrFront(obj.data.data.url).then(res => {

View File

@ -687,8 +687,8 @@
<view class="inspect_for_bgd">
<view class="inspect_list_title">
<view class="inspect_list_title_label inspect_list_title_width">
<view class="inspect_list_title_number">{{index < 9 ?'0'+(index+1):(index+1)}}</view>
<view class="module_title module_title_flex inspect_list_title_text" style="font-weight: 600;">第{{index < 9 ?'0'+(index+1):(index+1)}}题({{item.mark}}分)</view>
<view class="inspect_list_title_number">{{index < 10 ?'0'+(index+1):(index+1)}}</view>
<view class="module_title module_title_flex inspect_list_title_text" style="font-weight: 600;">第{{index < 10 ?'0'+(index+1):(index+1)}}题({{item.mark}}分)</view>
<view class="code_label_4 code_label_blue">
<text wx:if="{{item.questionType==1}}">单选题</text>
<text wx:if="{{item.questionType==2}}">多选题</text>
@ -753,8 +753,8 @@
<view class="inspect_for_bgd">
<view class="inspect_list_title">
<view class="inspect_list_title_label inspect_list_title_width">
<view class="inspect_list_title_number">{{index < 9 ?'0'+(index+1):(index+1)}}</view>
<view class="module_title module_title_flex inspect_list_title_text" style="font-weight: 600;">第{{index < 9 ?'0'+(index+1):(index+1)}}题({{item.mark}}分)</view>
<view class="inspect_list_title_number">{{index < 10 ?'0'+(index+1):(index+1)}}</view>
<view class="module_title module_title_flex inspect_list_title_text" style="font-weight: 600;">第{{index < 10 ?'0'+(index+1):(index+1)}}题({{item.mark}}分)</view>
<view class="code_label_4 code_label_blue">
<text wx:if="{{item.questionType==1}}">单选题</text>
<text wx:if="{{item.questionType==2}}">多选题</text>

View File

@ -336,14 +336,3 @@
.problem_submit_to_save_s:active {
background: #372a70;
}
.markers{
background: url("https://xiangguan.sxyanzhu.com/profile/icon/req.png") no-repeat left/40rpx;
height: 20px;
line-height: 20px;
padding-left: 42rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
}

View File

@ -11,7 +11,7 @@
{
"name": "pages/project_qr/index",
"pathName": "pages/project_qr/index",
"query": "QRPID=133&SIGID=1",
"query": "QRPID=133&SIGID=3&PARID=109",
"launchMode": "default",
"scene": null
},

View File

@ -387,7 +387,7 @@ const data = reactive({
userWorkType: null,
workType: null,
activeTags:"finished",
searchValue:"active1"
searchValue:"subUsers"
},
rules: {
subDeptId: [{ required: true, trigger: ['blur', 'change'], message: "请选择所属单位" }],