flower_city/src/main/java/com/dg/core/api/GuideRepairOrderAppletsController.java
@@ -27,6 +27,7 @@ import javax.annotation.Resource; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; @@ -328,14 +329,15 @@ { List<String> ids=null; String userId=null; if(StringUtils.equals("1",sysUser.getIsDivisionHead())) if( StringUtils.equals("2",sysUser.getRoleIds())) { userId=null; ids= PermissionUtil.getPermission(sysUser,iOrganizationChartService); userId=sysUser.getUserId()+""; ids=new ArrayList<>(); ids.add(sysUser.getDepartmentId()); } else { userId=sysUser.getUserId()+""; ids=PermissionUtil.getPermission(sysUser,iOrganizationChartService); } List<GuideRepairOrder> list = iGuideRepairOrderService.selectConfigList(null,ids,status,userId,null,null,null); int num=iGuideRepairOrderService.countConfigList(null,ids,status,userId); flower_city/src/main/java/com/dg/core/controller/CommonController.java
@@ -24,10 +24,7 @@ import javax.annotation.Resource; import java.io.InputStream; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.UUID; import java.util.*; import static com.dg.core.file.FileTypeUploadUtils.assertAllowed; @@ -41,7 +38,6 @@ @Autowired private CorsConfig corsConfig; // FTP 登录用户名 @@ -72,8 +68,7 @@ */ @ApiOperation("文件上传接口(通用)") @PostMapping("/uploads") public ResultData uploadFiles(List<MultipartFile> files) throws Exception { public ResultData uploadFiles(List<MultipartFile> files) throws Exception { List<String> urls = new ArrayList<String>(); List<String> fileNames = new ArrayList<String>(); List<String> originalFilenames = new ArrayList<String>(); @@ -105,14 +100,12 @@ } /** * 通用上传请求(单个) */ @ApiOperation("文件上传接口(通用)") @PostMapping("/upload") public ResultData uploadFile(MultipartFile file) throws Exception { public ResultData uploadFile(MultipartFile file) throws Exception { List<String> urls = new ArrayList<String>(); List<String> fileNames = new ArrayList<String>(); List<String> originalFilenames = new ArrayList<String>(); @@ -146,8 +139,7 @@ */ @ApiOperation("判断当前时间是否是工作日,格式为“20221016”,不传默认为今天") @GetMapping("/isWeekday") public ResultData isWeekday(@RequestParam(value = "dateTime",required = false) String dateTime) { public ResultData isWeekday(@RequestParam(value = "dateTime", required = false) String dateTime) { if (dateTime==null){ Date date = new Date(); SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMdd"); @@ -160,4 +152,21 @@ } /** * 获取天气默认为攀枝花 */ @ApiOperation("获取天气默认为攀枝花") @GetMapping("/getWeather") public ResultData getWeather(@RequestParam(value = "code", required = false) String code) { TestDate td = new TestDate(); Map weather; if (code == null) { weather = td.getWeather("510400"); } else { weather = td.getWeather(code); } return ResultData.success(weather); } } flower_city/src/main/java/com/dg/core/controller/RoleManagementController.java
@@ -42,7 +42,6 @@ { return getDataTable("分页不能为空"); } if(pageSize==null) { return getDataTable("分页条数不能为空"); flower_city/src/main/java/com/dg/core/util/TestDate.java
@@ -87,6 +87,31 @@ } /** * 获取节假日不含周末 * * @return */ public Map getWeather(String code) { String url = "https://restapi.amap.com/v3/weather/weatherInfo?key=9e0d819935da8a01de0e476ba8a9019e&city="+code; OkHttpClient client = new OkHttpClient(); Response response; //解密数据 String rsa = null; Request request = new Request.Builder() .url(url) .get() .addHeader("Content-Type", "application/x-www-form-urlencoded") .build(); try { response = client.newCall(request).execute(); rsa = response.body().string(); } catch (IOException e) { e.printStackTrace(); } return JSONObject.parseObject(rsa, Map.class); } /** * 获取周末 月从0开始 * * @param year flower_city/src/main/resources/mapper/TransactionEventMapper.xml
@@ -377,7 +377,7 @@ <include refid="selectTransactionEventEntityVo"/> <where> <if test="associateNames != null and associateNames != ''"> AND (associate_names like concat('%', #{associateNames}, '%') or #{associateNames} like concat('%', associate_names, '%')) AND (associate_names like concat('%', #{associateNames}, '%') ) </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} ))