bug修改

This commit is contained in:
pengjie 2024-04-26 22:27:27 +08:00
parent 8204095756
commit b250bc5892
9 changed files with 76 additions and 4 deletions

View File

@ -181,14 +181,14 @@ public class AiAnalyseHardWareAlarmRecordServiceImpl extends ServiceImpl<AiAnaly
alarmVideo = alarmVideo.split(":")[2];
alarmVideo = alarmVideo.substring(alarmVideo.indexOf("/"));
FileInfo alarmVideoInfo = fileStorageService.of(UrlUtil.uploadImgUrlToMultipartFile(serverUrl + alarmVideo)).setPath(DateUtil.today()).upload();
aiAnalyseHardWareAlarmRecord.setAlarmVideo(alarmVideoInfo.getUrl());
aiAnalyseHardWareAlarmRecord.setAlarmVideo(DateUtil.today() + "/" + alarmVideoInfo.getUrl());
aiAnalyseHardWareAlarmRecord.setProjectSn(aiAnalyseHardWareRecord.getProjectSn());
aiAnalyseHardWareAlarmRecord.setStatus(1);
String alarmImage = body.getString("alarmImage");
alarmImage = alarmImage.split(":")[2];
alarmImage = alarmImage.substring(alarmImage.indexOf("/"));
FileInfo alarmImageInfo = fileStorageService.of(UrlUtil.uploadImgUrlToMultipartFile(serverUrl + alarmImage)).setPath(DateUtil.today()).upload();
aiAnalyseHardWareAlarmRecord.setImageUrl(alarmImageInfo.getUrl());
aiAnalyseHardWareAlarmRecord.setImageUrl(DateUtil.today() + "/" + alarmImageInfo.getUrl());
aiAnalyseHardWareAlarmRecord.setAlarmDesc(body.getString("alarmDesc"));
aiAnalyseHardWareAlarmRecordMapper.insert(aiAnalyseHardWareAlarmRecord);
//将数据通过MQTT转发到前台

View File

@ -226,4 +226,7 @@ public class WorkerInfoAuditRecord implements Serializable {
@Excel(name = "培训时间", width = 15)
@ApiModelProperty(value="培训时间")
private Date educationTime;
@ApiModelProperty(value="资格证书信息")
private String specialCertificateImage;
}

View File

@ -22,4 +22,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface WorkerInfoAuditRecordMapper extends BaseMapper<WorkerInfoAuditRecord> {
List<EntityMap> selectWorkerInfoAuditList(Page<EntityMap> page, @Param("param")Map<String, Object> map);
EntityMap viewWorkerInfoDetail(Map<String, Object> map);
}

View File

@ -44,4 +44,32 @@
</if>
order by a.id desc
</select>
<select id="viewWorkerInfoDetail" resultType="com.zhgd.jeecg.common.mybatis.EntityMap" parameterType="map">
SELECT a.*,
b.team_name,
c.department_name,
en.enterprise_name,
p.project_name,
(case
when a.birthday != '' then year(from_days(datediff(NOW(), a.birthday)))
else '-'
end
) age,
d.dictionary_name job_type_name,
e.dictionary_name job_name_value,
(case
when (to_days(now()) - to_days(a.enter_date)) > 0 then to_days(now()) - to_days(a.enter_date)
else 0 end) work_day_num,
ru.rule_name
from worker_info_audit_record a
INNER JOIN project p ON a.project_sn = p.project_sn
LEFT JOIN team_info b ON a.team_id = b.id
LEFT JOIN department_info c ON a.department_id = c.id
LEFT JOIN dictionaries_record d ON a.job_type = d.id
LEFT JOIN dictionaries_record e ON a.job_name = e.id
LEFT JOIN enterprise_info en ON a.enterprise_id = en.id
LEFT JOIN worker_attendance_rule ru ON a.rule_id = ru.id
WHERE a.id = #{id}
</select>
</mapper>

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.modules.worker.entity.WorkerInfoAuditRecord;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
@ -27,4 +28,6 @@ public interface IWorkerInfoAuditRecordService extends IService<WorkerInfoAuditR
void adoptWorkerInfo(Map<String, Object> map);
void rejectWorkerInfo(Map<String, Object> map);
Map<String, Object> viewWorkerInfoDetail(Map<String, Object> map);
}

