flower_city/src/main/java/com/dg/core/api/GuideRepairOrderAppletsController.java
@@ -99,10 +99,6 @@ return ResultData.error("导办人员id不能为空"); } if(StringUtils.isEmpty(order.getGuideUserPhone())) { return ResultData.error("导办人员电话不能为空"); } //已分配 order.setState("2"); @@ -154,19 +150,21 @@ { return ResultData.error("该工单已办结!"); } if(!StringUtils.equals(order.getState(),"2")) { return ResultData.error("该工单非是待办状态!"); if(StringUtils.equals(entity.getState(),"2")){//如果用户选择未解决则状态改为待办 order.setState("2"); entity.setState("8"); } //待评价 order.setState("4"); else if(StringUtils.equals(entity.getState(),"4")){ //待评价 order.setState("4"); entity.setState("9"); } //新增已办结记录 entity.setCreateTime(LocalDateTime.now()); entity.setUpdateTime(LocalDateTime.now()); entity.setState("4"); entity.setFromDepartmentalId(sysUser.getDepartmentId()); entity.setFromUserId(sysUser.getUserId()+""); entity.setGuideId(order.getId().toString()); iGuideEvolveService.insertConfig(entity); return toAjax(iGuideRepairOrderService.updateConfig(order)); } flower_city/src/main/java/com/dg/core/controller/OrganizationController.java
@@ -1,8 +1,13 @@ package com.dg.core.controller; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.dg.core.ResultData; import com.dg.core.annotation.Authorization; import com.dg.core.annotation.CurrentUser; import com.dg.core.db.gen.entity.ClassifyAdministration; import com.dg.core.db.gen.entity.OrganizationChartEntity; import com.dg.core.db.gen.entity.SysUser; import com.dg.core.service.IOrganizationChartService; import com.dg.core.util.TableDataInfo; import io.swagger.annotations.Api; @@ -11,6 +16,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.Assert; import org.springframework.web.bind.annotation.*; import java.time.LocalDateTime; import java.util.List; @Api(tags = {"组织架构接口"}) @@ -25,7 +33,7 @@ /** * 查询机构列表 */ @ApiOperation("查询机构列表") @ApiOperation(value = "查询机构列表",response = OrganizationChartEntity.class) @GetMapping("/getList") public TableDataInfo selectConfigList() { @@ -35,7 +43,7 @@ /** * 新增机构 */ @ApiOperation("新增机构") @ApiOperation(value = "新增机构",response = OrganizationChartEntity.class) @PostMapping("/add") @Authorization public ResultData insertConfig(@RequestBody OrganizationChartEntity entity) @@ -62,11 +70,13 @@ /** * 更新机构 */ @ApiOperation("更新机构") @ApiOperation(value = "更新机构",response = OrganizationChartEntity.class) @PostMapping("/update") @Authorization public ResultData updateConfig(@RequestBody OrganizationChartEntity entity) public ResultData updateConfig(@RequestBody OrganizationChartEntity entity,@CurrentUser SysUser sysUser) { entity.setUpdateTime(LocalDateTime.now()); entity.setUpdateUserId(Integer.parseInt(String.valueOf(sysUser.getUserId()))); return toAjax(iOrganizationChartService.updateConfig(entity)); } @@ -100,4 +110,21 @@ return ResultData.success(iOrganizationChartService.selectConfigById(id)); } /** * 查询机构列表(分页) */ @ApiOperation(value = "查询机构列表(分页)(部门应用)",response = OrganizationChartEntity.class) @GetMapping("/queryList") @Authorization public TableDataInfo queryList(@RequestParam(value = "pageNum",required = false) Integer pageNum, @RequestParam(value = "pageSize",required = false) Integer pageSize, @RequestParam(value = "organizationName",required = false)String organizationName){ Assert.notNull(pageNum, "pageNum can not be empty"); Assert.notNull(pageSize, "pageSize can not be empty"); Page<OrganizationChartEntity> pageParam = new Page<>(pageNum,pageSize); return getDataTable(iOrganizationChartService.queryList(pageParam,pageSize,organizationName),iOrganizationChartService.countList(organizationName)); } } flower_city/src/main/java/com/dg/core/db/gen/entity/OrganizationChartEntity.java
@@ -105,6 +105,19 @@ private String departmentalApplication; /** * 修改人 */ @ApiModelProperty("修改人") private Integer updateUserId; /** * 修改人 */ @ApiModelProperty("修改人姓名") private String updateUserName; /** * 下属机构 */ @TableField(exist = false) flower_city/src/main/java/com/dg/core/db/gen/mapper/OrganizationChartMapper.java
@@ -1,6 +1,7 @@ package com.dg.core.db.gen.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.dg.core.db.gen.entity.OrganizationChartEntity; import org.springframework.data.repository.query.Param; @@ -46,5 +47,17 @@ OrganizationChartEntity selectConfigById(@Param("id") String id); /** * 查询机构列表(分页) */ List<OrganizationChartEntity> queryList(IPage<OrganizationChartEntity> page, Integer state, String organizationName); /** * 统计数量(部门应用) */ int countList(String organizationName); } flower_city/src/main/java/com/dg/core/service/IOrganizationChartService.java
@@ -1,5 +1,6 @@ package com.dg.core.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.dg.core.db.gen.entity.OrganizationChartEntity; import java.util.List; @@ -41,4 +42,16 @@ * 根据id查取消组织机构 */ OrganizationChartEntity selectConfigById(String id); /** * 查询机构列表(分页) */ List<OrganizationChartEntity> queryList(IPage<OrganizationChartEntity> page, Integer state, String organizationName); /** * 统计数量(部门应用) */ int countList(String organizationName); } flower_city/src/main/java/com/dg/core/service/impl/OrganizationChartImpl.java
@@ -1,6 +1,7 @@ package com.dg.core.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.dg.core.db.gen.entity.OrganizationChartEntity; import com.dg.core.db.gen.mapper.OrganizationChartMapper; @@ -76,4 +77,14 @@ public OrganizationChartEntity selectConfigById(String id) { return baseMapper.selectConfigById(id); } @Override public List<OrganizationChartEntity> queryList(IPage<OrganizationChartEntity> page, Integer state, String organizationName) { return baseMapper.queryList(page,state,organizationName); } @Override public int countList(String organizationName) { return baseMapper.countList(organizationName); } } flower_city/src/main/resources/mapper/GuideRepairOrderMapper.xml
@@ -74,16 +74,17 @@ <include refid="selectGuideRepairOrderVo"/> <where> <if test="matterName != null and matterName != ''"> AND matterName=#{matterName} AND matter_name like concat('%', #{matterName}, '%') </if> </where> order by update_time desc , create_time desc </select> <select id="countConfigList" resultType="integer"> select count(id) from automessage_guide_repair_order <where> <if test="matterName != null and matterName != ''"> AND matterName=#{matterName} AND matter_name like concat('%', #{matterName}, '%') </if> </where> </select> flower_city/src/main/resources/mapper/OrganizationChartMapper.xml
@@ -31,6 +31,8 @@ create_time, 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 organization_name from automessage_organization_chart as oc where oc.id=automessage_organization_chart.parent_id) as parentName, city, district, @@ -50,12 +52,17 @@ <select id="queryList" resultMap="OrganizationChartResult"> <include refid="selectOrganizationChartVo"/> <where> <if test="parentId != null and parentId != ''"> AND parent_id=#{parentId} <if test="organizationName != null and organizationName != ''"> AND organization_name like concat('%', #{organizationName}, '%') </if> </where> </select> <if test="grade != null and grade != ''"> AND grade=#{grade} <select id="countList" resultType="integer"> select count(id) from automessage_organization_chart <where> <if test="organizationName != null and organizationName != ''"> AND organization_name like concat('%', #{organizationName}, '%') </if> </where> </select> @@ -119,6 +126,8 @@ <if test="village != null and village != '' ">village=#{village},</if> <if test="detailedAddress != null and detailedAddress != '' ">detailed_address=#{detailedAddress},</if> <if test="grade != null and grade != '' ">grade=#{grade},</if> <if test="departmentalApplication != null and departmentalApplication != '' ">departmental_application=#{departmentalApplication},</if> <if test="updateUserId != null">update_user_id=#{updateUserId},</if> update_time=sysdate() </set> where id= #{id}