Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test
| | |
| | | @Authorization |
| | | public ResultData evaluate(@RequestBody GuideRepairOrder entity, @CurrentUser SysUser sysUser) |
| | | { |
| | | // if(entity==null) |
| | | // { |
| | | // return ResultData.error("参数不能为空"); |
| | | // } |
| | | // |
| | | // if(entity.getId()<=0) |
| | | // { |
| | | // return ResultData.error("工单id不能为空"); |
| | | // } |
| | | // |
| | | // if(!StringUtils.equals(entity.getState(),"4")) |
| | | // { |
| | | // return ResultData.error("该工单不能评价!"); |
| | | // } |
| | | // |
| | | // if(StringUtils.isEmpty(entity.getEvaluateState())) |
| | | // { |
| | | // return ResultData.error("满意程度不能为空!"); |
| | | // } |
| | | |
| | | |
| | | if(sysUser==null) |
| | | if(entity==null) |
| | | { |
| | | return ResultData.error("sysUser为空!"); |
| | | return ResultData.error("参数不能为空"); |
| | | } |
| | | |
| | | if(entity.getId()<=0) |
| | | { |
| | | return ResultData.error("工单id不能为空"); |
| | | } |
| | | |
| | | if(!StringUtils.equals(entity.getState(),"4")) |
| | | { |
| | | return ResultData.error("该工单不能评价!"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(entity.getEvaluateState())) |
| | | { |
| | | return ResultData.error("满意程度不能为空!"); |
| | | } |
| | | |
| | | //已办结 |
| | | // entity.setState("3"); |
| | | // //新增已办结记录 |
| | | // GuideEvolveEntity guideEvolveEntity=new GuideEvolveEntity(); |
| | | // guideEvolveEntity.setCreateTime(LocalDateTime.now()); |
| | | // guideEvolveEntity.setUpdateTime(LocalDateTime.now()); |
| | | // guideEvolveEntity.setState("3"); |
| | | // guideEvolveEntity.setFromDepartmentalId(sysUser.getDepartmentId()); |
| | | // guideEvolveEntity.setFromUserId(sysUser.getUserId()+""); |
| | | // iGuideEvolveService.insertConfig(guideEvolveEntity); |
| | | entity.setState("3"); |
| | | //新增已办结记录 |
| | | GuideEvolveEntity guideEvolveEntity=new GuideEvolveEntity(); |
| | | guideEvolveEntity.setCreateTime(LocalDateTime.now()); |
| | | guideEvolveEntity.setUpdateTime(LocalDateTime.now()); |
| | | guideEvolveEntity.setState("3"); |
| | | guideEvolveEntity.setFromDepartmentalId(sysUser.getDepartmentId()); |
| | | guideEvolveEntity.setFromUserId(sysUser.getUserId()+""); |
| | | iGuideEvolveService.insertConfig(guideEvolveEntity); |
| | | |
| | | // return toAjax(iGuideRepairOrderService.updateConfig(entity)); |
| | | return ResultData.success(sysUser.getUserId()+""); |
| | | return toAjax(iGuideRepairOrderService.updateConfig(entity)); |
| | | } |
| | | |
| | | /** |
| | |
| | | { |
| | | Assert.notNull(Id, "Id 不能为空"); |
| | | OrganizationChartEntity entity=iOrganizationChartService.selectConfigById(Id); |
| | | if(!StringUtils.isEmpty(entity.getParentId())) |
| | | |
| | | List<OrganizationChartEntity> list=iOrganizationChartService.selectConfigList(entity.getId()+"",""); |
| | | |
| | | if(list.size()>0) |
| | | { |
| | | return ResultData.error("该机构下存在其他部门!请先删除子部门"); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation(value = "通过父级id查询对应机构下的全部部门",response = OrganizationChartEntity.class) |
| | | @GetMapping("/getdepartment") |
| | | public TableDataInfo getIds(@RequestParam(value = "department",required = false) String departmentId) |
| | | public TableDataInfo getOrganizations(@RequestParam(value = "department",required = false) String departmentId) |
| | | { |
| | | List<OrganizationChartEntity> ids=new ArrayList<>(); |
| | | List<OrganizationChartEntity> lists = iOrganizationChartService.selectConfigList(departmentId,""); |
| | |
| | | { |
| | | lists.add(iOrganizationChartService.selectConfigById(departmentId)); |
| | | } |
| | | ids=disposestreetId(lists); |
| | | ids=disposestreet(lists); |
| | | if(ids.size()<1) |
| | | { |
| | | return null; |
| | | } |
| | | // ids.add(streetId); |
| | | ids.add(iOrganizationChartService.selectConfigById(departmentId)); |
| | | return getDataTable(ids); |
| | | } |
| | | |
| | | //递归取id |
| | | private List<OrganizationChartEntity> disposestreetId(List<OrganizationChartEntity> lists) |
| | | private List<OrganizationChartEntity> disposestreet(List<OrganizationChartEntity> lists) |
| | | { |
| | | List<OrganizationChartEntity> ids=new ArrayList<>(); |
| | | for (OrganizationChartEntity sysStreet:lists) |
| | |
| | | ids.add(sysStreet); |
| | | if(sysStreet.getChild()!=null && sysStreet.getChild().size()>0) |
| | | { |
| | | ids.addAll(disposestreetId(sysStreet.getChild())); |
| | | ids.addAll(disposestreet(sysStreet.getChild())); |
| | | } |
| | | else |
| | | { |
| | |
| | | |
| | | SysUser user=null; |
| | | //管理员登录 |
| | | if(StringUtils.equals("zigonggaoadmin",account)) |
| | | if(!StringUtils.isEmpty(account)) |
| | | { |
| | | user= IUserService.getUserByAccount(account); |
| | | |
| | |
| | | |
| | | import com.dg.core.Constant; |
| | | import io.jsonwebtoken.Claims; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | |
| | | } |
| | | |
| | | public boolean checkToken(String token) { |
| | | if (token == null) { |
| | | if (StringUtils.isEmpty(token)) { |
| | | return false; |
| | | } |
| | | String userId = redis.boundValueOps(token).get(); |
| | |
| | | */ |
| | | @Override |
| | | public boolean checkHCToken(String token) { |
| | | if (token == null) { |
| | | if (StringUtils.isEmpty(token)) { |
| | | return false; |
| | | } |
| | | // token解析 |
| | |
| | | */ |
| | | int countList(String organizationName); |
| | | |
| | | /** |
| | | * 获取部门下子部门的全部id |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<String> getIds(String id); |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.dg.core.service.IOrganizationChartService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | |
| | | public int countList(String organizationName) { |
| | | return baseMapper.countList(organizationName); |
| | | } |
| | | |
| | | /** |
| | | * 递归获取id 内部使用 |
| | | * @param departmentId |
| | | * @return |
| | | */ |
| | | |
| | | @Override |
| | | public List<String> getIds(String id) |
| | | { |
| | | List<String> ids=new ArrayList<>(); |
| | | List<OrganizationChartEntity> lists = baseMapper.selectConfigList(id,""); |
| | | if(lists.size()<1) |
| | | { |
| | | lists.add(baseMapper.selectConfigById(id)); |
| | | } |
| | | ids=disposestreetId(lists); |
| | | if(ids.size()<1) |
| | | { |
| | | return null; |
| | | } |
| | | ids.add(id); |
| | | return ids; |
| | | } |
| | | |
| | | //递归取id |
| | | private List<String> disposestreetId(List<OrganizationChartEntity> lists) |
| | | { |
| | | List<String> ids=new ArrayList<>(); |
| | | for (OrganizationChartEntity sysStreet:lists) |
| | | { |
| | | ids.add(sysStreet.getId()+""); |
| | | if(sysStreet.getChild()!=null && sysStreet.getChild().size()>0) |
| | | { |
| | | ids.addAll(disposestreetId(sysStreet.getChild())); |
| | | } |
| | | else |
| | | { |
| | | ids.add(sysStreet.getId()+""); |
| | | } |
| | | } |
| | | return ids; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | update_time, |
| | | parent_id, |
| | | update_user_id, |
| | | (select user_name from automessage_sys_user where user_id=automessage_organization_chart.update_user_id)updateUserName, |
| | | (select user_name from automessage_sys_user where user_id=automessage_organization_chart.update_user_id) as updateUserName, |
| | | (select organization_name from automessage_organization_chart as oc where oc.id=automessage_organization_chart.parent_id) as parentName, |
| | | city, |
| | | district, |
| | |
| | | (select name from area_code_2022 where village=area_code_2022.code) as villageName, |
| | | detailed_address, |
| | | grade, |
| | | resume,contact_number,area_list |
| | | area_list |
| | | FROM |
| | | automessage_organization_chart |
| | | </sql> |
| | |
| | | or resume like concat('%', #{keyWord}, '%') or #{keyWord} like concat('%', resume, '%') |
| | | </select> |
| | | |
| | | |
| | | |
| | | <insert id="insertConfig" parameterType="com.dg.core.db.gen.entity.OrganizationChartEntity"> |
| | | insert into automessage_organization_chart ( |
| | | <if test="id != null">id,</if> |
| | |
| | | <if test="detailedAddress != null and detailedAddress != '' ">detailed_address,</if> |
| | | <if test="grade != null and grade != '' ">grade,</if> |
| | | <if test="areaList != null and areaList != '' ">area_list,</if> |
| | | <if test="contactNumber != null and contactNumber != '' ">contact_number,</if> |
| | | <if test="departmentalApplication != null and departmentalApplication != '' ">departmental_application,</if> |
| | | <if test="updateUserId != null and updateUserId != '' ">update_user_id,</if> |
| | | <if test="resume != null and resume != '' ">resume,</if> |
| | | update_time, |
| | | create_time |
| | | )values( |
| | |
| | | <if test="detailedAddress != null and detailedAddress != '' ">#{detailedAddress},</if> |
| | | <if test="grade != null and grade != '' ">#{grade},</if> |
| | | <if test="areaList != null and areaList != '' ">#{areaList},</if> |
| | | <if test="contactNumber != null and contactNumber != '' ">#{contactNumber},</if> |
| | | <if test="departmentalApplication != null and departmentalApplication != '' ">#{departmentalApplication},</if> |
| | | <if test="updateUserId != null and updateUserId != '' ">#{updateUserId},</if> |
| | | <if test="resume != null and resume != '' ">#{resume},</if> |
| | | sysdate(), |
| | | sysdate() |
| | | ) |
| | |
| | | <if test="departmentalApplication != null and departmentalApplication != '' ">departmental_application=#{departmentalApplication},</if> |
| | | <if test="updateUserId != null">update_user_id=#{updateUserId},</if> |
| | | <if test="areaList != null and areaList != '' ">area_list=#{areaList},</if> |
| | | <if test="contactNumber != null and contactNumber != '' ">contact_number=#{contactNumber},</if> |
| | | <if test="departmentalApplication != null and departmentalApplication != '' ">departmental_application=#{departmentalApplication},</if> |
| | | <if test="updateUserId != null and updateUserId != '' ">update_user_id=#{updateUserId},</if> |
| | | <if test="resume != null and resume != '' ">resume=#{resume},</if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id= #{id} |
| | |
| | | <?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.dg.core.db.gen.mapper.SysUserMapper"> |
| | | |
| | | <resultMap type="com.dg.core.db.gen.entity.SysUser" id="SysUserResult"> |
| | | <id property="id" column="id" /> |
| | | <id property="userId" column="user_id" /> |
| | |
| | | automessage_sys_user |
| | | </sql> |
| | | |
| | | |
| | | <select id="selectNum" parameterType="string" resultType="integer"> |
| | | select count(user_id) from automessage_sys_user |
| | | <where> |
| | |
| | | <include refid="selectSysUserVo"/> |
| | | <where> |
| | | <if test="list!=null"> |
| | | department_id in |
| | | <foreach collection="list" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | department_id in |
| | | <foreach collection="list" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | and (master_ids like concat('%',#{classifyIdFront}, '%') or master_ids like concat('%',#{classifyIdAfter}, '%')) |
| | | </where> |