bug修复
This commit is contained in:
parent
bb936b7541
commit
0a4d175176
@ -1,6 +1,7 @@
|
|||||||
package com.zhgd.xmgl.modules.bimface.client;
|
package com.zhgd.xmgl.modules.bimface.client;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.gexin.fastjson.JSON;
|
||||||
import com.zhgd.xmgl.modules.bigdevice.exceptions.NotAuthException;
|
import com.zhgd.xmgl.modules.bigdevice.exceptions.NotAuthException;
|
||||||
import com.zhgd.xmgl.modules.bimface.entity.BimfaceConfig;
|
import com.zhgd.xmgl.modules.bimface.entity.BimfaceConfig;
|
||||||
import com.zhgd.xmgl.modules.bimface.service.IBimfaceConfigService;
|
import com.zhgd.xmgl.modules.bimface.service.IBimfaceConfigService;
|
||||||
@ -73,11 +74,12 @@ public class BimClient {
|
|||||||
HttpHeaders requestHeaders = new HttpHeaders();
|
HttpHeaders requestHeaders = new HttpHeaders();
|
||||||
requestHeaders.setBearerAuth(getAccessTokenByProjectSn(projectSn));
|
requestHeaders.setBearerAuth(getAccessTokenByProjectSn(projectSn));
|
||||||
HttpEntity requestEntity = new HttpEntity<>(requestHeaders);
|
HttpEntity requestEntity = new HttpEntity<>(requestHeaders);
|
||||||
ResponseEntity<JSONObject> responseEntity = restTemplate.exchange(String.format(uploadURL, name, url), HttpMethod.PUT, requestEntity, JSONObject.class);
|
String u = String.format(uploadURL, name, url);
|
||||||
|
ResponseEntity<JSONObject> responseEntity = restTemplate.exchange(u, HttpMethod.PUT, requestEntity, JSONObject.class);
|
||||||
JSONObject body = responseEntity.getBody();
|
JSONObject body = responseEntity.getBody();
|
||||||
log.info("" + body);
|
log.error("上传文件失败:uploadFile err:{}", JSON.toJSONString(body));
|
||||||
if (responseEntity.getStatusCodeValue() != 200 || body == null || !"success".equals(body.getString("code"))) {
|
if (responseEntity.getStatusCodeValue() != 200 || body == null || !"success".equals(body.getString("code"))) {
|
||||||
log.error("上传文件失败!项目sn为:{},名称为:{},url为:{}", projectSn, name, url);
|
log.error("上传文件失败!项目sn为:{},名称为:{},url为:{}", projectSn, name, u);
|
||||||
throw new RuntimeException("上传文件失败!名称可能重复或其他原因!");
|
throw new RuntimeException("上传文件失败!名称可能重复或其他原因!");
|
||||||
}
|
}
|
||||||
return body.getJSONObject("data").getLong("fileId");
|
return body.getJSONObject("data").getLong("fileId");
|
||||||
|
|||||||
@ -35,7 +35,7 @@ public class LedBigScreenRegion implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@Excel(name = "led大屏id", width = 15)
|
@Excel(name = "led大屏id", width = 15)
|
||||||
@ApiModelProperty(value = "led大屏id")
|
@ApiModelProperty(value = "led大屏id")
|
||||||
private java.lang.Integer ledBigScreenId;
|
private java.lang.Long ledBigScreenId;
|
||||||
/**
|
/**
|
||||||
* 区域内容
|
* 区域内容
|
||||||
*/
|
*/
|
||||||
@ -106,4 +106,7 @@ public class LedBigScreenRegion implements Serializable {
|
|||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "更新时间")
|
@ApiModelProperty(value = "更新时间")
|
||||||
private java.util.Date updateTime;
|
private java.util.Date updateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "数据模块类型")
|
||||||
|
private Integer type;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,6 +26,8 @@ import java.util.List;
|
|||||||
public class LedBigScreenServiceImpl extends ServiceImpl<LedBigScreenMapper, LedBigScreen> implements ILedBigScreenService {
|
public class LedBigScreenServiceImpl extends ServiceImpl<LedBigScreenMapper, LedBigScreen> implements ILedBigScreenService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private LedBigScreenRegionMapper ledBigScreenRegionMapper;
|
private LedBigScreenRegionMapper ledBigScreenRegionMapper;
|
||||||
|
@Autowired
|
||||||
|
private LedBigScreenMapper ledBigScreenMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LedBigScreen queryDetail(HashMap<String, Object> map) {
|
public LedBigScreen queryDetail(HashMap<String, Object> map) {
|
||||||
@ -34,8 +36,10 @@ public class LedBigScreenServiceImpl extends ServiceImpl<LedBigScreenMapper, Led
|
|||||||
throw new OpenAlertException("projectSn不能为空");
|
throw new OpenAlertException("projectSn不能为空");
|
||||||
}
|
}
|
||||||
LedBigScreen ledBigScreen = getOne(new LambdaQueryWrapper<LedBigScreen>().eq(LedBigScreen::getProjectSn, projectSn));
|
LedBigScreen ledBigScreen = getOne(new LambdaQueryWrapper<LedBigScreen>().eq(LedBigScreen::getProjectSn, projectSn));
|
||||||
|
if (ledBigScreen != null) {
|
||||||
List<LedBigScreenRegion> ledBigScreenRegions = ledBigScreenRegionMapper.selectList(new LambdaQueryWrapper<LedBigScreenRegion>().eq(LedBigScreenRegion::getProjectSn, projectSn));
|
List<LedBigScreenRegion> ledBigScreenRegions = ledBigScreenRegionMapper.selectList(new LambdaQueryWrapper<LedBigScreenRegion>().eq(LedBigScreenRegion::getProjectSn, projectSn));
|
||||||
ledBigScreen.setLedBigScreenRegions(ledBigScreenRegions);
|
ledBigScreen.setLedBigScreenRegions(ledBigScreenRegions);
|
||||||
|
}
|
||||||
return ledBigScreen;
|
return ledBigScreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,13 +48,15 @@ public class LedBigScreenServiceImpl extends ServiceImpl<LedBigScreenMapper, Led
|
|||||||
String projectSn = ledBigScreen.getProjectSn();
|
String projectSn = ledBigScreen.getProjectSn();
|
||||||
LedBigScreen lbs = getOne(new LambdaQueryWrapper<LedBigScreen>().eq(LedBigScreen::getProjectSn, projectSn));
|
LedBigScreen lbs = getOne(new LambdaQueryWrapper<LedBigScreen>().eq(LedBigScreen::getProjectSn, projectSn));
|
||||||
if (lbs == null) {
|
if (lbs == null) {
|
||||||
save(ledBigScreen);
|
ledBigScreenMapper.insert(ledBigScreen);
|
||||||
} else {
|
} else {
|
||||||
updateById(ledBigScreen);
|
ledBigScreen.setId(lbs.getId());
|
||||||
|
ledBigScreenMapper.updateById(ledBigScreen);
|
||||||
}
|
}
|
||||||
ledBigScreenRegionMapper.delete(new LambdaQueryWrapper<LedBigScreenRegion>().eq(LedBigScreenRegion::getProjectSn, projectSn));
|
ledBigScreenRegionMapper.delete(new LambdaQueryWrapper<LedBigScreenRegion>().eq(LedBigScreenRegion::getProjectSn, projectSn));
|
||||||
for (LedBigScreenRegion ledBigScreenRegion : ledBigScreen.getLedBigScreenRegions()) {
|
for (LedBigScreenRegion ledBigScreenRegion : ledBigScreen.getLedBigScreenRegions()) {
|
||||||
ledBigScreenRegion.setProjectSn(projectSn);
|
ledBigScreenRegion.setProjectSn(projectSn);
|
||||||
|
ledBigScreenRegion.setLedBigScreenId(ledBigScreen.getId());
|
||||||
ledBigScreenRegionMapper.insert(ledBigScreenRegion);
|
ledBigScreenRegionMapper.insert(ledBigScreenRegion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,6 +63,10 @@ public class MaterialApproachRecord implements Serializable {
|
|||||||
@Excel(name = "进场量", width = 15)
|
@Excel(name = "进场量", width = 15)
|
||||||
@ApiModelProperty(value = "进场量")
|
@ApiModelProperty(value = "进场量")
|
||||||
private Double approachVolume;
|
private Double approachVolume;
|
||||||
|
@ApiModelProperty(value = "出场量")
|
||||||
|
private Double appearanceVolume;
|
||||||
|
@ApiModelProperty(value = "净重量")
|
||||||
|
private Double netWeightVolume;
|
||||||
|
|
||||||
@ApiModelProperty(value = "projectSn")
|
@ApiModelProperty(value = "projectSn")
|
||||||
private String projectSn;
|
private String projectSn;
|
||||||
|
|||||||
@ -108,9 +108,7 @@ public class ProjectFileController {
|
|||||||
@ApiOperation(value = "文件移动", notes = "可以移动文件或者目录", httpMethod = "POST")
|
@ApiOperation(value = "文件移动", notes = "可以移动文件或者目录", httpMethod = "POST")
|
||||||
@RequestMapping(value = "/batchmovefile", method = RequestMethod.POST)
|
@RequestMapping(value = "/batchmovefile", method = RequestMethod.POST)
|
||||||
public Result<String> batchMoveFile(@RequestBody List<ProjectFile> list) {
|
public Result<String> batchMoveFile(@RequestBody List<ProjectFile> list) {
|
||||||
for (ProjectFile projectFile : list) {
|
projectFileService.batchMoveFile(list);
|
||||||
projectFileService.moveFile(projectFile);
|
|
||||||
}
|
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -26,4 +26,6 @@ public interface IProjectFileService extends IService<ProjectFile> {
|
|||||||
void moveFile(ProjectFile projectFile);
|
void moveFile(ProjectFile projectFile);
|
||||||
|
|
||||||
Result<List<ProjectFile>> getFileList(ProjectFile projectFile, HttpServletRequest request);
|
Result<List<ProjectFile>> getFileList(ProjectFile projectFile, HttpServletRequest request);
|
||||||
|
|
||||||
|
void batchMoveFile(List<ProjectFile> list);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.zhgd.xmgl.modules.project.service.impl;
|
package com.zhgd.xmgl.modules.project.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.zhgd.jeecg.common.api.vo.Result;
|
import com.zhgd.jeecg.common.api.vo.Result;
|
||||||
@ -141,4 +142,29 @@ public class ProjectFileServiceImpl extends ServiceImpl<ProjectFileMapper, Proje
|
|||||||
List<ProjectFile> list = list(queryWrapper);
|
List<ProjectFile> list = list(queryWrapper);
|
||||||
return Result.success(list);
|
return Result.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batchMoveFile(List<ProjectFile> list) {
|
||||||
|
checkParam(list);
|
||||||
|
for (ProjectFile projectFile : list) {
|
||||||
|
moveFile(projectFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkParam(List<ProjectFile> list) {
|
||||||
|
if (CollectionUtil.isEmpty(list)) {
|
||||||
|
throw new OpenAlertException("未选中需要移动的文件");
|
||||||
|
}
|
||||||
|
ProjectFile old = projectFileMapper.selectById(list.get(0).getFileId());
|
||||||
|
if (list.stream().anyMatch(e -> (e.getFilePath() + e.getFileName()).equals(old.getFilePath() + old.getFileName()))) {
|
||||||
|
throw new OpenAlertException("目标文件夹和源文件夹相同");
|
||||||
|
}
|
||||||
|
if (list.stream().anyMatch(e -> {
|
||||||
|
String source = e.getFilePath() + e.getFileName();
|
||||||
|
String target = old.getFilePath() + old.getFileName();
|
||||||
|
return source.equals(target);
|
||||||
|
})) {
|
||||||
|
throw new OpenAlertException("目标文件夹是源文件夹的子文件夹");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -151,6 +151,7 @@
|
|||||||
INNER JOIN project_video_config t2 ON t2.id = t1.video_id
|
INNER JOIN project_video_config t2 ON t2.id = t1.video_id
|
||||||
WHERE t2.is_enable = 1
|
WHERE t2.is_enable = 1
|
||||||
and t2.project_sn = #{projectSn}
|
and t2.project_sn = #{projectSn}
|
||||||
|
order by t1.sort_num
|
||||||
</select>
|
</select>
|
||||||
<select id="selectUserVideoList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
<select id="selectUserVideoList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||||
SELECT t1.*, t2.*, t1.video_name name
|
SELECT t1.*, t2.*, t1.video_name name
|
||||||
|
|||||||
@ -2352,7 +2352,18 @@
|
|||||||
count(wi.id) AS num
|
count(wi.id) AS num
|
||||||
FROM worker_type wt
|
FROM worker_type wt
|
||||||
LEFT JOIN team_info ti ON wt.id = ti.worker_type_id
|
LEFT JOIN team_info ti ON wt.id = ti.worker_type_id
|
||||||
LEFT JOIN worker_info wi ON (ti.id = wi.team_id and wi.inService_type = 1)
|
LEFT JOIN worker_info wi ON (ti.id = wi.team_id and wi.inService_type = 1
|
||||||
|
<if test="projectSn != null and projectSn != ''">
|
||||||
|
and wi.project_sn = #{projectSn}
|
||||||
|
</if>
|
||||||
|
<if test="projectSnList != null and projectSnList != ''">
|
||||||
|
and wi.project_sn in
|
||||||
|
<foreach collection="projectSnList" item="item" index="index"
|
||||||
|
separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
)
|
||||||
where 1=1
|
where 1=1
|
||||||
<if test="projectSn != null and projectSn != ''">
|
<if test="projectSn != null and projectSn != ''">
|
||||||
and wt.project_sn = #{projectSn}
|
and wt.project_sn = #{projectSn}
|
||||||
|
|||||||
@ -142,8 +142,9 @@
|
|||||||
FROM project p
|
FROM project p
|
||||||
LEFT JOIN (SELECT DISTINCT wp.project_sn
|
LEFT JOIN (SELECT DISTINCT wp.project_sn
|
||||||
FROM worker_wages_payment wp
|
FROM worker_wages_payment wp
|
||||||
JOIN project p1
|
JOIN project p1 on wp.project_sn=p1.project_sn
|
||||||
where wp.pay_month = #{param.payMonth}) t ON t.project_sn = p.project_sn
|
where wp.pay_month = #{param.payMonth}) t ON t.project_sn = p.project_sn
|
||||||
|
where 1=1
|
||||||
<if test="projectSnList != null and projectSnList != ''">
|
<if test="projectSnList != null and projectSnList != ''">
|
||||||
and p.project_sn in
|
and p.project_sn in
|
||||||
<foreach collection="projectSnList" item="item" index="index"
|
<foreach collection="projectSnList" item="item" index="index"
|
||||||
@ -167,5 +168,8 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="projectSn != null and projectSn != ''">
|
||||||
|
and a.project_sn = #{projectSn}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -22,7 +22,7 @@ mqtt.producer.defaultTopic=topic1
|
|||||||
mqtt.consumer.clientId=mqttConsumer
|
mqtt.consumer.clientId=mqttConsumer
|
||||||
mqtt.consumer.defaultTopic=topic1
|
mqtt.consumer.defaultTopic=topic1
|
||||||
mqtt-scope=prodTopic
|
mqtt-scope=prodTopic
|
||||||
serverUrl=http://124.71.178.44:8
|
serverUrl=http://192.168.34.221:12350
|
||||||
#\u89C6\u9891\u5206\u6790url
|
#\u89C6\u9891\u5206\u6790url
|
||||||
video-analysis-url=
|
video-analysis-url=
|
||||||
#\u9ED8\u8BA4\u653F\u52A1\u521B\u5EFA\u9879\u76EE\u6240\u5C5E\u4F01\u4E1A
|
#\u9ED8\u8BA4\u653F\u52A1\u521B\u5EFA\u9879\u76EE\u6240\u5C5E\u4F01\u4E1A
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user