张天森
2022-10-13 2c19b79eade460a50f0d61b2e41e46662286934e
Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test
14个文件已修改
161 ■■■■ 已修改文件
flower_city/src/main/java/com/dg/core/controller/GuideDoController.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/controller/GuideRepairOrderController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/controller/ReplyTemplateController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/gen/entity/TransactionEvent.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/gen/mapper/GuideRepairOrderMapper.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/gen/mapper/TransactionEventMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/manual/pojo/Search.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/IGuideRepairOrderService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/ISysUserService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/impl/TransactionEventImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/GuideRepairOrderMapper.xml 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/SysUserMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/TransactionEventMapper.xml 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/controller/GuideDoController.java
@@ -4,6 +4,7 @@
import com.dg.core.ResultData;
import com.dg.core.annotation.Authorization;
import com.dg.core.db.gen.entity.SysUser;
import com.dg.core.service.IGuideRepairOrderService;
import com.dg.core.service.ISysUserService;
import com.dg.core.util.Snowflake;
import com.dg.core.util.TableDataInfo;
@@ -28,6 +29,9 @@
    @Autowired
    ISysUserService IUserService;
    @Autowired
    IGuideRepairOrderService iGuideRepairOrderService;
    /**
     * 查询列表
@@ -83,12 +87,19 @@
            return error("昵称不能为空");
        }
        SysUser user = IUserService.getUserByAccount(config.getLoginName());
        if (user != null) {
            //提示用户名或密码错误
            return error("该账户已存在!");
        if(StringUtils.isEmpty(config.getDepartmentId()))
        {
            return error("部门不能为空");
        }
        ResultData data = IUserService.loginByPhonenumber(config.getPhonenumber());
        if (data != null)
        {
            SysUser user= (SysUser) data.getData();
            user.setUserType("2");
            //提示用户名或密码错误
            return toAjax(IUserService.updateConfig(user));
        }
        config.setUserType("2");
        config.setCreateTime(LocalDateTime.now());
@@ -143,6 +154,13 @@
        {
            return error("userId不能为空");
        }
        int a=iGuideRepairOrderService.countUser(userId,"2");
        if(a>0)
        {
            return error("该人员有工单未处理完不能删除");
        }
        return toAjax(IUserService.deleteConfigById(userId));
    }
flower_city/src/main/java/com/dg/core/controller/GuideRepairOrderController.java
@@ -174,10 +174,10 @@
        entity.setCreateTime(LocalDateTime.now());
        entity.setUpdateTime(LocalDateTime.now());
        entity.setState("12");
        entity.setDepartmentalId(sysUser.getDepartmentId());
        entity.setToUserId(sysUser.getUserId()+"");
        entity.setFromUserId(order.getGuideUserId());
        entity.setFromDepartmentalId(order.getGuideDepartmentId());
        entity.setDepartmentalId(order.getGuideDepartmentId());
        entity.setToUserId(order.getGuideUserId());
        entity.setFromUserId(sysUser.getUserId()+"");
        entity.setFromDepartmentalId(sysUser.getDepartmentId());
        entity.setGuideId(order.getId().toString());
        iGuideEvolveService.insertConfig(entity);
flower_city/src/main/java/com/dg/core/controller/ReplyTemplateController.java
@@ -44,17 +44,6 @@
    {
        Page<ReplyTemplateEntity> pageParam = new Page<>(pageNum,pageSize);
        List<String> ids=iOrganizationChartService.getIds(sysUser.getDepartmentId());
        String[] roles = sysUser.getRoleIds().split(",");
        Integer isRole=0;//是否超管
        for (String role: roles) {
            if (role.equals("1")){
                isRole=1;
                break;
            }
        }
        if (isRole.equals(1)){
            ids=null;
        }
        List<ReplyTemplateEntity> list = iReplyTemplateService.selectConfigList(pageParam,pageSize,Name,ids);
        int num=iReplyTemplateService.countNum(Name,ids);
        return getDataTable(list,num);
flower_city/src/main/java/com/dg/core/db/gen/entity/TransactionEvent.java
@@ -255,7 +255,11 @@
    @ApiModelProperty(name = "operationalGuidelineVideoName", value = "操作指南视频名称")
    private String  operationalGuidelineVideoName;
    @ApiModelProperty(name = "operationalGuidelineName", value = "操作指南名称")
    private  String  operationalGuidelineName;
flower_city/src/main/java/com/dg/core/db/gen/mapper/GuideRepairOrderMapper.java
@@ -62,6 +62,12 @@
    /**
     * 很具用户id查询是否有对应工单
     * @return
     */
    int countUser(@Param("userId") String userId,@Param("state") String state);
    /**
     * 统计工单用   1 今天   2昨天   3本月   4本年度
     * @return
     */