View File

@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -112,4 +113,12 @@ public class WorkerInfoAuditRecordServiceImpl extends ServiceImpl<WorkerInfoAudi
}
workerInfoAuditRecordMapper.deleteById(MapUtils.getString(map,"id"));
}
@Override
public Map<String, Object> viewWorkerInfoDetail(Map<String, Object> map) {
Map<String, Object> data = new HashMap<>();
EntityMap info = workerInfoAuditRecordMapper.viewWorkerInfoDetail(map);
data.put("workerInfo", info);
return data;
}
}

View File

@ -120,7 +120,7 @@ public class XzMaterialController {
public Result<Object> save(@RequestBody String map) {
JSONObject obj = JSONObject.parseObject(map);
XzMaterial xzMaterial = new XzMaterial();
String [] param = {"name", "model", "specifications", "unit", "num", "remark"};
String [] param = {"name", "specifications", "num", "remark", "model", "unit"};
List<XzMaterialDetail> list = new ArrayList<>();
xzMaterial.setName(obj.getString("name"));
xzMaterial.setEntryTime(obj.getDate("entryTime"));
@ -137,6 +137,10 @@ public class XzMaterialController {
list.add(JSONObject.parseObject(JSON.toJSONString(detailObj), XzMaterialDetail.class));
}
xzMaterial.setProjectSn(obj.getString("projectSn"));
List<String> enterpriseIds = (List<String>) obj.get("enterpriseId");
if (enterpriseIds != null && enterpriseIds.size() >0) {
xzMaterial.setEnterpriseId(enterpriseIds.get(0));
}
xzMaterial.setXzMaterialList(list);
xzMaterialService.saveInfo(xzMaterial);
return Result.success("添加成功!");

View File

@ -129,6 +129,19 @@ public class XzWorkerInfoAuditRecordController {
return Result.success(workerSafeEducationWorker);
}
/**
* 编辑
* @param workerInfoAuditRecord
* @return
*/
@OperLog(operModul = "劳务管理",operType = "编辑劳务人员-审核",operDesc = "编辑劳务人员-审核表信息")
@ApiOperation(value = "编辑劳务人员-审核表信息", notes = "编辑劳务人员-审核表信息" , httpMethod="POST")
@PostMapping(value = "/edit")
public Result<WorkerInfoAuditRecord> edit(@RequestBody WorkerInfoAuditRecord workerInfoAuditRecord) {
workerInfoAuditRecordService.editWorkerInfoAuditRecord(workerInfoAuditRecord);
return Result.ok();
}
/**
* 通过id删除
*
@ -222,4 +235,13 @@ public class XzWorkerInfoAuditRecordController {
return Result.ok();
}
@ApiOperation(value = "查询某个人员所有相关数据", notes = "查询某个人员所有相关数据")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "人员ID", paramType = "body", required = true, dataType = "String"),
})
@PostMapping("/viewWorkerInfoDetail")
public Result<Map<String, Object>> viewWorkerInfoDetail(@RequestBody Map<String, Object> map) {
return Result.success(workerInfoAuditRecordService.viewWorkerInfoDetail(map));
}
}

View File

@ -369,9 +369,10 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/xmgl/xzWorkerInfoAuditRecord/adoptWorkerInfo").permitAll()
.antMatchers("/xmgl/xzWorkerInfoAuditRecord/queryByCard").permitAll()
.antMatchers("/xmgl/xzWorkerInfoAuditRecord/submit").permitAll()
.antMatchers("/xz/xzMaterial/save").permitAll()
.antMatchers("/xmgl/xzMaterial/save").permitAll()
.antMatchers("/xmgl/dangerousEngineeringRecord/save").permitAll()
.antMatchers("/xmgl/carInfo/save").permitAll()
.antMatchers("/xmgl/xzElectrical/**").permitAll()
.antMatchers(HttpMethod.OPTIONS, "/**").anonymous()
.anyRequest().authenticated() // 剩下所有的验证都需要验证.
.and()