Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test
| | |
| | | { |
| | | 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); |
| | |
| | | { |
| | | return ResultData.error("模板名称不能为空"); |
| | | } |
| | | |
| | | entity.setId(null); |
| | | entity.setDepartmentId(sysUser.getDepartmentId()); |
| | | entity.setCreateUserId(sysUser.getUserId()+""); |
| | |
| | | * @author fengjin |
| | | * @since 2022-09-20 |
| | | */ |
| | | @TableName("area_code_2022") |
| | | @TableName("automessage_area_code_2022") |
| | | @Data |
| | | @ApiModel("所属地区实体类") |
| | | public class AreaCode2022 implements Serializable { |
| | |
| | | public List<AreaCode2022> getListByPCode(String id){ |
| | | List<AreaCode2022> areaCode2022s = baseMapper.selectList(new QueryWrapper<AreaCode2022>().lambda().eq(AreaCode2022::getPcode, id)); |
| | | for (AreaCode2022 areaCode2022:areaCode2022s) { |
| | | if (areaCode2022.getLevel()!=4) |
| | | if (areaCode2022.getLevel()!=3) |
| | | areaCode2022.setChild(this.getListByPCode(areaCode2022.getCode().toString())); |
| | | } |
| | | return areaCode2022s; |
| | |
| | | departmentIds.add(organizationChart.getId().toString()); |
| | | } |
| | | List<SysUser> sysUsers = sysUserMapper.selectListByDepartmentId(departmentIds, "," + transactionEvent.getClassifyId(), transactionEvent.getClassifyId() + ",");//获取导半人员 |
| | | if (sysUsers==null) {//如果此所属地区部门没有导半人员则看其下级地区有没有相关分类导办人员 |
| | | if (sysUsers.size()==0) {//如果此所属地区部门没有导半人员则看其下级地区有没有相关分类导办人员 |
| | | for (OrganizationChartEntity organizationChart:organizationChartEntities) { |
| | | //获取下级部门 |
| | | List<OrganizationChartEntity> organizationChartEntitiesUser = organizationChartMapper.selectList(new QueryWrapper<OrganizationChartEntity>().lambda() |
| | |
| | | departmentIds=this.getDepartmentIds(organizationChartEntitiesUser,departmentIds); |
| | | } |
| | | sysUsers = sysUserMapper.selectListByDepartmentId(departmentIds, "," + transactionEvent.getClassifyId(), transactionEvent.getClassifyId() + ",");//获取导半人员 |
| | | if (sysUsers==null){//如果其下级部门仍没有该分类的导半人员则查询所以该所属地区的导办人员 |
| | | if (sysUsers.size()==0){//如果其下级部门仍没有该分类的导半人员则查询所以该所属地区的导办人员 |
| | | sysUsers = sysUserMapper.selectListByDepartmentId(departmentIds,null,null);//获取导半人员 |
| | | if(sysUsers==null)//如果该所属地区没有导办人员则为特殊单据需要手动分配 |
| | | if(sysUsers.size()==0)//如果该所属地区没有导办人员则为特殊单据需要手动分配 |
| | | guideRepairOrder.setState("1"); |
| | | } |
| | | } |
| | | if (sysUsers!=null){//系统分配导办人员 |
| | | if (sysUsers.size()>0){//系统分配导办人员 |
| | | SysUser sysUser = sysUsers.get(0);//因为sql用了升序排序所以第一条就是待办结最少的人员之一 |
| | | guideRepairOrder.setState("2"); |
| | | sysUser.setTransactionNum(sysUser.getTransactionNum()+1); |
| | |
| | | spring.datasource.password=nahanMysqlPwd&&RemoteRemote2019nahan |
| | | #spring.datasource.url=jdbc:mysql://10.8.0.74:3306/flower_city_automessage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&allowMultiQueries=true&serverTimezone=GMT%2B8 |
| | | #spring.datasource.url=jdbc:mysql://localhost:3306/flower_city_automessage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&allowMultiQueries=true&serverTimezone=GMT%2B8 |
| | | spring.datasource.url=jdbc:mysql://10.8.0.74:3306/huacheng_smart_life?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&allowMultiQueries=true&serverTimezone=GMT%2B8 |
| | | #spring.datasource.url=jdbc:mysql://182.151.2.19:3306/huacheng_smart_life?allowMultiQueries=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 |
| | | #spring.datasource.url=jdbc:mysql://10.8.0.74:3306/huacheng_smart_life?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&allowMultiQueries=true&serverTimezone=GMT%2B8 |
| | | spring.datasource.url=jdbc:mysql://182.151.2.19:3306/huacheng_smart_life?allowMultiQueries=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 |
| | | |
| | | |
| | | server.port=8187 |
| | |
| | | #Redis |
| | | spring.redis.host=127.0.0.1 |
| | | spring.redis.port=6379 |
| | | #spring.redis.password=nahanRedisPwsIsVerySimple&& |
| | | spring.redis.password=nahanRedisPwsIsVerySimple&& |
| | | |
| | | |
| | | |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectAreaCode"> |
| | | select code,name,level,pcode FROM area_code_2022 |
| | | select code,name,level,pcode FROM automessage_area_code_2022 |
| | | </sql> |
| | | |
| | | <select id="selectByIdSet" resultMap="AreaCodeResult"> |
| | |
| | | city, |
| | | district, |
| | | village, |
| | | (select name from area_code_2022 where city=area_code_2022.code) as cityName, |
| | | (select name from area_code_2022 where district=area_code_2022.code) as districtName, |
| | | (select name from area_code_2022 where village=area_code_2022.code) as villageName, |
| | | (select name from automessage_area_code_2022 where city=automessage_area_code_2022.code) as cityName, |
| | | (select name from automessage_area_code_2022 where district=automessage_area_code_2022.code) as districtName, |
| | | (select name from automessage_area_code_2022 where village=automessage_area_code_2022.code) as villageName, |
| | | detailed_address, |
| | | grade, |
| | | area_list |
| | |
| | | transaction_ids, |
| | | transaction_names, |
| | | openid, |
| | | transaction_num, |
| | | (select organization_name from automessage_organization_chart where automessage_sys_user.department_id=automessage_organization_chart.id) as department_name |
| | | FROM |
| | | automessage_sys_user |
| | |
| | | <select id="selectListByDepartmentId" resultMap="SysUserResult"> |
| | | <include refid="selectSysUserVo"/> |
| | | <where> |
| | | user_type=2 |
| | | <if test="list!=null"> |
| | | department_id in |
| | | and department_id in |
| | | <foreach collection="list" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import me.chanjar.weixin.common.error.WxErrorException; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 登录 |
| | |
| | | @GetMapping("uu/getQRCode") |
| | | public R uuLogin(@RequestParam("couponId") String couponId) { |
| | | try { |
| | | WxMaQrcodeService qrCodeService = wxMaConfiguration.getMaService("wx118de8a734d269f0").getQrcodeService(); |
| | | byte[] bytes = qrCodeService.createWxaCodeUnlimitBytes("couponId=" + couponId, |
| | | //i小懒 |
| | | WxMaQrcodeService wsCodeService = wxMaConfiguration.getMaService("wx98d62711dfbd8425").getQrcodeService(); |
| | | byte[] bytes = wsCodeService.createWxaCodeUnlimitBytes("couponId=" + couponId, |
| | | "pages/user/getCoupon/getCoupon", true, "release", 30, true, null, false); |
| | | String res = String.format("data:image/png;base64,%s", Base64.encode(bytes)); |
| | | |
| | | //花城 |
| | | WxMaQrcodeService uuCodeService = wxMaConfiguration.getMaService("wx118de8a734d269f0").getQrcodeService(); |
| | | byte[] hcBytes = uuCodeService.createWxaCodeUnlimitBytes("couponId=" + couponId, |
| | | "packageD/pages/user/getCoupon/getCoupon", true, "release", 30, true, null, false); |
| | | return R.ok(String.format("data:image/png;base64,%s", Base64.encode(bytes))); |
| | | String hcRes = String.format("data:image/png;base64,%s", Base64.encode(hcBytes)); |
| | | |
| | | Map<String,String> retMap = new HashMap<>(); |
| | | retMap.put("ixiaolan",res); |
| | | retMap.put("huacheng",hcRes); |
| | | return R.ok(retMap); |
| | | } catch (Exception e) { |
| | | log.error("generate QRCode failed:" + e.getMessage()); |
| | | return R.fail("generate QRCode failed"); |
| | |
| | | if (userId == null) { |
| | | return R.fail("请重新登录"); |
| | | } |
| | | if (!this.getAppId().equals("wx118de8a734d269f0")){ |
| | | String releaseContent = addNeighborCircleAppDTO.getReleaseContent(); |
| | | if (StrUtil.isNotBlank(releaseContent)) { |
| | | String result = checkService.checkMessageBy(releaseContent, this.getLoginUserInfo().getOpenid(), this.getAppId()); |
| | |
| | | return R.fail(501, "上传图片存在违规信息"); |
| | | } |
| | | } |
| | | } |
| | | addNeighborCircleAppDTO.setUserId(userId); |
| | | if (StringUtils.isNotEmpty(loginUser.getPhone())) { |
| | | addNeighborCircleAppDTO.setPhone(this.getLoginUserInfo().getPhone()); |
| | |
| | | import com.panzhihua.common.utlis.IPUtil; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | /** |
| | | * 切面处理类,操作日志异常日志记录处理 |
| | |
| | | |
| | | if (joinPoint.getArgs().length > 0) { |
| | | for (Object o : joinPoint.getArgs()) { |
| | | if (o instanceof HttpServletRequest || o instanceof HttpServletResponse) { |
| | | if (o instanceof HttpServletRequest || o instanceof HttpServletResponse|| o instanceof MultipartFile) { |
| | | continue; |
| | | } |
| | | operlog.setOperParam(JSONObject.toJSONString(o)); // 请求参数 |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.interfaces.OperLog; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | @ApiOperation(value = "登录") |
| | | @PostMapping("login") |
| | | @OperLog(operModul = "运营后台登录",operType = 0,businessType = "登录") |
| | | public R login(@RequestBody LoginBody loginBody) { |
| | | String account = loginBody.getAccount(); |
| | | String password = loginBody.getPassword(); |
| | |
| | | |
| | | @ApiOperation(value = "登出") |
| | | @PostMapping("logout") |
| | | @OperLog(operModul = "运营后台登录",operType = 0,businessType = "登出") |
| | | public R login() { |
| | | String token = this.getToken(); |
| | | if (ObjectUtils.isEmpty(token)) { |
| | |
| | | package com.panzhihua.auth.service.impl; |
| | | |
| | | import java.util.Date; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.user.SysOperLogVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.IPUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | |
| | | import com.panzhihua.common.model.vos.LoginReturnsVO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.utlis.JWTTokenUtil; |
| | | import org.springframework.web.context.request.RequestAttributes; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import static java.util.Objects.nonNull; |
| | |
| | | private AuthenticationManager authenticationManager; |
| | | @Autowired |
| | | private StringRedisTemplate redisTemplate; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | /** |
| | | * 微信小程序登录 |
| | |
| | | loginReturnVO.setLat(comActVO.getLat()); |
| | | loginReturnVO.setLng(comActVO.getLng()); |
| | | } |
| | | //保存登录日志 |
| | | HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); |
| | | SysOperLogVO operlog = new SysOperLogVO(); |
| | | operlog.setTitle("登录操作"); // 操作模块 |
| | | operlog.setBusinessType(1); // 操作类型 |
| | | operlog.setMethod("com.panzhihua.community_backstage.api.LoginApi.login"); // 请求方法 |
| | | operlog.setAccount(loginUser.getAccount()); |
| | | operlog.setOperName(loginUser.getName()); // 请求用户名称 |
| | | operlog.setOperIp(IPUtil.getIpAddress(request)); // 请求IP |
| | | operlog.setOperUrl(request.getRequestURI()); // 请求URI |
| | | operlog.setRequestMethod(request.getMethod()); |
| | | operlog.setOperLocation(IPUtil.getIpBelongAddress(request)); |
| | | operlog.setOperTime(new Date()); // 创建时间 |
| | | operlog.setCommunityId(loginUser.getCommunityId()); |
| | | userService.addOperLog(operlog); |
| | | return loginReturnVO; |
| | | } |
| | | |
| | |
| | | public static final String NEWS_ID = "news_media_id:"; |
| | | |
| | | public static final String NEWS_LIST = "news_list:"; |
| | | public static final String SANSHUO_INDUSTRY_CENTER_ROLE="1559112102373756911"; |
| | | public static final String SANSHUO_EXPERT_ROLE="1559112102373756955"; |
| | | public static final String SANSHUO_INDUSTRY_CENTER_ROLE="103"; |
| | | public static final String SANSHUO_EXPERT_ROLE="102"; |
| | | } |
| | |
| | | package com.panzhihua.common.utlis; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.URL; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @ClassName: IPUtil |
| | | * @version 1.0 |
| | | * @Desc: Ip工具类 |
| | | * @author huaping hu |
| | | * @version 1.0 |
| | | * @ClassName: IPUtil |
| | | * @Desc: Ip工具类 |
| | | * @date 2016年6月1日下午5:26:56 |
| | | * @history v1.0 |
| | | * |
| | | */ |
| | | @Slf4j |
| | | public class IPUtil { |
| | | |
| | | /** |
| | | * |
| | | * 描述:获取IP地址 |
| | | * |
| | | * @param request |
| | | * @return |
| | | * @author huaping hu |
| | | * @date 2016年6月1日下午5:25:44 |
| | | * @param request |
| | | * @return |
| | | */ |
| | | public static String getIpAddress(HttpServletRequest request) { |
| | | |
| | | if (request == null) { |
| | | return "unknown"; |
| | | } |
| | | String ip = request.getHeader("x-forwarded-for"); |
| | | |
| | | if (ip == null || ip.length() == 0 || "nuknown".equalsIgnoreCase(ip)) { |
| | | |
| | | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getHeader("Proxy-Client-IP"); |
| | | } |
| | | if (ip == null || ip.length() == 0 || "nuknown".equalsIgnoreCase(ip)) { |
| | | |
| | | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getHeader("X-Forwarded-For"); |
| | | } |
| | | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getHeader("WL-Proxy-Client-IP"); |
| | | } |
| | | if (ip == null || ip.length() == 0 || "nuknown".equalsIgnoreCase(ip)) { |
| | | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getHeader("X-Real-IP"); |
| | | } |
| | | |
| | | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getRemoteAddr(); |
| | | } |
| | | return ip; |
| | | |
| | | return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * |
| | | * 描述:获取IP+[IP所属地址] |
| | | * |
| | | * @author huaping hu |
| | | * @date 2016年6月1日下午6:01:09 |
| | | * @param request |
| | | * @return |
| | | * @author huaping hu |
| | | * @date 2016年6月1日下午6:01:09 |
| | | */ |
| | | public static String getIpBelongAddress(HttpServletRequest request) { |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * 描述:获取IP所属地址 |
| | | * |
| | | * @author huaping hu |
| | | * @date 2016年6月1日下午5:59:43 |
| | | * @param ip |
| | | * @return |
| | | * @author huaping hu |
| | | * @date 2016年6月1日下午5:59:43 |
| | | */ |
| | | public static String getIPbelongAddress(String ip) { |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * 描述:获取Ip所属地址 |
| | | * |
| | | * @author huaping hu |
| | | * @date 2016年6月1日下午5:38:55 |
| | | * @param urlStr |
| | | * @return |
| | | * @author huaping hu |
| | | * @date 2016年6月1日下午5:38:55 |
| | | */ |
| | | public static String call(String urlStr) { |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * 描述:将InputStream转换成String |
| | | * |
| | | * @author huaping hu |
| | | * @date 2016年6月1日下午5:51:53 |
| | | * @param is |
| | | * @return |
| | | * @author huaping hu |
| | | * @date 2016年6月1日下午5:51:53 |
| | | */ |
| | | public static String streamConvertToSting(InputStream is) { |
| | | |
| | |
| | | String accessToken = "0"; |
| | | try { |
| | | log.info("获取微信token参数:appid=" + APP_ID + ",appSecret=" + APP_SECRET); |
| | | String accessTokenUrl = ACCESS_TOKEN_URL + "&appid=" + APP_ID + "&secret=" + APP_SECRET; |
| | | String accessTokenUrl = ACCESS_TOKEN_URL + "&appid=wx98d62711dfbd8425"+ "&secret=97a2a10b990c2774ed279724337b5337"; |
| | | String result = HttpClientUtil.httpGet(accessTokenUrl, null, null); |
| | | Map<String, Object> resultMap = JSON.parseObject(result, Map.class); |
| | | if (resultMap.containsKey("access_token")) { |
| | |
| | | import com.panzhihua.common.utlis.IPUtil; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | /** |
| | | * 切面处理类,操作日志异常日志记录处理 |
| | |
| | | |
| | | if (joinPoint.getArgs().length > 0) { |
| | | for (Object o : joinPoint.getArgs()) { |
| | | if (o instanceof HttpServletRequest || o instanceof HttpServletResponse) { |
| | | if (o instanceof HttpServletRequest || o instanceof HttpServletResponse|| o instanceof MultipartFile) { |
| | | continue; |
| | | } |
| | | operlog.setOperParam(JSONObject.toJSONString(o)); // 请求参数 |
| | |
| | | |
| | | if (joinPoint.getArgs().length > 0) { |
| | | for (Object o : joinPoint.getArgs()) { |
| | | if (o instanceof HttpServletRequest || o instanceof HttpServletResponse) { |
| | | if (o instanceof HttpServletRequest || o instanceof HttpServletResponse || o instanceof MultipartFile) { |
| | | continue; |
| | | } |
| | | operlog.setOperParam(JSONObject.toJSONString(o)); // 请求参数 |
| | |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.panzhihua.common.interfaces.OperLog; |
| | | import com.panzhihua.common.model.dtos.community.building.admin.*; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationImportErrorVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVillageVO; |
| | |
| | | |
| | | @ApiOperation(value = "excel导入楼栋信息--注:以前的接口,不需要对接") |
| | | @PostMapping(value = "/import", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "房屋信息管理", operType = 0, businessType = "导入楼栋信息") |
| | | public R downloadPopulationTemplate(@RequestParam MultipartFile file) { |
| | | InputStream inputStream; |
| | | try { |
| | |
| | | |
| | | @ApiOperation(value = "添加单元") |
| | | @PostMapping("/add/unit") |
| | | @OperLog(operModul = "房屋信息管理", operType = 1, businessType = "添加单元") |
| | | public R addUnit(@RequestBody AddBuildingUnitDto addBuildingUnitDto) { |
| | | // 获取登陆用户绑定社区id |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | |
| | | |
| | | @ApiOperation(value = "修改单元") |
| | | @PostMapping("/edit/unit") |
| | | @OperLog(operModul = "房屋信息管理", operType = 2, businessType = "修改单元") |
| | | public R editUnit(@RequestBody EditBuildingUnitDto editBuildingUnitDto) { |
| | | // 获取登陆用户绑定社区id |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | |
| | | |
| | | @ApiOperation("删除楼栋") |
| | | @GetMapping("/delete") |
| | | @OperLog(operModul = "房屋信息管理", operType = 3, businessType = "删除") |
| | | public R delete(@RequestParam("id")Long id){ |
| | | return communityService.buildingDelete(id); |
| | | } |
| | |
| | | //@OperLog(operModul = "党支部管理", operType = 1) |
| | | @ApiOperation(value = "新增党支部") |
| | | @PostMapping("addpartyorganization") |
| | | @OperLog(operModul = "报道党员管理", operType = 1, businessType = "新增党支部") |
| | | public R addPartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | | Long communityId = this.getCommunityId(); |
| | | partyOrganizationVO.setCommunityId(communityId); |
| | |
| | | //@OperLog(operModul = "党支部管理", operType = 2) |
| | | @ApiOperation(value = "编辑党支部") |
| | | @PostMapping("updatepartyorganization") |
| | | @OperLog(operModul = "报道党员管理", operType = 2, businessType = "编辑党支部") |
| | | public R updatePartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | | Long id = partyOrganizationVO.getId(); |
| | | if (null == id || 0 == id) { |
| | |
| | | return partyBuildingWestService.getPbOrgAllList(partyOrganizationVO); |
| | | } |
| | | |
| | | @OperLog(operModul = "党支部管理", operType = 1) |
| | | @OperLog(operModul = "党支部管理", operType = 1,businessType = "新增党支部") |
| | | @ApiOperation(value = "新增党支部") |
| | | @PostMapping("addpartyorganization") |
| | | public R addPartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | |
| | | return r; |
| | | } |
| | | |
| | | @OperLog(operModul = "党支部管理", operType = 2) |
| | | @OperLog(operModul = "党支部管理", operType = 2,businessType = "编辑党支部") |
| | | @ApiOperation(value = "编辑党支部") |
| | | @PostMapping("updatepartyorganization") |
| | | public R updatePartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | |
| | | return partyBuildingWestService.updatePartyOrganization(partyOrganizationVO); |
| | | } |
| | | |
| | | @OperLog(operModul = "党支部管理", operType = 3) |
| | | @OperLog(operModul = "党支部管理", operType = 3,businessType = "启用、禁用党支部") |
| | | @ApiOperation(value = "启用、禁用党支部") |
| | | @PutMapping("resetpartyorganization") |
| | | public R resetPartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | |
| | | return partyBuildingWestService.resetPartyOrganization(partyOrganizationVO); |
| | | } |
| | | |
| | | @OperLog(operModul = "党支部管理", operType = 4) |
| | | @OperLog(operModul = "党支部管理", operType = 3,businessType = "删除党支部") |
| | | @ApiOperation(value = "删除党支部") |
| | | @DeleteMapping("deletepartyorganization") |
| | | public R deletePartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | |
| | | return partyBuildingWestService.deletePartyOrganization(partyOrganizationVO); |
| | | } |
| | | |
| | | @OperLog(operModul = "党员管理", operType = 1) |
| | | @OperLog(operModul = "党员管理", operType = 1,businessType = "新增党员") |
| | | @ApiOperation(value = "新增党员") |
| | | @PostMapping("addpartybuildingmember") |
| | | public R addPartyBuildingMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) { |
| | |
| | | return r; |
| | | } |
| | | |
| | | @OperLog(operModul = "党员管理", operType = 2) |
| | | @OperLog(operModul = "党员管理", operType = 2,businessType = "编辑党员") |
| | | @ApiOperation(value = "编辑党员") |
| | | @PutMapping("updatepartybuildingmember") |
| | | public R updatePartyBuildingMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) { |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.enums.*; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.interfaces.OperLog; |
| | | import com.panzhihua.common.listen.*; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Api(tags = {"社区管理/基础数据库/实有人口"}) |
| | |
| | | |
| | | @ApiOperation(value = "excel导入实有人口") |
| | | @PostMapping(value = "/serve/import", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "实有人口导入") |
| | | public R downloadPopulationTemplate(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入吸毒人员") |
| | | @PostMapping(value = "/serve/importDrug", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "吸毒人员导入") |
| | | public R importDrug(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入社区矫正人员") |
| | | @PostMapping(value = "/serve/importCorrect", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "社区矫正人员导入") |
| | | public R importCorrect(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入重精人员") |
| | | @PostMapping(value = "/serve/importMajor", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "重精人员导入") |
| | | public R importMajor(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入邪教人员") |
| | | @PostMapping(value = "/serve/importCult", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "邪教人员导入") |
| | | public R importCult(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | @ApiOperation(value = "excel导入刑释人员") |
| | | @PostMapping(value = "/serve/importRehabilitation", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "刑释人员导入") |
| | | public R importRehabilitation(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入重点上访人员") |
| | | @PostMapping(value = "/serve/importKey", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "重点上访人员导入") |
| | | public R importKey(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | @ApiOperation(value = "excel导入服刑人员") |
| | | @PostMapping(value = "/serve/importSentence", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "服刑人员导入") |
| | | public R importSentence(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | @ApiOperation(value = "excel导入退役军人") |
| | | @PostMapping(value = "/serve/importVeterans", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "退役军人导入") |
| | | public R importVeterans(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | @ApiOperation(value = "excel导入残疾人") |
| | | @PostMapping(value = "/serve/importDisability", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "残疾人导入") |
| | | public R importDisability(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | @ApiOperation(value = "excel导入低保户") |
| | | @PostMapping(value = "/serve/importLowSecurity", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "低保户导入") |
| | | public R importLowSecurity(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | @ApiOperation(value = "excel导入高龄老人") |
| | | @PostMapping(value = "/serve/importElder", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "高龄老人导入") |
| | | public R importElder(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | @ApiOperation(value = "excel导入养老金人员") |
| | | @PostMapping(value = "/serve/importPension", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "养老金人员导入") |
| | | public R importPension(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | */ |
| | | @ApiOperation(value = "excel-确认导入实有人口") |
| | | @PostMapping(value = "/import/confirm", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "实有人口导入") |
| | | public R listSavePopulationConfirm(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | |
| | | @ApiOperation(value = "编辑实有人口") |
| | | @PostMapping(value = "/edit") |
| | | @OperLog(operModul = "居民信息管理", operType = 2, businessType = "编辑") |
| | | public R editPopulationInfo(@RequestBody ComMngPopulationEditDTO populationEditDTO) { |
| | | LoginUserInfoVO loginUserInfo = getLoginUserInfo(); |
| | | return communityService.editPopulation(populationEditDTO, loginUserInfo.getCommunityId()); |
| | |
| | | |
| | | @ApiOperation(value = "批量删除实有人口") |
| | | @PostMapping("/delete") |
| | | @OperLog(operModul = "居民信息管理", operType = 3, businessType = "批量删除实有人口") |
| | | public R deletePopulations(@RequestBody List<Long> ids) { |
| | | return communityService.deletePopulations(ids,this.getCommunityId()); |
| | | } |
| | |
| | | |
| | | @ApiOperation(value = "实有人口-数据导出") |
| | | @PostMapping("/data/export") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "实有人口导出") |
| | | public R dataExportPopulation(@RequestBody List<Long> Ids) { |
| | | // 获取登陆用户 |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | |
| | | /** |
| | | * 查询房屋二级级联菜单 |
| | | * |
| | | * @param cascadeHouseDTO |
| | | * 请求参数 |
| | | * @param cascadeHouseDTO 请求参数 |
| | | * @return 菜单列表 |
| | | */ |
| | | @ApiOperation(value = "房屋级联菜单查询") |
| | |
| | | /** |
| | | * 查询房屋二级级联菜单后台 |
| | | * |
| | | * @param cascadeHouseDTO |
| | | * 请求参数 |
| | | * @param cascadeHouseDTO 请求参数 |
| | | * @return 菜单列表 |
| | | */ |
| | | @ApiOperation(value = "房屋级联菜单查询") |
| | |
| | | * @date 2022-09-07 11:23:52 |
| | | */ |
| | | List<ComEventTransferRecord> listByComEventTransferRecord(@Param("comEventTransferRecord") ComEventTransferRecord comEventTransferRecord); |
| | | |
| | | |
| | | int insertSelective(ComEventTransferRecord comEventTransferRecord); |
| | | } |
| | |
| | | @ApiModelProperty("专家头像") |
| | | @TableField(exist = false) |
| | | private String expertAvatar; |
| | | @ApiModelProperty("社区id") |
| | | @TableField(exist = false) |
| | | private Long communityId; |
| | | } |
| | |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.lang.generator.SnowflakeGenerator; |
| | | import cn.hutool.core.util.NumberUtil; |
| | | import cn.hutool.core.util.RandomUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | public R pageByComEvent(ComEvent comEvent, Page pagination,LoginUserInfoVO loginUserInfoVO) { |
| | | if (nonNull(comEvent.getUserType())){ |
| | | if (comEvent.getUserType().equals(1)){ |
| | | //个人账号权限 |
| | | comEvent.setRequestUserId(loginUserInfoVO.getUserId()); |
| | | }else if (comEvent.getUserType().equals(2)){ |
| | | }else if (comEvent.getUserType().equals(2) || loginUserInfoVO.getType().equals(11)){ |
| | | //专家账号权限 |
| | | ComSanshuoExpert expert = comSanShuoExpertService.getOne(new QueryWrapper<ComSanshuoExpert>().lambda().eq(ComSanshuoExpert::getPhone, loginUserInfoVO.getPhone())); |
| | | if (nonNull(expert)){ |
| | | comEvent.setSpecialistId(expert.getId()); |
| | | } |
| | | }else if (loginUserInfoVO.getType().equals(12)){ |
| | | //行业分中心权限 |
| | | comEvent.setUserType(3); |
| | | //获取行业分中心id |
| | | ComSanshuoIndustryCenter center = comSanShuoIndustryCenterService.getOne(new QueryWrapper<ComSanshuoIndustryCenter>().lambda().eq(ComSanshuoIndustryCenter::getAccount, loginUserInfoVO.getAccount())); |
| | | if (nonNull(center)){ |
| | | comEvent.setCenterId(center.getId().toString()); |
| | | } |
| | | }else if (loginUserInfoVO.getType().equals(3)){ |
| | | //社区后台权限 |
| | | comEvent.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | } |
| | | } |
| | | IPage<ComEvent> list = baseMapper.pageByComEvent(comEvent, pagination); |
| | |
| | | // } |
| | | ComMediateType category = commediateTypeService.getById(comEvent1.getEventCategory()); |
| | | comEvent1.setEventCategoryName(category.getName()); |
| | | comEvent1.setExpertAvatar(comSanShuoExpertService.getById(comEvent1.getSpecialistId()).getAvatar()); |
| | | ComSanshuoExpert byId = comSanShuoExpertService.getById(comEvent1.getSpecialistId()); |
| | | if (nonNull(byId)){ |
| | | comEvent1.setExpertAvatar(byId.getAvatar()); |
| | | } |
| | | }); |
| | | return R.ok(list); |
| | | } |
| | |
| | | comEventTransferRecord.setEventResult(comEvent.getEventSucceed()); |
| | | comEventTransferRecord.setEventStatus(comEvent.getEventProcessStatus()); |
| | | //雪花id失效,使用eventId随机生成 |
| | | comEventTransferRecord.setId((NumberUtil.min(comEvent.getId(), RandomUtil.randomInt(0,9999 )))); |
| | | comEventTransferRecord.setId(Snowflake.getId()); |
| | | //saveEventImageList(comEvent.getImages(),comEvent.getId(),comEventTransferRecord.getId(),4); |
| | | saveEventImageList(comEventConciliationVO.getImages(), comEventConciliationVO.getId(),comEventTransferRecord.getId(),4); |
| | | comEventTransferRecordService.insertComEventTransferRecord(comEventTransferRecord); |
| | |
| | | comEventDetailVO.setImages(comEventRequestImageVO); |
| | | map.put("specter", specter); |
| | | map.put("eventDetail", comEventDetailVO); |
| | | List<ComEventTransferRecord> transferRecord = comEventTransferRecordService.list(new QueryWrapper<ComEventTransferRecord>().lambda().eq(ComEventTransferRecord::getEventId, id)); |
| | | List<ComEventTransferRecord> transferRecord = comEventTransferRecordService.list(new QueryWrapper<ComEventTransferRecord>().lambda().eq(ComEventTransferRecord::getEventId, id).orderByAsc(ComEventTransferRecord::getCreateAt)); |
| | | transferRecord.forEach(comEventTransferRecord -> { |
| | | List<ComEventResource> list = comEventResourceService.list(new QueryWrapper<ComEventResource>().lambda().eq(ComEventResource::getRefId, comEvent.getId()).notIn(ComEventResource::getStatus,(1)).eq(ComEventResource::getTransferId, comEventTransferRecord.getId())); |
| | | List<ComEventRequestImageVO> ImageVO = CopyUtil.deepCopyListObject(list, ComEventRequestImageVO.class); |
| | | comEventTransferRecord.setImages(ImageVO); |
| | | if (comEventTransferRecord.getEventStatus().equals(7)){ |
| | | map.put("archiveLog", comEventTransferRecord); |
| | | } |
| | | }); |
| | | //迭代器迭代删除归档记录 |
| | | Iterator<ComEventTransferRecord> iterator = transferRecord.iterator(); |
| | | while (iterator.hasNext()){ |
| | | ComEventTransferRecord comEventTransferRecord = iterator.next(); |
| | | if (comEventTransferRecord.getEventStatus().equals(7)){ |
| | | iterator.remove(); |
| | | } |
| | | } |
| | | map.put("transferLog", transferRecord); |
| | | List<ComEventResource> resource = comEventResourceService.list(new QueryWrapper<ComEventResource>().lambda().eq(ComEventResource::getRefId, id) |
| | | .eq(ComEventResource::getStatus, 5)); |
| | |
| | | comEventTransferRecord.setSpecialistName(comEvent.getSpecialistName()); |
| | | comEventTransferRecord.setEventResult(comEvent.getEventSucceed()); |
| | | comEventTransferRecord.setEventStatus(comEvent.getEventProcessStatus()); |
| | | comEventTransferRecord.setId((NumberUtil.min(comEvent.getId(), RandomUtil.randomInt(0,9999 )))); |
| | | saveEventImageList(comEventTransferRecord.getImages(), comEvent.getId(), comEventTransferRecord.getId(), 5); |
| | | comEventTransferRecord.setId(Snowflake.getId()); |
| | | saveEventImageList(comEventArchiveVO.getImages(), comEvent.getId(), comEventTransferRecord.getId(), 5); |
| | | return comEventTransferRecordService.insertComEventTransferRecord(comEventTransferRecord); |
| | | } |
| | | |
| | |
| | | import com.panzhihua.common.constants.ReturnMsgConstants; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.service_community.dao.ComEventMapper; |
| | | import com.panzhihua.service_community.dao.ComEventTransferRecordMapper; |
| | | import com.panzhihua.service_community.entity.ComEventTransferRecord; |
| | | import com.panzhihua.service_community.service.IComEventTransferRecordService; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Collections; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | @Service("comEventTransferRecordService") |
| | | public class ComEventTransferRecordServiceImpl extends ServiceImpl<ComEventTransferRecordMapper, ComEventTransferRecord> implements IComEventTransferRecordService { |
| | | |
| | | @Resource |
| | | private ComEventTransferRecordMapper comEventTransferRecordMapper; |
| | | @Override |
| | | public R pageByComEventTransferRecord(ComEventTransferRecord comEventTransferRecord, Page pagination) { |
| | | IPage<ComEventTransferRecord> list = baseMapper.pageByComEventTransferRecord(comEventTransferRecord, pagination); |
| | |
| | | comEventTransferRecord.setId(Snowflake.getId()); |
| | | } |
| | | comEventTransferRecord.setCreateAt(new Date()); |
| | | boolean flag = save(comEventTransferRecord); |
| | | if (!flag) { |
| | | int i = comEventTransferRecordMapper.insertSelective(comEventTransferRecord); |
| | | if (!(i>0)) { |
| | | return R.fail(ReturnMsgConstants.DATA_EXIST); |
| | | } |
| | | return R.ok(ReturnMsgConstants.SAVE_SUCCESS); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R updateComEventTransferRecord(ComEventTransferRecord comEventTransferRecord) { |
| | |
| | | <if test="comEvent.userType == 2"> |
| | | AND specialist_id=#{comEvent.specialistId} |
| | | </if> |
| | | <if test="comEvent.userType == 3"> |
| | | AND center_id=#{comEvent.centerId} |
| | | </if> |
| | | <if test="comEvent.userType == 4"> |
| | | AND request_user_community=#{comEvent.communityId} |
| | | </if> |
| | | </where> |
| | | order by create_at desc |
| | | </select> |
| | | |
| | | <select id="listByComEvent" resultType="com.panzhihua.service_community.entity.ComEvent"> |
| | | SELECT <include refid="columns" /> |
| | | FROM com_sanshuo_event_info |
| | |
| | | FROM com_sanshuo_event_transfer_record |
| | | </select> |
| | | |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.panzhihua.service_community.entity.ComEventTransferRecord"> |
| | | insert into com_sanshuo_event_transfer_record |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="eventId != null"> |
| | | event_id, |
| | | </if> |
| | | <if test="parentsTransferEventId != null"> |
| | | parents_transfer_event_id, |
| | | </if> |
| | | <if test="fromType != null"> |
| | | from_type, |
| | | </if> |
| | | <if test="fromId != null"> |
| | | from_id, |
| | | </if> |
| | | <if test="fromName != null"> |
| | | from_name, |
| | | </if> |
| | | <if test="fromUserId != null"> |
| | | from_user_id, |
| | | </if> |
| | | <if test="toType != null"> |
| | | to_type, |
| | | </if> |
| | | <if test="toId != null"> |
| | | to_id, |
| | | </if> |
| | | <if test="toName != null"> |
| | | to_name, |
| | | </if> |
| | | <if test="toUserId != null"> |
| | | to_user_id, |
| | | </if> |
| | | <if test="save != null"> |
| | | `save`, |
| | | </if> |
| | | <if test="processResult != null"> |
| | | process_result, |
| | | </if> |
| | | <if test="processResultData != null"> |
| | | process_result_data, |
| | | </if> |
| | | <if test="processDate != null"> |
| | | process_date, |
| | | </if> |
| | | <if test="processBy != null"> |
| | | process_by, |
| | | </if> |
| | | <if test="processByName != null"> |
| | | process_by_name, |
| | | </if> |
| | | <if test="processType != null"> |
| | | process_type, |
| | | </if> |
| | | <if test="createAt != null"> |
| | | create_at, |
| | | </if> |
| | | <if test="specialistId != null"> |
| | | specialist_id, |
| | | </if> |
| | | <if test="specialistOrg != null"> |
| | | specialist_org, |
| | | </if> |
| | | <if test="specialistLevel != null"> |
| | | specialist_level, |
| | | </if> |
| | | <if test="specialistName != null"> |
| | | specialist_name, |
| | | </if> |
| | | <if test="eventResult != null"> |
| | | event_result, |
| | | </if> |
| | | <if test="eventStatus != null"> |
| | | event_status, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="eventId != null"> |
| | | #{eventId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="parentsTransferEventId != null"> |
| | | #{parentsTransferEventId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="fromType != null"> |
| | | #{fromType,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="fromId != null"> |
| | | #{fromId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="fromName != null"> |
| | | #{fromName,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="fromUserId != null"> |
| | | #{fromUserId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="toType != null"> |
| | | #{toType,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="toId != null"> |
| | | #{toId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="toName != null"> |
| | | #{toName,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="toUserId != null"> |
| | | #{toUserId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="save != null"> |
| | | #{save,jdbcType=BIT}, |
| | | </if> |
| | | <if test="processResult != null"> |
| | | #{processResult,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="processResultData != null"> |
| | | #{processResultData,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="processDate != null"> |
| | | #{processDate,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="processBy != null"> |
| | | #{processBy,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="processByName != null"> |
| | | #{processByName,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="processType != null"> |
| | | #{processType,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="createAt != null"> |
| | | #{createAt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="specialistId != null"> |
| | | #{specialistId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="specialistOrg != null"> |
| | | #{specialistOrg,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="specialistLevel != null"> |
| | | #{specialistLevel,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="specialistName != null"> |
| | | #{specialistName,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="eventResult != null"> |
| | | #{eventResult,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="eventStatus != null"> |
| | | #{eventStatus,jdbcType=TINYINT}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.panzhihua.service_community.entity.ComEventTransferRecord" useGeneratedKeys="true"> |
| | | insert into com_sanshuo_event_transfer_record (id,event_id, parents_transfer_event_id, from_type, |
| | | from_id, from_name, from_user_id, |
| | | to_type, to_id, to_name, |
| | | to_user_id, `save`, process_result, |
| | | process_result_data, process_date, process_by, |
| | | process_by_name, process_type, create_at, |
| | | specialist_id, specialist_org, specialist_level, |
| | | specialist_name, event_result, event_status |
| | | ) |
| | | values (#{id},#{eventId,jdbcType=BIGINT}, #{parentsTransferEventId,jdbcType=BIGINT}, #{fromType,jdbcType=TINYINT}, |
| | | #{fromId,jdbcType=BIGINT}, #{fromName,jdbcType=VARCHAR}, #{fromUserId,jdbcType=BIGINT}, |
| | | #{toType,jdbcType=TINYINT}, #{toId,jdbcType=BIGINT}, #{toName,jdbcType=VARCHAR}, |
| | | #{toUserId,jdbcType=BIGINT}, #{save,jdbcType=BIT}, #{processResult,jdbcType=VARCHAR}, |
| | | #{processResultData,jdbcType=VARCHAR}, #{processDate,jdbcType=TIMESTAMP}, #{processBy,jdbcType=BIGINT}, |
| | | #{processByName,jdbcType=VARCHAR}, #{processType,jdbcType=INTEGER}, #{createAt,jdbcType=TIMESTAMP}, |
| | | #{specialistId,jdbcType=BIGINT}, #{specialistOrg,jdbcType=VARCHAR}, #{specialistLevel,jdbcType=VARCHAR}, |
| | | #{specialistName,jdbcType=VARCHAR}, #{eventResult,jdbcType=TINYINT}, #{eventStatus,jdbcType=TINYINT} |
| | | ) |
| | | </insert> |
| | | </mapper> |
| | |
| | | * 是否为专家 |
| | | * */ |
| | | ComSanshuoExpertVO isExpert(String phone); |
| | | |
| | | /** |
| | | * 当前账号是否为专家后台账号 |
| | | * */ |
| | | int isIndustryCenterAccount(String account); |
| | | |
| | | /** |
| | | * 当前账号是否为专家后台账号 |
| | | * */ |
| | | int isExpertAccount(String account); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public R<LoginUserInfoVO> getUserInfo(String name, int type,String appId) { |
| | | //是否为三说会堂行业分中心或专家后台账号 |
| | | SysUserDO sysUserDO = null; |
| | | Boolean isIndustryOrExpertAccount=(userDao.isIndustryCenterAccount(name)>0 || userDao.isExpertAccount(name)>0); |
| | | if (1 == type) { |
| | | sysUserDO = userDao.selectOne( |
| | | new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getType, type).eq(SysUserDO::getOpenid, name)); |
| | | }else if(isIndustryOrExpertAccount){ |
| | | //三说会堂行业分中心或专家后台账号登陆 |
| | | sysUserDO=userDao.selectOne( |
| | | new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getAccount, name).eq(SysUserDO::getAppId,appId )); |
| | | } else { |
| | | LambdaQueryWrapper<SysUserDO> wrapper = new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getType, type); |
| | | if (type == 11) { |
| | |
| | | } |
| | | switch (orderStatus){ |
| | | case 3 : status="已分配车美"; |
| | | WxUtil.sendUuWash3(sysUserDO.getOpenid(),accessToken,status,washName,washPhone,phone,"sU18zbyzxFldHAdOREaQCR5uq_uMvCKTmGtklO1xw-w"); |
| | | WxUtil.sendUuWash3(sysUserDO.getOpenid(),accessToken,status,washName,washPhone,phone,"sNj6m-JBvW6rOokKGDX9X3-XH1AD0GY5_X0jA9JSLwc"); |
| | | break; |
| | | case 4 : status="车美已开始服务"; |
| | | WxUtil.sendUuWash4(sysUserDO.getOpenid(),accessToken,status,washName,washPhone,phone,"Eft5ksvsnOQANy2uNOGY43CC3pb33eDGA_lgCEoxuiw"); |
| | | break; |
| | | case 6 : status="订单确认完成"; |
| | | WxUtil.sendUuWash6(sysUserDO.getOpenid(),accessToken,status,washName,washPhone,phone,"k1aV97H3pDNNcNcDTeZBD9jQemNDADnRE801HhTXweI"); |
| | | WxUtil.sendUuWash6(sysUserDO.getOpenid(),accessToken,status,washName,washPhone,phone,"iPS8yrsGDqy76hiP8bIbxkosveoX1xTFhdusSiGp-XM"); |
| | | break; |
| | | case 9 : status="订单已取消"; |
| | | WxUtil.sendUuWash(sysUserDO.getOpenid(),accessToken,status,washName,washPhone,phone,"9_2FhQPDxZoUqmAuIZ1L1zjjYXokdNvu7A0gzKfvruI"); |
| | | WxUtil.sendUuWash(sysUserDO.getOpenid(),accessToken,status,washName,washPhone,phone,"z_ysGXz9JWBc2rXuYZzVCXKJTyLf0w0WerrohuNoEng"); |
| | | break; |
| | | } |
| | | } |
| | |
| | | <select id="isExpert" resultType="com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO"> |
| | | select * from com_sanshuo_expert where phone=#{phone} |
| | | </select> |
| | | |
| | | <select id="isIndustryCenterAccount" resultType="Integer"> |
| | | select count(id) from com_sanshuo_industry_center where account=#{account} |
| | | </select> |
| | | |
| | | <select id="isExpertAccount" resultType="Integer"> |
| | | select count(id) from com_sanshuo_expert where account=#{account} |
| | | </select> |
| | | </mapper> |