flower_city/src/main/java/com/dg/core/db/gen/mapper/TransactionEventMapper.java
@@ -70,7 +70,7 @@
     * @param matterName
     * @return
     */
    List<TransactionEvent> queryMatterNameList(String matterName);
    List<TransactionEvent> queryMatterNameList(@Param("matterName") String matterName,@Param("classifyId") String classifyId);
    /**
     * 导办事务搜索统计数量
@@ -171,5 +171,13 @@
    List<String> selectclassifyId(String classifyId);
    /**
     * 根据关联词导办事务搜索搜索(不分页)(去重用于小程序)
     * @param keyWord
     * @return
     */
    List<Search>  selectSearchAssociateDistinct( String keyWord);
}
flower_city/src/main/java/com/dg/core/db/manual/pojo/Search.java
@@ -1,8 +1,11 @@
package com.dg.core.db.manual.pojo;
import com.dg.core.db.gen.entity.TransactionEvent;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@ApiModel("自公告门户网搜索数据")
@Data
@@ -20,6 +23,13 @@
    @ApiModelProperty("浏览次数")
    private  Integer views;
    @ApiModelProperty("分类id")
    private  Integer classifyId;
    @ApiModelProperty("搜索数据类型1.办事部门2.办事指南 3.推荐办事指南4.分类")
    private  Integer type;
    @ApiModelProperty("办事指南")
    private List<TransactionEvent> transactionEventList;
}
flower_city/src/main/java/com/dg/core/service/IGuideRepairOrderService.java
@@ -49,6 +49,13 @@
     */
    int countConfigList(String matterName,List<String> ids);
    /**
     * 很具用户id查询是否有对应工单
     * @return
     */
    int countUser(String userId,String state);
    /**
     * 根据进展类修改用户代办数量
     * @param order
flower_city/src/main/java/com/dg/core/service/ISysUserService.java
@@ -3,7 +3,6 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dg.core.ResultData;
import com.dg.core.db.gen.entity.SysUser;
import org.springframework.data.repository.query.Param;
import java.util.List;
@@ -17,7 +16,9 @@
     */
    public List<SysUser> selectConfigList(IPage<SysUser> page, Integer state,String userType);
    SysUser selectData(String userId);
    /**
     * 新增聊天记录
     *
@@ -41,7 +42,6 @@
     * @return 结果
     */
    public int deleteConfigById(String id);
    /**
     * 获取数据库总条数(批量)
@@ -71,7 +71,6 @@
     */
    List<SysUser> selectListByDepartmentId(String departmentId,String classifyId);
    /**
     * 通过手机号获取用户信息
     *
@@ -79,13 +78,12 @@
     */
    ResultData loginByPhonenumber(String phonenumber);
    /**
     * 查询用户列表(不分页)
     * @param userType 用户类型
     * @return 结果
     */
    List<SysUser>  queryList(Integer userType);
    List<SysUser> queryList(Integer userType);
}
flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java
@@ -175,6 +175,11 @@
    }
    @Override
    public int countUser(String userId, String state) {
        return baseMapper.countUser(userId,state);
    }
    @Override
    public int updateSysUserOrderNum(GuideEvolveEntity order) {
       if(order.getState().equals("13")){
           SysUser sysUser = sysUserMapper.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getUserId, order.getToUserId()));
