修改工单bug

This commit is contained in:
guoshengxiong 2025-09-29 17:23:31 +08:00
parent e0eac7bfd2
commit 5441abe588
6 changed files with 24 additions and 9 deletions

View File

@ -1,8 +1,8 @@
package com.zhgd.xmgl.modules.basicdata.controller;
import cn.hutool.captcha.CaptchaUtil;
import cn.hutool.captcha.LineCaptcha;
import cn.hutool.captcha.generator.RandomGenerator;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -112,7 +112,9 @@ public class LoginController {
@GetMapping("/login/captcha")
public void getCaptcha(HttpServletResponse response) throws IOException {
String captchaId = UUID.randomUUID().toString();
LineCaptcha captcha = CaptchaUtil.createLineCaptcha(100, 40, 4, 50);
// 自定义配置创建纯数字验证码
LineCaptcha captcha = new LineCaptcha(100, 40, 4, 50);
captcha.setGenerator(new RandomGenerator("0123456789", 4)); // 只使用数字
redisRepository.setExpire("CAPTCHA:" + captchaId, captcha.getCode(), 300);
response.setHeader("captcha-id", captchaId);
response.setHeader("access-control-expose-headers", "captcha-id");

View File

@ -49,14 +49,14 @@ public class WorkTicketOrderAppController {
@ApiImplicitParam(name = "devSn", value = "设备编号", paramType = "query", required = true, dataType = "Integer"),
})
@PostMapping(value = "/loginByPoliceCameraSn")
public Result loginByPoliceCameraSn(@RequestBody @Validate Map<String, Object> param) {
public Result<PoliceCameraItem> loginByPoliceCameraSn(@RequestBody @Validate Map<String, Object> param) {
String devSn = MapUtils.getString(param, "devSn");
int count = (int) policeCameraItemService.count(new LambdaQueryWrapper<PoliceCameraItem>()
PoliceCameraItem item = policeCameraItemService.getOne(new LambdaQueryWrapper<PoliceCameraItem>()
.eq(PoliceCameraItem::getDevSn, devSn));
if (count == 0) {
if (item == null) {
throw new OpenAlertException("IMEI编号不存在");
}
return Result.ok();
return Result.success(item);
}
}

View File

@ -2,10 +2,18 @@ package com.zhgd.xmgl.modules.policecamera.entity.vo;
import com.zhgd.xmgl.modules.policecamera.entity.WorkTicketOrder;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value="WorkTicketOrderVo实体类",description="WorkTicketOrderVo实体类")
public class WorkTicketOrderVo extends WorkTicketOrder {
/**
* 设备名称
*/
@ApiModelProperty(value = "设备名称")
private String devName;
/**施工场站名称s多个,分割)*/
@ApiModelProperty(value="施工场站名称s多个,分割)")
private java.lang.String constructionAreaNames ;
}

View File

@ -4,7 +4,11 @@
<select id="queryList" resultType="com.zhgd.xmgl.modules.policecamera.entity.vo.WorkTicketOrderVo">
select * from (
select t.*
,pci.dev_name
,group_concat(distinct qr.region_name) constructionAreaNames
from work_ticket_order t
left join police_camera_item pci on pci.dev_sn=t.dev_sn
left join quality_region qr on find_in_set(qr.id,t.construction_areas)
where 1=1
<if test="param.devSn != null and param.devSn != ''">
and t.dev_sn = #{param.devSn}

View File

@ -93,6 +93,7 @@ public class WebSecurityConfig {
}
authorizeRequests
.requestMatchers(
"/xmgl/policeCameraItemFile/*",
"/xmgl/workTicketOrderApp/*",
"/xmgl/policeCameraItem/*",
"/xmgl/workTicketOrder/*",

View File

@ -220,8 +220,8 @@ sada.host=http://api.e.v1.i-sada.net
rengzhicekong.hj212.port=24041
spring.main.allow-circular-references=true
#上传文件限制
file.upload.allowed-extensions=jpg,jpeg,png,gif,bmp,webp,svg,tiff,ico,pdf,doc,docx,xls,xlsx,ppt,pptx,txt,rtf,csv,mp4,avi,mov,wmv,flv,mkv,webm,m4v,3gp,mp3,wav,ogg,flac,aac,wma,m4a,zip,rar,7z,tar,gz
file.upload.allowed-mime-types=image/jpeg,image/png,image/gif,image/bmp,image/webp,image/svg+xml,image/tiff,image/x-icon,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,text/plain,application/rtf,text/csv,video/mp4,video/x-msvideo,video/quicktime,video/x-ms-wmv,video/x-flv,video/x-matroska,video/webm,video/3gpp,audio/mpeg,audio/wav,audio/ogg,audio/flac,audio/aac,audio/x-ms-wma,audio/mp4,application/zip,application/x-rar-compressed,application/x-7z-compressed,application/x-tar,application/gzip
file.upload.allowed-extensions=jpg,jpeg,png,gif,bmp,webp,svg,tiff,ico,pdf,doc,docx,xls,xlsx,ppt,pptx,txt,rtf,csv,mp4,avi,mov,wmv,flv,mkv,webm,m4v,3gp,mp3,wav,ogg,flac,aac,wma,m4a,zip,rar,7z,tar,gz,apk
file.upload.allowed-mime-types=image/jpeg,image/png,image/gif,image/bmp,image/webp,image/svg+xml,image/tiff,image/x-icon,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,text/plain,application/rtf,text/csv,video/mp4,video/x-msvideo,video/quicktime,video/x-ms-wmv,video/x-flv,video/x-matroska,video/webm,video/3gpp,audio/mpeg,audio/wav,audio/ogg,audio/flac,audio/aac,audio/x-ms-wma,audio/mp4,application/zip,application/x-rar-compressed,application/x-7z-compressed,application/x-tar,application/gzip,application/vnd.android.package-archive
#mcs8下载选择的是http内网、外网
mcs8.download.http.type=httpPrivateUrl
publicServerUrl=http://gszhdz.crpower.com.cn