flower_city/src/main/java/com/dg/core/service/impl/TransactionEventImpl.java
@@ -105,8 +105,14 @@
    public QueryResults queryMatterNameList(String keyWord) {
        QueryResults queryResults = new QueryResults();
        List<Search> searches = baseMapper.selectSearchList(keyWord);
        for (Search search:searches) {
            search.setTransactionEventList(baseMapper.queryMatterNameList(keyWord,search.getClassifyId().toString()));
        }
        queryResults.setSearchList(searches);
        List<Search> searchesAssociate = baseMapper.selectSearchAssociate(keyWord);
        List<Search> searchesAssociate = baseMapper.selectSearchAssociateDistinct(keyWord);
        for (Search search:searchesAssociate) {
            search.setTransactionEventList(baseMapper.queryMatterNameList(keyWord,search.getClassifyId().toString()));
        }
        queryResults.setTransactionEventList(searchesAssociate);
        queryResults.setKeywordEntityList( keywordMapper.selectByName(keyWord));
        return queryResults;
@@ -117,7 +123,7 @@
    public RecommendResult smartConsulting(String keyWord){
        RecommendResult recommendResult=new RecommendResult();
        List<KeywordEntity> keywordEntityList=new ArrayList<>();
        List<TransactionEvent> transactionEventEntities = baseMapper.queryMatterNameList(keyWord);
        List<TransactionEvent> transactionEventEntities = baseMapper.queryMatterNameList(keyWord,null);
        recommendResult.setTransactionEventList(transactionEventEntities);
        for (TransactionEvent transactionEvent: transactionEventEntities) {
            if (transactionEvent.getAssociateNames()!=null) {
flower_city/src/main/resources/mapper/GuideRepairOrderMapper.xml
@@ -148,6 +148,20 @@
        select count(id) from automessage_guide_repair_order
    </select>
    <select id="countUser" resultType="integer">
        select count(id) from automessage_guide_repair_order
        <where>
            <if test="userId != null and userId != ''">
                AND guide_user_id=#{userId}
            </if>
            <if test="state != null and state != ''">
                AND automessage_guide_repair_order.state = #{state}
            </if>
        </where>
    </select>
    <!--  首页统计  勿动  -->
    <select id="countStatisticsNum" parameterType="string" resultType="integer">
        select count(id) from automessage_guide_repair_order
@@ -202,10 +216,10 @@
            </if>
        </where>
        GROUP BY
            date_format(create_time,'%y%m%d')
        date_format(create_time,'%y%m%d')
        ORDER BY
            create_time DESC
            LIMIT #{time}
        create_time DESC
        LIMIT #{time}
    </select>
</mapper>
flower_city/src/main/resources/mapper/SysUserMapper.xml
@@ -123,7 +123,7 @@
    <select id="selectListByDepartmentId"  resultMap="SysUserResult">
        <include refid="selectSysUserVo"/>
         <where>
             user_type=2 and status=1
             user_type=2 and status=0
        <if test="list!=null">
            and  department_id in
            <foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
flower_city/src/main/resources/mapper/TransactionEventMapper.xml
@@ -42,6 +42,8 @@
        <id     property="commonProblem"      column="common_problem"      />
        <id     property="commonProblemUrl"      column="common_problem_url"      />
        <id     property="commonProblemName"      column="common_problem_name"      />
        <id     property="operationalGuidelineVideoName"      column="operational_guideline_video_name"      />
        <id     property="operationalGuidelineName"      column="operational_guideline_name"      />
    </resultMap>
@@ -82,6 +84,8 @@
            common_problem_url,
            common_problem_name,
            operational_guideline_video_url,
            operational_guideline_video_name,
            operational_guideline_name,
            (IF((select classify_grade from automessage_classify_administration where automessage_classify_administration.id=automessage_transaction_event.classify_id)='2',
                (select classify_name from automessage_classify_administration where automessage_classify_administration.id=(select parent_id from
                automessage_classify_administration where automessage_classify_administration.id=automessage_transaction_event.classify_id)),
@@ -185,6 +189,8 @@
        <if test="commonProblem != null and commonProblem != '' ">common_problem,</if>
        <if test="commonProblemUrl != null and commonProblemUrl != '' ">common_problem_url,</if>
        <if test="commonProblemName != null and commonProblemName != '' ">common_problem_name,</if>
        <if test="operationalGuidelineVideoName != null and operationalGuidelineVideoName != '' ">operational_guideline_video_name,</if>
        <if test="operationalGuidelineName != null and operationalGuidelineName != '' ">operational_guideline_name,</if>
        update_time,
        create_time
        )values(
@@ -221,6 +227,8 @@
        <if test="commonProblem != null and commonProblem != '' ">#{commonProblem},</if>
        <if test="commonProblemUrl != null and commonProblemUrl != '' ">#{commonProblemUrl},</if>
        <if test="commonProblemName != null and commonProblemName != '' ">#{commonProblemName},</if>
        <if test="operationalGuidelineVideoName != null and operationalGuidelineVideoName != '' ">#{operationalGuidelineVideoName},</if>
        <if test="operationalGuidelineName != null and operationalGuidelineName != '' ">#{operationalGuidelineName},</if>
        sysdate(),
        sysdate()
        )
@@ -262,6 +270,8 @@
            <if test="commonProblemUrl != null and commonProblemUrl != '' ">common_problem_url=#{commonProblemUrl},</if>
            <if test="commonProblemName != null and commonProblemName != '' ">common_problem_name=#{commonProblemName},</if>
            <if test="operationalGuidelineVideoUrl != null ">operational_guideline_video_url=#{operationalGuidelineVideoUrl},</if>
            <if test="operationalGuidelineVideoName != null and operationalGuidelineVideoName != '' ">operational_guideline_video_name=#{operationalGuidelineVideoName},</if>
            <if test="operationalGuidelineName != null and operationalGuidelineName != '' ">operational_guideline_name=#{operationalGuidelineName},</if>
            update_time=sysdate()
        </set>
        where  id= #{id}
@@ -295,6 +305,9 @@
        <where>
            <if test="matterName != null and matterName != ''">
                AND (matter_name like concat('%', #{matterName}, '%') or #{matterName} like concat('%', matter_name, '%'))
            </if>
            <if test="classifyId != null and classifyId != ''">
               and (classify_id= #{classifyId} or classify_id in (select id FROM automessage_classify_administration where parent_id =#{classifyId} ))
            </if>
        </where>
@@ -357,12 +370,15 @@
    </select>
    <select id="selectSearchList" resultType="com.dg.core.db.manual.pojo.Search">
        select  id,title,content,views, type FROM(
                                                     select  id,organization_name title,resume content,null views,1 type  from   automessage_organization_chart  UNION
                                                     select  id,classify_name title,null content,null views,4 type from  automessage_classify_administration UNION
                                                     select  id,matter_name title,null content,transaction_num views,2 type  from automessage_transaction_event
                                                 ) k
        where  k.title like concat('%',#{keyWord}, '%') or k.content  like concat('%', #{keyWord}, '%')
        select distinct   classify_id, content, type   FROM(
                                                               select id,classify_name title,ifnull(concat((select classify_name from automessage_classify_administration where c.parent_id=id),'/',classify_name),classify_name)  content,id classify_id,4 type  from automessage_classify_administration c UNION
                                                               select  id,matter_name title,concat((select classify_name from  automessage_classify_administration
                                                                                                    where id=(select parent_id from  automessage_classify_administration  where id=automessage_transaction_event.classify_id)),
                                                                                                   '/',(select classify_name from  automessage_classify_administration  where id=automessage_transaction_event.classify_id)) content,classify_id,
                                                                       2 type from automessage_transaction_event
                                                           ) k
        where  k.title like concat('%',#{keyWord}, '%')
    </select>
    <select id="selectSearchAssociate" resultType="com.dg.core.db.manual.pojo.Search">
@@ -372,6 +388,12 @@
        transaction_num views ,3 type from automessage_transaction_event where  associate_names like   concat('%',#{keyWord}, '%')
    </select>
    <select id="selectSearchAssociateDistinct" resultType="com.dg.core.db.manual.pojo.Search" >
             select  distinct   classify_id,
                    (select ifnull(concat((select classify_name from automessage_classify_administration where c.parent_id=id),'/',classify_name),classify_name)  content  from automessage_classify_administration c where c.id=t.classify_id) content,
                    3 type from automessage_transaction_event t where  associate_names like  concat('%',#{keyWord}, '%')
    </select>
    <select id="selectDataIfExist" resultType="string">