This commit is contained in:
mashuai 2025-06-18 16:14:07 +08:00
parent c6f87393a5
commit 49aca3a2bb
35 changed files with 180 additions and 183 deletions

View File

@ -131,7 +131,7 @@ public class AppOcrServiceImpl implements AppOcrService {
o.setModel("出库"); o.setModel("出库");
o.setCode(bean.getMaCode()); o.setCode(bean.getMaCode());
o.setResult("1"); o.setResult("1");
o.setCreateBy(SecurityUtils.getUsername()); o.setCreateBy(SecurityUtils.getLoginUser().getUsername());
appOcrMapper.addOcrRecord(o); appOcrMapper.addOcrRecord(o);
return codeList; return codeList;
} else { } else {
@ -139,7 +139,7 @@ public class AppOcrServiceImpl implements AppOcrService {
o.setModel("出库"); o.setModel("出库");
o.setCode(bean.getMaCode()); o.setCode(bean.getMaCode());
o.setResult("0"); o.setResult("0");
o.setCreateBy(SecurityUtils.getUsername()); o.setCreateBy(SecurityUtils.getLoginUser().getUsername());
appOcrMapper.addOcrRecord(o); appOcrMapper.addOcrRecord(o);
List<MachineVo> rsList = new ArrayList<>(); List<MachineVo> rsList = new ArrayList<>();
String ocrCode = o.getMaCode(); String ocrCode = o.getMaCode();
@ -171,7 +171,7 @@ public class AppOcrServiceImpl implements AppOcrService {
o.setModel("退料"); o.setModel("退料");
o.setCode(bean.getMaCode()); o.setCode(bean.getMaCode());
o.setResult("1"); o.setResult("1");
o.setCreateBy(SecurityUtils.getUsername()); o.setCreateBy(SecurityUtils.getLoginUser().getUsername());
appOcrMapper.addOcrRecord(o); appOcrMapper.addOcrRecord(o);
return codeList; return codeList;
} else { } else {
@ -179,7 +179,7 @@ public class AppOcrServiceImpl implements AppOcrService {
o.setModel("退料"); o.setModel("退料");
o.setCode(bean.getMaCode()); o.setCode(bean.getMaCode());
o.setResult("0"); o.setResult("0");
o.setCreateBy(SecurityUtils.getUsername()); o.setCreateBy(SecurityUtils.getLoginUser().getUsername());
appOcrMapper.addOcrRecord(o); appOcrMapper.addOcrRecord(o);
List<MachineVo> rsList = new ArrayList<>(); List<MachineVo> rsList = new ArrayList<>();
String ocrCode = o.getMaCode(); String ocrCode = o.getMaCode();

View File

@ -88,7 +88,7 @@ public class ArchivesServiceImpl implements ArchivesService {
archivesDetails.setDocUrl(filePath.contains("http") ? filePath : "https://xiyunwangcn.oss-cn-hangzhou.aliyuncs.com/" + filePath); archivesDetails.setDocUrl(filePath.contains("http") ? filePath : "https://xiyunwangcn.oss-cn-hangzhou.aliyuncs.com/" + filePath);
archivesDetails.setDelFlag("0"); archivesDetails.setDelFlag("0");
archivesDetails.setCreateTime(DateUtils.getNowDate()); archivesDetails.setCreateTime(DateUtils.getNowDate());
archivesDetails.setCreateBy(SecurityUtils.getUsername()); archivesDetails.setCreateBy(SecurityUtils.getLoginUser().getUsername());
int insertArchivesDetailsResult = archivesMapper.insertDetails(archivesDetails); int insertArchivesDetailsResult = archivesMapper.insertDetails(archivesDetails);
return 0 < insertArchivesDetailsResult ? AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) : AjaxResult.error(HttpCodeEnum.FAIL.getMsg()); return 0 < insertArchivesDetailsResult ? AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) : AjaxResult.error(HttpCodeEnum.FAIL.getMsg());
} }
@ -123,7 +123,7 @@ public class ArchivesServiceImpl implements ArchivesService {
ArchivesInfo currentProjectNodeInfo = new ArchivesInfo().setArchivesName(projectInfo.getProName()).setParentId(currentYearArchivesNodeInfo.getInfoId()).setLevel(Long.toString(PROJECT_YEAR_ARCHIVES_LEVEL)); ArchivesInfo currentProjectNodeInfo = new ArchivesInfo().setArchivesName(projectInfo.getProName()).setParentId(currentYearArchivesNodeInfo.getInfoId()).setLevel(Long.toString(PROJECT_YEAR_ARCHIVES_LEVEL));
currentProjectNodeInfo.setArchivesValue(String.valueOf(projectInfo.getProId())); currentProjectNodeInfo.setArchivesValue(String.valueOf(projectInfo.getProId()));
currentProjectNodeInfo.setCreateTime(DateUtils.getNowDate()); currentProjectNodeInfo.setCreateTime(DateUtils.getNowDate());
currentProjectNodeInfo.setCreateBy(SecurityUtils.getUsername()); currentProjectNodeInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
int insertCurrentProjectNodeResult = archivesMapper.insertInfo(currentProjectNodeInfo); int insertCurrentProjectNodeResult = archivesMapper.insertInfo(currentProjectNodeInfo);
//AjaxResult insertNodeInfoResult = this.add(currentProjectNodeInfo); //AjaxResult insertNodeInfoResult = this.add(currentProjectNodeInfo);
if (insertCurrentProjectNodeResult > 0) { if (insertCurrentProjectNodeResult > 0) {
@ -182,7 +182,7 @@ public class ArchivesServiceImpl implements ArchivesService {
return AjaxResult.error(HttpCodeEnum.NAME_DUPLICATE.getCode(), HttpCodeEnum.NAME_DUPLICATE.getMsg()); return AjaxResult.error(HttpCodeEnum.NAME_DUPLICATE.getCode(), HttpCodeEnum.NAME_DUPLICATE.getMsg());
} }
archiveInfo.setCreateTime(DateUtils.getNowDate()); archiveInfo.setCreateTime(DateUtils.getNowDate());
archiveInfo.setCreateBy(SecurityUtils.getUsername()); archiveInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
archiveInfo.setParentId(archiveInfo.getInfoId() != null ? archiveInfo.getInfoId() : 0L); archiveInfo.setParentId(archiveInfo.getInfoId() != null ? archiveInfo.getInfoId() : 0L);
archiveInfo.setLevel((StringUtils.isNotBlank(archiveInfo.getLevel())) ? String.valueOf(Integer.parseInt(archiveInfo.getLevel()) + 1) : "1"); archiveInfo.setLevel((StringUtils.isNotBlank(archiveInfo.getLevel())) ? String.valueOf(Integer.parseInt(archiveInfo.getLevel()) + 1) : "1");
int result = archivesMapper.insertInfo(archiveInfo); int result = archivesMapper.insertInfo(archiveInfo);
@ -206,7 +206,7 @@ public class ArchivesServiceImpl implements ArchivesService {
return AjaxResult.error(HttpCodeEnum.NAME_DUPLICATE.getCode(), HttpCodeEnum.NAME_DUPLICATE.getMsg()); return AjaxResult.error(HttpCodeEnum.NAME_DUPLICATE.getCode(), HttpCodeEnum.NAME_DUPLICATE.getMsg());
} }
archiveInfo.setUpdateTime(DateUtils.getNowDate()); archiveInfo.setUpdateTime(DateUtils.getNowDate());
archiveInfo.setUpdateBy(SecurityUtils.getUsername()); archiveInfo.setUpdateBy(SecurityUtils.getLoginUser().getUsername());
int result = archivesMapper.updateInfo(archiveInfo); int result = archivesMapper.updateInfo(archiveInfo);
if (result > 0) { if (result > 0) {
return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg(), result); return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg(), result);
@ -322,7 +322,7 @@ public class ArchivesServiceImpl implements ArchivesService {
* @param archivesDetails * @param archivesDetails
*/ */
private void prepareArchivesDetails(ArchivesDetails archivesDetails) { private void prepareArchivesDetails(ArchivesDetails archivesDetails) {
archivesDetails.setCreateBy(SecurityUtils.getUsername()); archivesDetails.setCreateBy(SecurityUtils.getLoginUser().getUsername());
archivesDetails.setCreateTime(DateUtils.getNowDate()); archivesDetails.setCreateTime(DateUtils.getNowDate());
archivesDetails.setParentId(archivesDetails.getDetailsId() != null ? archivesDetails.getDetailsId() : 0L); archivesDetails.setParentId(archivesDetails.getDetailsId() != null ? archivesDetails.getDetailsId() : 0L);
} }
@ -352,7 +352,7 @@ public class ArchivesServiceImpl implements ArchivesService {
if (info != null && !info.getDetailsId().equals(archivesDetails.getDetailsId())) { if (info != null && !info.getDetailsId().equals(archivesDetails.getDetailsId())) {
return AjaxResult.error(HttpCodeEnum.NAME_DUPLICATE.getCode(), HttpCodeEnum.NAME_DUPLICATE.getMsg()); return AjaxResult.error(HttpCodeEnum.NAME_DUPLICATE.getCode(), HttpCodeEnum.NAME_DUPLICATE.getMsg());
} }
archivesDetails.setUpdateBy(SecurityUtils.getUsername()); archivesDetails.setUpdateBy(SecurityUtils.getLoginUser().getUsername());
archivesDetails.setUpdateTime(DateUtils.getNowDate()); archivesDetails.setUpdateTime(DateUtils.getNowDate());
int result = archivesMapper.updateDetails(archivesDetails); int result = archivesMapper.updateDetails(archivesDetails);
if (result > 0) { if (result > 0) {
@ -583,7 +583,7 @@ public class ArchivesServiceImpl implements ArchivesService {
if (info == null || info.getSignUrl() == null) { if (info == null || info.getSignUrl() == null) {
return AjaxResult.error(HttpCodeEnum.TO_PARAM_NULL.getCode(), HttpCodeEnum.TO_PARAM_NULL.getMsg()); return AjaxResult.error(HttpCodeEnum.TO_PARAM_NULL.getCode(), HttpCodeEnum.TO_PARAM_NULL.getMsg());
} }
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getLoginUser().getUserid();
if (userId == null) { if (userId == null) {
return AjaxResult.error("无法获取到当前用户信息,请联系管理员!"); return AjaxResult.error("无法获取到当前用户信息,请联系管理员!");
} }
@ -602,7 +602,7 @@ public class ArchivesServiceImpl implements ArchivesService {
*/ */
@Override @Override
public AjaxResult getSign(ElcSignatureInfo info) { public AjaxResult getSign(ElcSignatureInfo info) {
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getLoginUser().getUserid();
if (userId == null) { if (userId == null) {
return AjaxResult.error("无法获取到当前用户信息,请联系管理员!"); return AjaxResult.error("无法获取到当前用户信息,请联系管理员!");
} }

View File

@ -392,17 +392,17 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus(), BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus(),
null,thisMonthMaxOrder + 1, code); null,thisMonthMaxOrder + 1, code);
tmTask.setCreateTime(DateUtils.getNowDate()); tmTask.setCreateTime(DateUtils.getNowDate());
tmTask.setCreateBy(SecurityUtils.getUsername()); tmTask.setCreateBy(SecurityUtils.getLoginUser().getUsername());
BackApplyInfo backApplyInfo = dto.getBackApplyInfo(); BackApplyInfo backApplyInfo = dto.getBackApplyInfo();
backApplyInfo.setCode(code); backApplyInfo.setCode(code);
backApplyInfo.setCreateBy(SecurityUtils.getUsername()); backApplyInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
backApplyInfo.setCreateTime(DateUtils.getNowDate()); backApplyInfo.setCreateTime(DateUtils.getNowDate());
// 保存退料信息到 tm_task 表中 // 保存退料信息到 tm_task 表中
result += taskMapper.insertTmTask(tmTask); result += taskMapper.insertTmTask(tmTask);
if (result > 0) { if (result > 0) {
TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), dto.getBackApplyInfo().getAgreementId()); TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), dto.getBackApplyInfo().getAgreementId());
tmTaskAgreement.setCreateTime(DateUtils.getNowDate()); tmTaskAgreement.setCreateTime(DateUtils.getNowDate());
tmTaskAgreement.setCreateBy(SecurityUtils.getUsername()); tmTaskAgreement.setCreateBy(SecurityUtils.getLoginUser().getUsername());
taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement); taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
backApplyInfo.setTaskId(tmTask.getTaskId()); backApplyInfo.setTaskId(tmTask.getTaskId());
@ -468,7 +468,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
details.setParentId(backApplyInfo.getId()); details.setParentId(backApplyInfo.getId());
details.setAuditNum(details.getPreNum()); details.setAuditNum(details.getPreNum());
details.setStatus(String.valueOf(BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus())); details.setStatus(String.valueOf(BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus()));
details.setCreateBy(SecurityUtils.getUsername()); details.setCreateBy(SecurityUtils.getLoginUser().getUsername());
details.setCreateTime(DateUtils.getNowDate()); details.setCreateTime(DateUtils.getNowDate());
// 保存退料详情 // 保存退料详情
result += backApplyInfoMapper.insertBackApplyDetails(details); result += backApplyInfoMapper.insertBackApplyDetails(details);
@ -490,7 +490,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
private int saveBmFileInfo(BackApplyDetails details, Long taskId, int result) { private int saveBmFileInfo(BackApplyDetails details, Long taskId, int result) {
if (CollectionUtils.isNotEmpty(details.getBmFileInfos())) { if (CollectionUtils.isNotEmpty(details.getBmFileInfos())) {
for (BmFileInfo bmFileInfo : details.getBmFileInfos()) { for (BmFileInfo bmFileInfo : details.getBmFileInfos()) {
bmFileInfo.setCreateBy(SecurityUtils.getUsername()); bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
bmFileInfo.setCreateTime(DateUtils.getNowDate()); bmFileInfo.setCreateTime(DateUtils.getNowDate());
bmFileInfo.setTaskId(taskId); bmFileInfo.setTaskId(taskId);
bmFileInfo.setTaskType(3); bmFileInfo.setTaskType(3);
@ -531,7 +531,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
result += backApplyInfoMapper.insertCheckDetails(details); result += backApplyInfoMapper.insertCheckDetails(details);
if (CollectionUtils.isNotEmpty(maCodeDto.getBmFileInfos())) { if (CollectionUtils.isNotEmpty(maCodeDto.getBmFileInfos())) {
for (BmFileInfo bmFileInfo : maCodeDto.getBmFileInfos()) { for (BmFileInfo bmFileInfo : maCodeDto.getBmFileInfos()) {
bmFileInfo.setCreateBy(SecurityUtils.getUsername()); bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
bmFileInfo.setCreateTime(DateUtils.getNowDate()); bmFileInfo.setCreateTime(DateUtils.getNowDate());
bmFileInfo.setTaskId(details.getId()); bmFileInfo.setTaskId(details.getId());
bmFileInfo.setTaskType(3); bmFileInfo.setTaskType(3);
@ -554,7 +554,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
*/ */
private void setCommonFields(BackApplyDetails details, Long id) { private void setCommonFields(BackApplyDetails details, Long id) {
details.setParentId(id); details.setParentId(id);
details.setCreateBy(SecurityUtils.getUsername()); details.setCreateBy(SecurityUtils.getLoginUser().getUsername());
details.setCreateTime(DateUtils.getNowDate()); details.setCreateTime(DateUtils.getNowDate());
details.setStatus("0"); details.setStatus("0");
// 默认为 0表示未完成 // 默认为 0表示未完成
@ -605,7 +605,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
//执行新增操作 //执行新增操作
BackApplyInfo info = dto.getBackApplyInfo(); BackApplyInfo info = dto.getBackApplyInfo();
info.setUpdateTime(DateUtils.getNowDate()); info.setUpdateTime(DateUtils.getNowDate());
info.setUpdateBy(SecurityUtils.getUsername()); info.setUpdateBy(SecurityUtils.getLoginUser().getUsername());
info.setCode(backApplyInfo.getCode()); info.setCode(backApplyInfo.getCode());
result += backApplyInfoMapper.updateBackApplyInfo(info); result += backApplyInfoMapper.updateBackApplyInfo(info);
// 保存退料详情 // 保存退料详情
@ -786,7 +786,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
return AjaxResult.error("退料物资为空,无法进行提交"); return AjaxResult.error("退料物资为空,无法进行提交");
} }
// 设置更新信息 // 设置更新信息
backApplyInfo.setUpdateBy(SecurityUtils.getUsername()); backApplyInfo.setUpdateBy(SecurityUtils.getLoginUser().getUsername());
backApplyInfo.setUpdateTime(DateUtils.getNowDate()); backApplyInfo.setUpdateTime(DateUtils.getNowDate());
backApplyInfo.setTaskStatus(BackTaskStatusEnum.BACK_TASK_IN_FINISHED.getStatus()); backApplyInfo.setTaskStatus(BackTaskStatusEnum.BACK_TASK_IN_FINISHED.getStatus());
// 更新任务表及退料申请表状态 // 更新任务表及退料申请表状态
@ -800,7 +800,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
.map(BackApplyInfo::getTypeId).distinct() .map(BackApplyInfo::getTypeId).distinct()
.collect(Collectors.toList()); .collect(Collectors.toList());
// 插入任务表 // 插入任务表
Long newTaskId = insertTt(SecurityUtils.getUsername(), backApplyInfo.getRemark(), backApplyInfo.getTaskId()); Long newTaskId = insertTt(SecurityUtils.getLoginUser().getUsername(), backApplyInfo.getRemark(), backApplyInfo.getTaskId());
// 插入协议任务表 // 插入协议任务表
result += insertTta(newTaskId, applyInfoList); result += insertTta(newTaskId, applyInfoList);
for (String typeId : typeIdList) { for (String typeId : typeIdList) {
@ -865,10 +865,10 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus(), BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus(),
null, thisMonthMaxOrder + 1, code); null, thisMonthMaxOrder + 1, code);
tmTask.setCreateTime(DateUtils.getNowDate()); tmTask.setCreateTime(DateUtils.getNowDate());
tmTask.setCreateBy(SecurityUtils.getUsername()); tmTask.setCreateBy(SecurityUtils.getLoginUser().getUsername());
BackApplyInfo backApplyInfo = dto.getBackApplyInfo(); BackApplyInfo backApplyInfo = dto.getBackApplyInfo();
backApplyInfo.setCode(code); backApplyInfo.setCode(code);
backApplyInfo.setCreateBy(SecurityUtils.getUsername()); backApplyInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
backApplyInfo.setCreateTime(DateUtils.getNowDate()); backApplyInfo.setCreateTime(DateUtils.getNowDate());
result = getResultTask(dto, result, tmTask, backApplyInfo); result = getResultTask(dto, result, tmTask, backApplyInfo);
if (result > 0) { if (result > 0) {
@ -900,10 +900,10 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus(), BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus(),
null, thisMonthMaxOrder + 1, code); null, thisMonthMaxOrder + 1, code);
tmTask.setCreateTime(DateUtils.getNowDate()); tmTask.setCreateTime(DateUtils.getNowDate());
tmTask.setCreateBy(SecurityUtils.getUsername()); tmTask.setCreateBy(SecurityUtils.getLoginUser().getUsername());
BackApplyInfo backApplyInfo = dto.getBackApplyInfo(); BackApplyInfo backApplyInfo = dto.getBackApplyInfo();
backApplyInfo.setCode(code); backApplyInfo.setCode(code);
backApplyInfo.setCreateBy(SecurityUtils.getUsername()); backApplyInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
backApplyInfo.setCreateTime(DateUtils.getNowDate()); backApplyInfo.setCreateTime(DateUtils.getNowDate());
// 保存退料信息到 tm_task 表中 // 保存退料信息到 tm_task 表中
result = getResultTask(dto, result, tmTask, backApplyInfo); result = getResultTask(dto, result, tmTask, backApplyInfo);
@ -933,7 +933,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
details.setNum(BigDecimal.valueOf(num)); details.setNum(BigDecimal.valueOf(num));
details.setAuditNum(details.getPreNum()); details.setAuditNum(details.getPreNum());
details.setStatus(String.valueOf(BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus())); details.setStatus(String.valueOf(BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus()));
details.setCreateBy(SecurityUtils.getUsername()); details.setCreateBy(SecurityUtils.getLoginUser().getUsername());
details.setCreateTime(DateUtils.getNowDate()); details.setCreateTime(DateUtils.getNowDate());
// 保存退料详情 // 保存退料详情
result += backApplyInfoMapper.insertBackApplyDetails(details); result += backApplyInfoMapper.insertBackApplyDetails(details);
@ -946,7 +946,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
//result += machineMapper.updateStatus(details.getMaId(), MaMachineStatusEnum.RETURNED_MATERIAL.getStatus()); //result += machineMapper.updateStatus(details.getMaId(), MaMachineStatusEnum.RETURNED_MATERIAL.getStatus());
if (CollectionUtils.isNotEmpty(details.getBmFileInfos())) { if (CollectionUtils.isNotEmpty(details.getBmFileInfos())) {
for (BmFileInfo bmFileInfo : details.getBmFileInfos()) { for (BmFileInfo bmFileInfo : details.getBmFileInfos()) {
bmFileInfo.setCreateBy(SecurityUtils.getUsername()); bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
bmFileInfo.setCreateTime(DateUtils.getNowDate()); bmFileInfo.setCreateTime(DateUtils.getNowDate());
bmFileInfo.setTaskId(details.getId()); bmFileInfo.setTaskId(details.getId());
bmFileInfo.setTaskType(3); bmFileInfo.setTaskType(3);
@ -970,7 +970,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
if (result > 0) { if (result > 0) {
TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), dto.getBackApplyInfo().getAgreementId()); TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), dto.getBackApplyInfo().getAgreementId());
tmTaskAgreement.setCreateTime(DateUtils.getNowDate()); tmTaskAgreement.setCreateTime(DateUtils.getNowDate());
tmTaskAgreement.setCreateBy(SecurityUtils.getUsername()); tmTaskAgreement.setCreateBy(SecurityUtils.getLoginUser().getUsername());
taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement); taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
backApplyInfo.setTaskId(tmTask.getTaskId()); backApplyInfo.setTaskId(tmTask.getTaskId());
result += backApplyInfoMapper.insertBackApplyInfo(backApplyInfo); result += backApplyInfoMapper.insertBackApplyInfo(backApplyInfo);
@ -990,7 +990,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
details.setParentId(dto.getBackApplyInfo().getId()); details.setParentId(dto.getBackApplyInfo().getId());
details.setAuditNum(details.getPreNum()); details.setAuditNum(details.getPreNum());
details.setStatus(String.valueOf(BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus())); details.setStatus(String.valueOf(BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus()));
details.setCreateBy(SecurityUtils.getUsername()); details.setCreateBy(SecurityUtils.getLoginUser().getUsername());
details.setCreateTime(DateUtils.getNowDate()); details.setCreateTime(DateUtils.getNowDate());
// 保存退料详情 // 保存退料详情
//现根据id查询back_apply_details表看数据是否存在存在则对数量进行更新不存在则插入 //现根据id查询back_apply_details表看数据是否存在存在则对数量进行更新不存在则插入
@ -1036,7 +1036,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
details.setGoodNum(details.getGoodNum()); details.setGoodNum(details.getGoodNum());
details.setBadNum(details.getBadNum()); details.setBadNum(details.getBadNum());
details.setStatus(String.valueOf(BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus())); details.setStatus(String.valueOf(BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus()));
details.setCreateBy(SecurityUtils.getUsername()); details.setCreateBy(SecurityUtils.getLoginUser().getUsername());
details.setCreateTime(DateUtils.getNowDate()); details.setCreateTime(DateUtils.getNowDate());
// 保存退料详情 // 保存退料详情
//现根据id查询back_apply_details表看数据是否存在存在则对数量进行更新不存在则插入 //现根据id查询back_apply_details表看数据是否存在存在则对数量进行更新不存在则插入
@ -1062,7 +1062,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
// result += machineMapper.updateStatus(details.getMaId(), MaMachineStatusEnum.BACK_REPAIR.getStatus()); // result += machineMapper.updateStatus(details.getMaId(), MaMachineStatusEnum.BACK_REPAIR.getStatus());
if (CollectionUtils.isNotEmpty(details.getBmFileInfos())) { if (CollectionUtils.isNotEmpty(details.getBmFileInfos())) {
for (BmFileInfo bmFileInfo : details.getBmFileInfos()) { for (BmFileInfo bmFileInfo : details.getBmFileInfos()) {
bmFileInfo.setCreateBy(SecurityUtils.getUsername()); bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
bmFileInfo.setCreateTime(DateUtils.getNowDate()); bmFileInfo.setCreateTime(DateUtils.getNowDate());
bmFileInfo.setTaskId(details.getId()); bmFileInfo.setTaskId(details.getId());
bmFileInfo.setTaskType(3); bmFileInfo.setTaskType(3);
@ -1243,7 +1243,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
return AjaxResult.error("参数错误"); return AjaxResult.error("参数错误");
} }
// 更新 back_check_details // 更新 back_check_details
maCodeDto.setUpdateBy(SecurityUtils.getUsername()); maCodeDto.setUpdateBy(SecurityUtils.getLoginUser().getUsername());
maCodeDto.setUpdateTime(DateUtils.getNowDate()); maCodeDto.setUpdateTime(DateUtils.getNowDate());
result += backApplyInfoMapper.updateMaCode(maCodeDto); result += backApplyInfoMapper.updateMaCode(maCodeDto);
// 获取 bmFileInfos // 获取 bmFileInfos
@ -1518,7 +1518,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
for (BackApplyInfo wx : wxList) { for (BackApplyInfo wx : wxList) {
wx.setTaskId(taskId); wx.setTaskId(taskId);
wx.setStatus("0"); wx.setStatus("0");
wx.setCreateBy(SecurityUtils.getUsername()); wx.setCreateBy(SecurityUtils.getLoginUser().getUsername());
result = backApplyInfoMapper.insertRad(wx); result = backApplyInfoMapper.insertRad(wx);
} }
} }
@ -1536,7 +1536,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
String agreementId = String.valueOf(list.get(0).getAgreementId()); String agreementId = String.valueOf(list.get(0).getAgreementId());
TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(taskId, Long.parseLong(agreementId)); TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(taskId, Long.parseLong(agreementId));
tmTaskAgreement.setCreateTime(DateUtils.getNowDate()); tmTaskAgreement.setCreateTime(DateUtils.getNowDate());
tmTaskAgreement.setCreateBy(SecurityUtils.getUsername()); tmTaskAgreement.setCreateBy(SecurityUtils.getLoginUser().getUsername());
res = taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement); res = taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
return res; return res;
} }

View File

@ -120,7 +120,7 @@ public class BmAgreementInfoServiceImpl implements IBmAgreementInfoService
} }
try { try {
bmAgreementInfo.setCreateTime(DateUtils.getNowDate()); bmAgreementInfo.setCreateTime(DateUtils.getNowDate());
bmAgreementInfo.setCreateBy(SecurityUtils.getUsername()); bmAgreementInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
bmAgreementInfo.setSignTime(DateUtils.getNowDate()); bmAgreementInfo.setSignTime(DateUtils.getNowDate());
bmAgreementInfo.setAgreementCode(getAgreementCode()); bmAgreementInfo.setAgreementCode(getAgreementCode());
if(bmAgreementInfo.getBranchProIds() != null){ if(bmAgreementInfo.getBranchProIds() != null){

View File

@ -67,7 +67,7 @@ public class BmAssetAttributesServiceImpl implements BmAssetAttributesService {
return AjaxResult.error(HttpCodeEnum.NAME_DUPLICATE.getCode(), "资产类型名称或资产编码与库中重复"); return AjaxResult.error(HttpCodeEnum.NAME_DUPLICATE.getCode(), "资产类型名称或资产编码与库中重复");
} }
} }
bmAssetAttributes.setCreateBy(SecurityUtils.getUserId().toString()); bmAssetAttributes.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
bmAssetAttributes.setCreateTime(DateUtils.getNowDate()); bmAssetAttributes.setCreateTime(DateUtils.getNowDate());
int result = bmAssetAttributesDao.insert(bmAssetAttributes); int result = bmAssetAttributesDao.insert(bmAssetAttributes);
if (result > 0) { if (result > 0) {
@ -97,7 +97,7 @@ public class BmAssetAttributesServiceImpl implements BmAssetAttributesService {
return AjaxResult.error(HttpCodeEnum.NAME_DUPLICATE.getCode(), "资产类型名称或资产编码与库中重复"); return AjaxResult.error(HttpCodeEnum.NAME_DUPLICATE.getCode(), "资产类型名称或资产编码与库中重复");
} }
} }
bmAssetAttributes.setUpdateBy(SecurityUtils.getUserId().toString()); bmAssetAttributes.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
bmAssetAttributes.setUpdateTime(DateUtils.getNowDate()); bmAssetAttributes.setUpdateTime(DateUtils.getNowDate());
int result = bmAssetAttributesDao.update(bmAssetAttributes); int result = bmAssetAttributesDao.update(bmAssetAttributes);
if (result > 0) { if (result > 0) {

View File

@ -73,7 +73,7 @@ public class BmConfigServiceImpl implements IBmConfigService
public int insertBmConfig(BmConfig bmConfig) public int insertBmConfig(BmConfig bmConfig)
{ {
bmConfig.setCreateTime(DateUtils.getNowDate()); bmConfig.setCreateTime(DateUtils.getNowDate());
bmConfig.setCreateBy(SecurityUtils.getUsername()); bmConfig.setCreateBy(SecurityUtils.getLoginUser().getUsername());
bmConfigMapper.deleteBmConfigByName(bmConfig.getItemName()); bmConfigMapper.deleteBmConfigByName(bmConfig.getItemName());
return bmConfigMapper.insertBmConfig(bmConfig); return bmConfigMapper.insertBmConfig(bmConfig);
} }

View File

@ -199,7 +199,7 @@ public class BmProjectServiceImpl implements IBmProjectService
} }
String telPhone = Sm4Utils.encrypt(bmProject.getTelphone()); String telPhone = Sm4Utils.encrypt(bmProject.getTelphone());
bmProject.setCreateTime(DateUtils.getNowDate()); bmProject.setCreateTime(DateUtils.getNowDate());
bmProject.setCreateBy(SecurityUtils.getUserId().toString()); bmProject.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
bmProject.setTelphone(telPhone); bmProject.setTelphone(telPhone);
int result = bmProjectMapper.insertBmProject(bmProject); int result = bmProjectMapper.insertBmProject(bmProject);
if (result > 0) { if (result > 0) {
@ -257,7 +257,7 @@ public class BmProjectServiceImpl implements IBmProjectService
String telPhone = Sm4Utils.encrypt(bmProject.getTelphone()); String telPhone = Sm4Utils.encrypt(bmProject.getTelphone());
bmProject.setTelphone(telPhone); bmProject.setTelphone(telPhone);
bmProject.setUpdateTime(DateUtils.getNowDate()); bmProject.setUpdateTime(DateUtils.getNowDate());
bmProject.setUpdateBy(SecurityUtils.getUserId().toString()); bmProject.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
int result = bmProjectMapper.updateBmProject(bmProject); int result = bmProjectMapper.updateBmProject(bmProject);
if (result > 0) { if (result > 0) {
return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg(), result); return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg(), result);

View File

@ -83,7 +83,7 @@ public class BmQrBoxServiceImpl implements BmQrBoxService {
//生成二维码 //生成二维码
final String code = "BOX-" + DateTimeHelper.getNowTimeFomart(); final String code = "BOX-" + DateTimeHelper.getNowTimeFomart();
bmQrBoxInfo.setBoxCode(code); bmQrBoxInfo.setBoxCode(code);
bmQrBoxInfo.setCreateBy(SecurityUtils.getUsername()); bmQrBoxInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
bmQrBoxInfo.setCreateTime(DateUtils.getNowDate()); bmQrBoxInfo.setCreateTime(DateUtils.getNowDate());
final int result = bmQrBoxMapper.insertBmQrcodeInfo(bmQrBoxInfo); final int result = bmQrBoxMapper.insertBmQrcodeInfo(bmQrBoxInfo);
return 0 < result ? AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) : AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg()); return 0 < result ? AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) : AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
@ -247,7 +247,7 @@ public class BmQrBoxServiceImpl implements BmQrBoxService {
*/ */
@Override @Override
public AjaxResult updateBmQrcodeInfo(BmQrBoxInfo bmQrBoxInfo) { public AjaxResult updateBmQrcodeInfo(BmQrBoxInfo bmQrBoxInfo) {
bmQrBoxInfo.setUpdateBy(SecurityUtils.getUsername()); bmQrBoxInfo.setUpdateBy(SecurityUtils.getLoginUser().getUsername());
bmQrBoxInfo.setUpdateTime(DateUtils.getNowDate()); bmQrBoxInfo.setUpdateTime(DateUtils.getNowDate());
final int result = bmQrBoxMapper.updateBmQrcodeInfoById(bmQrBoxInfo); final int result = bmQrBoxMapper.updateBmQrcodeInfoById(bmQrBoxInfo);
return 0 < result ? AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) : AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg()); return 0 < result ? AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) : AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
@ -262,7 +262,7 @@ public class BmQrBoxServiceImpl implements BmQrBoxService {
public AjaxResult appTransfer(BmQrBoxInfo bmQrBoxInfo) { public AjaxResult appTransfer(BmQrBoxInfo bmQrBoxInfo) {
bmQrBoxInfo.setBoxCode(null).setBoxName(null).setBoxType(null).setStatus(QrBoxStatusEnum.QR_BOX_STATUS_WAIT_RECEIVE.getStatus().toString()); bmQrBoxInfo.setBoxCode(null).setBoxName(null).setBoxType(null).setStatus(QrBoxStatusEnum.QR_BOX_STATUS_WAIT_RECEIVE.getStatus().toString());
bmQrBoxInfo.setTransferUser(SecurityUtils.getUserId()); bmQrBoxInfo.setTransferUser(SecurityUtils.getLoginUser().getUserid());
return 0 < bmQrBoxMapper.updateBmQrcodeInfoById(bmQrBoxInfo) ? AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) : return 0 < bmQrBoxMapper.updateBmQrcodeInfoById(bmQrBoxInfo) ? AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) :
AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg()); AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
} }
@ -277,7 +277,7 @@ public class BmQrBoxServiceImpl implements BmQrBoxService {
final List<BmQrBoxInfo> bmQrBoxInfos = bmQrBoxMapper.find(new BmQrBoxInfo().setBoxId(bmQrBoxInfo.getBoxId())); final List<BmQrBoxInfo> bmQrBoxInfos = bmQrBoxMapper.find(new BmQrBoxInfo().setBoxId(bmQrBoxInfo.getBoxId()));
if (!bmQrBoxInfos.isEmpty()) { if (!bmQrBoxInfos.isEmpty()) {
final BmQrBoxInfo item = bmQrBoxInfos.get(0); final BmQrBoxInfo item = bmQrBoxInfos.get(0);
if (null == item.getTransferUser() || !Objects.equals(item.getTransferUser(), SecurityUtils.getUserId())) { if (null == item.getTransferUser() || !Objects.equals(item.getTransferUser(), SecurityUtils.getLoginUser().getUserid())) {
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "驳回失败,您并非接收人,无法操作驳回!"); return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "驳回失败,您并非接收人,无法操作驳回!");
} }
} else { } else {
@ -303,7 +303,7 @@ public class BmQrBoxServiceImpl implements BmQrBoxService {
final List<BmQrBoxInfo> bmQrBoxInfos = bmQrBoxMapper.find(new BmQrBoxInfo().setBoxId(bmQrBoxInfo.getBoxId())); final List<BmQrBoxInfo> bmQrBoxInfos = bmQrBoxMapper.find(new BmQrBoxInfo().setBoxId(bmQrBoxInfo.getBoxId()));
if (!bmQrBoxInfos.isEmpty()) { if (!bmQrBoxInfos.isEmpty()) {
final BmQrBoxInfo item = bmQrBoxInfos.get(0); final BmQrBoxInfo item = bmQrBoxInfos.get(0);
if (null == item.getInputUser() || !Objects.equals(item.getInputUser(), SecurityUtils.getUserId())) { if (null == item.getInputUser() || !Objects.equals(item.getInputUser(), SecurityUtils.getLoginUser().getUserid())) {
return AjaxResult.error(500, "接收失败,当前操作非移交人,无法接收!"); return AjaxResult.error(500, "接收失败,当前操作非移交人,无法接收!");
} }
List<BmQrBoxInfo> list = bmQrBoxMapper.getBoxBindListById(bmQrBoxInfo); List<BmQrBoxInfo> list = bmQrBoxMapper.getBoxBindListById(bmQrBoxInfo);
@ -345,7 +345,7 @@ public class BmQrBoxServiceImpl implements BmQrBoxService {
return AjaxResult.error(500, "接收失败,无此标准箱信息!"); return AjaxResult.error(500, "接收失败,无此标准箱信息!");
} }
bmQrBoxInfo.setBoxCode(null).setBoxName(null).setBoxType(null) bmQrBoxInfo.setBoxCode(null).setBoxName(null).setBoxType(null)
.setInputUser(SecurityUtils.getUserId()) .setInputUser(SecurityUtils.getLoginUser().getUserid())
.setStatus(QrBoxStatusEnum.QR_BOX_STATUS_ON_RECEIVE.getStatus().toString()); .setStatus(QrBoxStatusEnum.QR_BOX_STATUS_ON_RECEIVE.getStatus().toString());
return 0 < bmQrBoxMapper.updateBmQrcodeInfoById(bmQrBoxInfo) ? return 0 < bmQrBoxMapper.updateBmQrcodeInfoById(bmQrBoxInfo) ?
AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) : AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) :
@ -382,7 +382,7 @@ public class BmQrBoxServiceImpl implements BmQrBoxService {
*/ */
@Override @Override
public AjaxResult updateBmQrcodeInfoByCode(BmQrBoxInfo bmQrBoxInfo) { public AjaxResult updateBmQrcodeInfoByCode(BmQrBoxInfo bmQrBoxInfo) {
bmQrBoxInfo.setUpdateBy(SecurityUtils.getUsername()); bmQrBoxInfo.setUpdateBy(SecurityUtils.getLoginUser().getUsername());
bmQrBoxInfo.setUpdateTime(DateUtils.getNowDate()); bmQrBoxInfo.setUpdateTime(DateUtils.getNowDate());
bmQrBoxInfo.setStatus(QrBoxStatusEnum.QR_BOX_STATUS_WAIT_BIND.getStatus().toString()); bmQrBoxInfo.setStatus(QrBoxStatusEnum.QR_BOX_STATUS_WAIT_BIND.getStatus().toString());
final int result = bmQrBoxMapper.updateBmQrcodeInfoByCode(bmQrBoxInfo); final int result = bmQrBoxMapper.updateBmQrcodeInfoByCode(bmQrBoxInfo);
@ -454,7 +454,7 @@ public class BmQrBoxServiceImpl implements BmQrBoxService {
// 验证通过进行数据处理 // 验证通过进行数据处理
bmQrBoxInfo.setMaId(machineVo.getMaId()); bmQrBoxInfo.setMaId(machineVo.getMaId());
bmQrBoxInfo.setCreateBy(SecurityUtils.getUsername()); bmQrBoxInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
bmQrBoxInfo.setCreateTime(DateUtils.getNowDate()); bmQrBoxInfo.setCreateTime(DateUtils.getNowDate());
if (0 < bmQrBoxMapper.addQrcodeBoxBind(bmQrBoxInfo)) { if (0 < bmQrBoxMapper.addQrcodeBoxBind(bmQrBoxInfo)) {
// 修改标准箱状态为已完成 // 修改标准箱状态为已完成

View File

@ -73,7 +73,7 @@ public class BmQrcodeInfoServiceImpl implements IBmQrcodeInfoService
public AjaxResult insertBmQrcodeInfo(BmQrcodeInfo bmQrcodeInfo) public AjaxResult insertBmQrcodeInfo(BmQrcodeInfo bmQrcodeInfo)
{ {
bmQrcodeInfo.setCreateTime(DateUtils.getNowDate()); bmQrcodeInfo.setCreateTime(DateUtils.getNowDate());
bmQrcodeInfo.setCreateBy(SecurityUtils.getUserId().toString()); bmQrcodeInfo.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
String genMonth = DateTimeHelper.getNowMonth(); String genMonth = DateTimeHelper.getNowMonth();
List<BmQrcodeInfo> list = bmQrcodeInfoMapper.selectByMonth(genMonth); List<BmQrcodeInfo> list = bmQrcodeInfoMapper.selectByMonth(genMonth);
BmQrcodeInfo bean = null; BmQrcodeInfo bean = null;

View File

@ -139,7 +139,7 @@ public class BmUnitServiceImpl implements IBmUnitService
bmUnit.setTelphone(telPhone); bmUnit.setTelphone(telPhone);
} }
bmUnit.setCreateTime(DateUtils.getNowDate()); bmUnit.setCreateTime(DateUtils.getNowDate());
bmUnit.setCreateBy(SecurityUtils.getUserId().toString()); bmUnit.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
int result = bmUnitMapper.insertBmUnit(bmUnit); int result = bmUnitMapper.insertBmUnit(bmUnit);
if (result > 0) { if (result > 0) {
return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg(), result); return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg(), result);
@ -172,7 +172,7 @@ public class BmUnitServiceImpl implements IBmUnitService
bmUnit.setTelphone(telPhone); bmUnit.setTelphone(telPhone);
} }
bmUnit.setUpdateTime(DateUtils.getNowDate()); bmUnit.setUpdateTime(DateUtils.getNowDate());
bmUnit.setUpdateBy(SecurityUtils.getUserId().toString()); bmUnit.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
int result = bmUnitMapper.updateBmUnit(bmUnit); int result = bmUnitMapper.updateBmUnit(bmUnit);
if (result > 0) { if (result > 0) {
return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg(), result); return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg(), result);

View File

@ -108,15 +108,15 @@ public class FieldMaintenanceImpl implements FieldMaintenanceService {
FieldTaskStatusEnum.FIELD_TASK_NO_FINISHED.getStatus(), FieldTaskStatusEnum.FIELD_TASK_NO_FINISHED.getStatus(),
null, thisMonthMaxOrder + 1, code); null, thisMonthMaxOrder + 1, code);
tmTask.setCreateTime(DateUtils.getNowDate()); tmTask.setCreateTime(DateUtils.getNowDate());
tmTask.setCreateBy(SecurityUtils.getUsername()); tmTask.setCreateBy(SecurityUtils.getLoginUser().getUsername());
fieldApplyInfo.setCode(code); fieldApplyInfo.setCode(code);
fieldApplyInfo.setCreateBy(SecurityUtils.getUsername()); fieldApplyInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
fieldApplyInfo.setCreateTime(DateUtils.getNowDate()); fieldApplyInfo.setCreateTime(DateUtils.getNowDate());
int i = taskMapper.insertTmTask(tmTask); int i = taskMapper.insertTmTask(tmTask);
if (i > 0) { if (i > 0) {
TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), fieldApplyInfo.getAgreementId()); TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), fieldApplyInfo.getAgreementId());
tmTaskAgreement.setCreateTime(DateUtils.getNowDate()); tmTaskAgreement.setCreateTime(DateUtils.getNowDate());
tmTaskAgreement.setCreateBy(SecurityUtils.getUsername()); tmTaskAgreement.setCreateBy(SecurityUtils.getLoginUser().getUsername());
taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement); taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
fieldApplyInfo.setTaskId(tmTask.getTaskId()); fieldApplyInfo.setTaskId(tmTask.getTaskId());
fieldApplyInfo.setAgreementId(tmTaskAgreement.getAgreementId()); fieldApplyInfo.setAgreementId(tmTaskAgreement.getAgreementId());

View File

@ -84,7 +84,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
try { try {
LeaseApplyInfo leaseApplyInfo = new LeaseApplyInfo(); LeaseApplyInfo leaseApplyInfo = new LeaseApplyInfo();
leaseApplyInfo.setId(id); leaseApplyInfo.setId(id);
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getLoginUser().getUserid();
leaseApplyInfo.setUserId(userId); leaseApplyInfo.setUserId(userId);
Optional<LeaseApplyInfo> optionalInfo = Optional.ofNullable(leaseApplyInfoMapper.selectLeaseApplyInfoById(leaseApplyInfo)); Optional<LeaseApplyInfo> optionalInfo = Optional.ofNullable(leaseApplyInfoMapper.selectLeaseApplyInfoById(leaseApplyInfo));
LeaseApplyRequestVo leaseApplyRequestVo = new LeaseApplyRequestVo(); LeaseApplyRequestVo leaseApplyRequestVo = new LeaseApplyRequestVo();
@ -264,7 +264,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
return AjaxResult.error("请先添加领料任务物资明细"); return AjaxResult.error("请先添加领料任务物资明细");
} }
leaseApplyRequestVo.getLeaseApplyInfo().setCreateTime(DateUtils.getNowDate()); leaseApplyRequestVo.getLeaseApplyInfo().setCreateTime(DateUtils.getNowDate());
leaseApplyRequestVo.getLeaseApplyInfo().setCreateBy(SecurityUtils.getUsername()); leaseApplyRequestVo.getLeaseApplyInfo().setCreateBy(SecurityUtils.getLoginUser().getUsername());
try { try {
// 获取 LeaseApplyDetails 列表 // 获取 LeaseApplyDetails 列表
List<LeaseApplyDetails> leaseApplyDetailsList = leaseApplyRequestVo.getLeaseApplyDetailsList(); List<LeaseApplyDetails> leaseApplyDetailsList = leaseApplyRequestVo.getLeaseApplyDetailsList();
@ -316,7 +316,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
return AjaxResult.error("请先添加领料任务物资明细"); return AjaxResult.error("请先添加领料任务物资明细");
} }
leaseApplyRequestVo.getLeaseApplyInfo().setCreateTime(DateUtils.getNowDate()); leaseApplyRequestVo.getLeaseApplyInfo().setCreateTime(DateUtils.getNowDate());
leaseApplyRequestVo.getLeaseApplyInfo().setCreateBy(SecurityUtils.getUsername()); leaseApplyRequestVo.getLeaseApplyInfo().setCreateBy(SecurityUtils.getLoginUser().getUsername());
try { try {
int thisMonthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId()); int thisMonthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId());
String taskCode = genderTaskCode(thisMonthMaxOrder); String taskCode = genderTaskCode(thisMonthMaxOrder);
@ -324,11 +324,11 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
LeaseTaskStatusEnum.LEASE_TASK_TO_PUBLISHED.getStatus(), LeaseTaskStatusEnum.LEASE_TASK_TO_PUBLISHED.getStatus(),
leaseApplyRequestVo.getLeaseApplyInfo().getCompanyId(),thisMonthMaxOrder + 1, taskCode); leaseApplyRequestVo.getLeaseApplyInfo().getCompanyId(),thisMonthMaxOrder + 1, taskCode);
tmTask.setCreateTime(DateUtils.getNowDate()); tmTask.setCreateTime(DateUtils.getNowDate());
tmTask.setCreateBy(SecurityUtils.getUsername()); tmTask.setCreateBy(SecurityUtils.getLoginUser().getUsername());
tmTaskMapper.insertTmTask(tmTask); tmTaskMapper.insertTmTask(tmTask);
TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), leaseApplyRequestVo.getLeaseApplyInfo().getAgreementId()); TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), leaseApplyRequestVo.getLeaseApplyInfo().getAgreementId());
tmTaskAgreement.setCreateTime(DateUtils.getNowDate()); tmTaskAgreement.setCreateTime(DateUtils.getNowDate());
tmTaskAgreement.setCreateBy(SecurityUtils.getUsername()); tmTaskAgreement.setCreateBy(SecurityUtils.getLoginUser().getUsername());
tmTaskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement); tmTaskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
leaseApplyRequestVo.getLeaseApplyInfo().setTaskId(tmTask.getTaskId()); leaseApplyRequestVo.getLeaseApplyInfo().setTaskId(tmTask.getTaskId());
leaseApplyRequestVo.getLeaseApplyInfo().setCode(taskCode); leaseApplyRequestVo.getLeaseApplyInfo().setCode(taskCode);
@ -345,7 +345,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
bmFileInfo.setTaskId(tmTask.getTaskId()); bmFileInfo.setTaskId(tmTask.getTaskId());
bmFileInfo.setModelId(leaseApplyRequestVo.getLeaseApplyInfo().getId()); bmFileInfo.setModelId(leaseApplyRequestVo.getLeaseApplyInfo().getId());
bmFileInfo.setFileType(5L); bmFileInfo.setFileType(5L);
bmFileInfo.setCreateBy(SecurityUtils.getUsername()); bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
bmFileInfo.setCreateTime(DateUtils.getNowDate()); bmFileInfo.setCreateTime(DateUtils.getNowDate());
bmFileInfoMapper.insertBmFileInfo(bmFileInfo); bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
}); });
@ -378,13 +378,13 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
LeaseTaskStatusEnum.LEASE_TASK_TO_PUBLISHED.getStatus(), LeaseTaskStatusEnum.LEASE_TASK_TO_PUBLISHED.getStatus(),
leaseApplyRequestVo.getLeaseApplyInfo().getCompanyId(), thisMonthMaxOrder + 1, taskCode); leaseApplyRequestVo.getLeaseApplyInfo().getCompanyId(), thisMonthMaxOrder + 1, taskCode);
tmTask.setCreateTime(DateUtils.getNowDate()); tmTask.setCreateTime(DateUtils.getNowDate());
tmTask.setCreateBy(SecurityUtils.getUsername()); tmTask.setCreateBy(SecurityUtils.getLoginUser().getUsername());
tmTask.setSplitType(splitType.getTaskTypeId()); tmTask.setSplitType(splitType.getTaskTypeId());
tmTaskMapper.insertTmTask(tmTask); tmTaskMapper.insertTmTask(tmTask);
TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), leaseApplyRequestVo.getLeaseApplyInfo().getAgreementId()); TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), leaseApplyRequestVo.getLeaseApplyInfo().getAgreementId());
tmTaskAgreement.setCreateTime(DateUtils.getNowDate()); tmTaskAgreement.setCreateTime(DateUtils.getNowDate());
tmTaskAgreement.setCreateBy(SecurityUtils.getUsername()); tmTaskAgreement.setCreateBy(SecurityUtils.getLoginUser().getUsername());
tmTaskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement); tmTaskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
leaseApplyRequestVo.getLeaseApplyInfo().setTaskId(tmTask.getTaskId()); leaseApplyRequestVo.getLeaseApplyInfo().setTaskId(tmTask.getTaskId());
@ -402,7 +402,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
bmFileInfo.setTaskId(tmTask.getTaskId()); bmFileInfo.setTaskId(tmTask.getTaskId());
bmFileInfo.setModelId(leaseApplyRequestVo.getLeaseApplyInfo().getId()); bmFileInfo.setModelId(leaseApplyRequestVo.getLeaseApplyInfo().getId());
bmFileInfo.setFileType(5L); bmFileInfo.setFileType(5L);
bmFileInfo.setCreateBy(SecurityUtils.getUsername()); bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
bmFileInfo.setCreateTime(DateUtils.getNowDate()); bmFileInfo.setCreateTime(DateUtils.getNowDate());
bmFileInfoMapper.insertBmFileInfo(bmFileInfo); bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
}); });
@ -486,7 +486,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
for (LeaseApplyDetails details : leaseApplyDetailsList) { for (LeaseApplyDetails details : leaseApplyDetailsList) {
details.setParentId(parentId); // 设置info.parentId details.setParentId(parentId); // 设置info.parentId
details.setCreateTime(DateUtils.getNowDate()); details.setCreateTime(DateUtils.getNowDate());
details.setCreateBy(SecurityUtils.getUsername()); details.setCreateBy(SecurityUtils.getLoginUser().getUsername());
} }
// 批量插入详情数据 // 批量插入详情数据
int count = leaseApplyDetailsMapper.insertLeaseApplyDetailsList(leaseApplyDetailsList); int count = leaseApplyDetailsMapper.insertLeaseApplyDetailsList(leaseApplyDetailsList);
@ -534,7 +534,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
LeaseApplyInfo leaseApplyInfo = leaseApplyRequestVo.getLeaseApplyInfo(); LeaseApplyInfo leaseApplyInfo = leaseApplyRequestVo.getLeaseApplyInfo();
if (leaseApplyInfo != null && leaseApplyInfo.getId() != null) { if (leaseApplyInfo != null && leaseApplyInfo.getId() != null) {
leaseApplyInfo.setUpdateTime(DateUtils.getNowDate()); leaseApplyInfo.setUpdateTime(DateUtils.getNowDate());
leaseApplyInfo.setUpdateBy(SecurityUtils.getUsername()); leaseApplyInfo.setUpdateBy(SecurityUtils.getLoginUser().getUsername());
// 去除创建一个新的数组对象直接复用 // 去除创建一个新的数组对象直接复用
Long[] ids = {leaseApplyInfo.getId()}; Long[] ids = {leaseApplyInfo.getId()};
@ -551,7 +551,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
fileInfo.setModelId(leaseApplyInfo.getId()); fileInfo.setModelId(leaseApplyInfo.getId());
fileInfo.setTaskType(2); fileInfo.setTaskType(2);
fileInfo.setFileType(5L); fileInfo.setFileType(5L);
fileInfo.setCreateBy(SecurityUtils.getUsername()); fileInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
fileInfo.setCreateTime(DateUtils.getNowDate()); fileInfo.setCreateTime(DateUtils.getNowDate());
bmFileInfoMapper.insertBmFileInfo(fileInfo); bmFileInfoMapper.insertBmFileInfo(fileInfo);
} }
@ -719,7 +719,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
try { try {
LeaseApplyInfo leaseApplyInfo = new LeaseApplyInfo(); LeaseApplyInfo leaseApplyInfo = new LeaseApplyInfo();
leaseApplyInfo.setId(id); leaseApplyInfo.setId(id);
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getLoginUser().getUserid();
Optional<LeaseApplyInfo> optionalInfo = Optional.ofNullable(leaseApplyInfoMapper.selectLeaseApplyInfoById(leaseApplyInfo)); Optional<LeaseApplyInfo> optionalInfo = Optional.ofNullable(leaseApplyInfoMapper.selectLeaseApplyInfoById(leaseApplyInfo));
LeaseApplyRequestVo leaseApplyRequestVo = new LeaseApplyRequestVo(); LeaseApplyRequestVo leaseApplyRequestVo = new LeaseApplyRequestVo();

View File

@ -296,7 +296,7 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService {
private int updateRecords(LeaseOutDetails leaseOutDetails) { private int updateRecords(LeaseOutDetails leaseOutDetails) {
int res = 0; int res = 0;
// 首先更新领料任务详情表的领料数及状态lease_apply_details // 首先更新领料任务详情表的领料数及状态lease_apply_details
leaseOutDetails.setUpdateBy(SecurityUtils.getUsername()); leaseOutDetails.setUpdateBy(SecurityUtils.getLoginUser().getUsername());
res = leaseApplyDetailsMapper.updateBackDetailsOutNum(leaseOutDetails); res = leaseApplyDetailsMapper.updateBackDetailsOutNum(leaseOutDetails);
if (res > 0) { if (res > 0) {
// 删除领料出库明细表lease_out_details // 删除领料出库明细表lease_out_details
@ -443,7 +443,7 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService {
} }
if (res > 0) { if (res > 0) {
// 插入领料出库明细表lease_out_details // 插入领料出库明细表lease_out_details
record.setCreateBy(SecurityUtils.getUsername()); record.setCreateBy(SecurityUtils.getLoginUser().getUsername());
res = leaseOutDetailsMapper.insertLeaseOutDetails(record); res = leaseOutDetailsMapper.insertLeaseOutDetails(record);
if (res > 0) { if (res > 0) {
// 普通机具减少 (ma_type 设备规格表)的库存数量 // 普通机具减少 (ma_type 设备规格表)的库存数量

View File

@ -103,7 +103,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
return AjaxResult.error("请先添加领用任务物资明细"); return AjaxResult.error("请先添加领用任务物资明细");
} }
leaseApplyRequestVo.getLeaseApplyInfo().setCreateTime(DateUtils.getNowDate()); leaseApplyRequestVo.getLeaseApplyInfo().setCreateTime(DateUtils.getNowDate());
leaseApplyRequestVo.getLeaseApplyInfo().setCreateBy(SecurityUtils.getUsername()); leaseApplyRequestVo.getLeaseApplyInfo().setCreateBy(SecurityUtils.getLoginUser().getUsername());
Long userId = SecurityUtils.getLoginUser().getUserid(); Long userId = SecurityUtils.getLoginUser().getUserid();
Long deptId = mapper.getDeptIdByUserId(userId); Long deptId = mapper.getDeptIdByUserId(userId);
LeaseDeptInfo leaseDeptInfo = new LeaseDeptInfo(); LeaseDeptInfo leaseDeptInfo = new LeaseDeptInfo();
@ -141,11 +141,11 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
taskStatus, taskStatus,
leaseApplyRequestVo.getLeaseApplyInfo().getCompanyId(),thisMonthMaxOrder + 1, taskCode); leaseApplyRequestVo.getLeaseApplyInfo().getCompanyId(),thisMonthMaxOrder + 1, taskCode);
tmTask.setCreateTime(DateUtils.getNowDate()); tmTask.setCreateTime(DateUtils.getNowDate());
tmTask.setCreateBy(SecurityUtils.getUsername()); tmTask.setCreateBy(SecurityUtils.getLoginUser().getUsername());
tmTaskMapper.insertTmTask(tmTask); tmTaskMapper.insertTmTask(tmTask);
// TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), leaseApplyRequestVo.getLeaseApplyInfo().getAgreementId()); // TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), leaseApplyRequestVo.getLeaseApplyInfo().getAgreementId());
// tmTaskAgreement.setCreateTime(DateUtils.getNowDate()); // tmTaskAgreement.setCreateTime(DateUtils.getNowDate());
// tmTaskAgreement.setCreateBy(SecurityUtils.getUsername()); // tmTaskAgreement.setCreateBy(SecurityUtils.getLoginUser().getUsername());
// tmTaskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement); // tmTaskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
leaseApplyRequestVo.getLeaseApplyInfo().setTaskId(tmTask.getTaskId()); leaseApplyRequestVo.getLeaseApplyInfo().setTaskId(tmTask.getTaskId());
leaseApplyRequestVo.getLeaseApplyInfo().setCode(taskCode); leaseApplyRequestVo.getLeaseApplyInfo().setCode(taskCode);
@ -162,7 +162,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
bmFileInfo.setTaskId(tmTask.getTaskId()); bmFileInfo.setTaskId(tmTask.getTaskId());
bmFileInfo.setModelId(leaseApplyRequestVo.getLeaseApplyInfo().getId()); bmFileInfo.setModelId(leaseApplyRequestVo.getLeaseApplyInfo().getId());
bmFileInfo.setFileType(5L); bmFileInfo.setFileType(5L);
bmFileInfo.setCreateBy(SecurityUtils.getUsername()); bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
bmFileInfo.setCreateTime(DateUtils.getNowDate()); bmFileInfo.setCreateTime(DateUtils.getNowDate());
bmFileInfoMapper.insertBmFileInfo(bmFileInfo); bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
}); });
@ -177,11 +177,11 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
WorkApplyInfo workApplyInfo = new WorkApplyInfo(); WorkApplyInfo workApplyInfo = new WorkApplyInfo();
workApplyInfo.setId(id); workApplyInfo.setId(id);
workApplyInfo.setTitle("智能机具-领料申请待审核"); workApplyInfo.setTitle("智能机具-领料申请待审核");
workApplyInfo.setCreateUserName(SecurityUtils.getUsername()); workApplyInfo.setCreateUserName(SecurityUtils.getLoginUser().getUsername());
workApplyInfo.setContent(SecurityUtils.getUsername()+":"+leaseApplyRequestVo.getLeaseApplyInfo().getCode()+"-"+leaseApplyRequestVo.getLeaseApplyInfo().getProjectName()); workApplyInfo.setContent(SecurityUtils.getLoginUser().getUsername()+":"+leaseApplyRequestVo.getLeaseApplyInfo().getCode()+"-"+leaseApplyRequestVo.getLeaseApplyInfo().getProjectName());
workApplyInfo.setType(1); workApplyInfo.setType(1);
workApplyInfo.setWebAppId("9fa73f046ef520b09e94bbffc3b07702"); workApplyInfo.setWebAppId("9fa73f046ef520b09e94bbffc3b07702");
workApplyInfo.setSendUserName(SecurityUtils.getUsername()); workApplyInfo.setSendUserName(SecurityUtils.getLoginUser().getUsername());
workApplyInfo.setTypeId(2025050801); workApplyInfo.setTypeId(2025050801);
workApplyInfo.setBusinessId(String.valueOf(newId)); workApplyInfo.setBusinessId(String.valueOf(newId));
workApplyInfo.setNextStatus("待审核"); workApplyInfo.setNextStatus("待审核");
@ -194,7 +194,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
String idPeople = UUID.randomUUID().toString().replace("-", ""); String idPeople = UUID.randomUUID().toString().replace("-", "");
workPeopleInfo.setId(idPeople); workPeopleInfo.setId(idPeople);
workPeopleInfo.setInformationId(id); workPeopleInfo.setInformationId(id);
workPeopleInfo.setReceiverUsername(SecurityUtils.getUsername()); workPeopleInfo.setReceiverUsername(SecurityUtils.getLoginUser().getUsername());
workPeopleInfo.setReadState(0); workPeopleInfo.setReadState(0);
workPeopleInfo.setHandleState(0); workPeopleInfo.setHandleState(0);
workPeopleInfo.setIsExamine(0); workPeopleInfo.setIsExamine(0);
@ -220,7 +220,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
*/ */
@Override @Override
public List<LeaseApplyInfo> selectLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo) { public List<LeaseApplyInfo> selectLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo) {
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getLoginUser().getUserid();
leaseApplyInfo.setUserId(userId == 0 ? null : userId); leaseApplyInfo.setUserId(userId == 0 ? null : userId);
List<LeaseApplyInfo> list = mapper.selectLeaseApplyInfoList(leaseApplyInfo); List<LeaseApplyInfo> list = mapper.selectLeaseApplyInfoList(leaseApplyInfo);
if (!CollectionUtils.isEmpty(list)) { if (!CollectionUtils.isEmpty(list)) {
@ -264,7 +264,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
try { try {
LeaseApplyInfo leaseApplyInfo = new LeaseApplyInfo(); LeaseApplyInfo leaseApplyInfo = new LeaseApplyInfo();
leaseApplyInfo.setId(id); leaseApplyInfo.setId(id);
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getLoginUser().getUserid();
leaseApplyInfo.setUserId(userId); leaseApplyInfo.setUserId(userId);
Optional<LeaseApplyInfo> optionalInfo = Optional.ofNullable(mapper.selectLeaseApplyInfoById(leaseApplyInfo)); Optional<LeaseApplyInfo> optionalInfo = Optional.ofNullable(mapper.selectLeaseApplyInfoById(leaseApplyInfo));
LeaseApplyRequestVo leaseApplyRequestVo = new LeaseApplyRequestVo(); LeaseApplyRequestVo leaseApplyRequestVo = new LeaseApplyRequestVo();
@ -367,7 +367,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
if (leaseApplyInfo != null && leaseApplyInfo.getId() != null) { if (leaseApplyInfo != null && leaseApplyInfo.getId() != null) {
leaseApplyInfo.setUpdateTime(DateUtils.getNowDate()); leaseApplyInfo.setUpdateTime(DateUtils.getNowDate());
leaseApplyInfo.setUpdateBy(SecurityUtils.getUsername()); leaseApplyInfo.setUpdateBy(SecurityUtils.getLoginUser().getUsername());
//修改任务状态 //修改任务状态
mapper.updateLeaseTaskStatus(leaseApplyInfo.getTaskId(),taskStatus); mapper.updateLeaseTaskStatus(leaseApplyInfo.getTaskId(),taskStatus);
@ -387,7 +387,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
fileInfo.setModelId(leaseApplyInfo.getId()); fileInfo.setModelId(leaseApplyInfo.getId());
fileInfo.setTaskType(2); fileInfo.setTaskType(2);
fileInfo.setFileType(5L); fileInfo.setFileType(5L);
fileInfo.setCreateBy(SecurityUtils.getUsername()); fileInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
fileInfo.setCreateTime(DateUtils.getNowDate()); fileInfo.setCreateTime(DateUtils.getNowDate());
bmFileInfoMapper.insertBmFileInfo(fileInfo); bmFileInfoMapper.insertBmFileInfo(fileInfo);
} }
@ -429,7 +429,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
@Override @Override
public List<LeaseApplyInfo> selectAuditLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo) { public List<LeaseApplyInfo> selectAuditLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo) {
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getLoginUser().getUserid();
leaseApplyInfo.setUserId(userId == 0 ? null : userId); leaseApplyInfo.setUserId(userId == 0 ? null : userId);
log.info("用户id为{}",userId); log.info("用户id为{}",userId);
List<LeaseApplyInfo> list = mapper.selectAuditLeaseApplyInfoList(leaseApplyInfo); List<LeaseApplyInfo> list = mapper.selectAuditLeaseApplyInfoList(leaseApplyInfo);
@ -523,7 +523,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
for (LeaseApplyDetails details : leaseApplyDetailsList) { for (LeaseApplyDetails details : leaseApplyDetailsList) {
details.setParentId(parentId); details.setParentId(parentId);
details.setCreateTime(DateUtils.getNowDate()); details.setCreateTime(DateUtils.getNowDate());
details.setCreateBy(SecurityUtils.getUsername()); details.setCreateBy(SecurityUtils.getLoginUser().getUsername());
// maTypeIds 数组转换为用逗号分隔的字符串 // maTypeIds 数组转换为用逗号分隔的字符串
if (details.getMaTypeIds() != null && details.getMaTypeIds().length > 0) { if (details.getMaTypeIds() != null && details.getMaTypeIds().length > 0) {
String maType = Arrays.stream(details.getMaTypeIds()) String maType = Arrays.stream(details.getMaTypeIds())
@ -655,7 +655,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
*/ */
@Override @Override
public List<LeasePublishInfo> getPublishList(LeaseApplyInfo leaseApplyInfo) { public List<LeasePublishInfo> getPublishList(LeaseApplyInfo leaseApplyInfo) {
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getLoginUser().getUserid();
leaseApplyInfo.setUserId(userId == 0 ? null : userId); leaseApplyInfo.setUserId(userId == 0 ? null : userId);
List<LeasePublishInfo> list = mapper.getPublishList(leaseApplyInfo); List<LeasePublishInfo> list = mapper.getPublishList(leaseApplyInfo);
if (!CollectionUtils.isEmpty(list)) { if (!CollectionUtils.isEmpty(list)) {
@ -741,7 +741,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
applyDetails.setProjectId(leaseApplyInfo.getProjectId()); applyDetails.setProjectId(leaseApplyInfo.getProjectId());
applyDetails.setLeasePerson(leaseApplyInfo.getLeasePerson() != null ? leaseApplyInfo.getLeasePerson() : ""); applyDetails.setLeasePerson(leaseApplyInfo.getLeasePerson() != null ? leaseApplyInfo.getLeasePerson() : "");
applyDetails.setPhone(leaseApplyInfo.getPhone() != null ? leaseApplyInfo.getPhone() : ""); applyDetails.setPhone(leaseApplyInfo.getPhone() != null ? leaseApplyInfo.getPhone() : "");
applyDetails.setCreateBy(SecurityUtils.getUserId().toString()); applyDetails.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
applyDetails.setCreateTime(DateUtils.getNowDate()); applyDetails.setCreateTime(DateUtils.getNowDate());
applyDetails.setMonthOrder(thisMonthMaxOrder + 1); applyDetails.setMonthOrder(thisMonthMaxOrder + 1);
String publishTask = genderPublishTask(thisMonthMaxOrder); String publishTask = genderPublishTask(thisMonthMaxOrder);

View File

@ -151,7 +151,7 @@ public class LossAssessmentServiceImpl implements LossAssessmentService {
bean.setRemark(repairPartDetails.getRemark()); bean.setRemark(repairPartDetails.getRemark());
mapper.updateRepairer(bean); mapper.updateRepairer(bean);
} else { } else {
bean.setRepairer(SecurityUtils.getUsername()); bean.setRepairer(SecurityUtils.getLoginUser().getUsername());
mapper.updateRepairer(bean); mapper.updateRepairer(bean);
} }
// 统一处理配件集合数据 // 统一处理配件集合数据
@ -233,7 +233,7 @@ public class LossAssessmentServiceImpl implements LossAssessmentService {
mapper.updateSingleTaskStatus(task, loginUser.getUserid(), RepairTaskStatusEnum.TASK_LOSS_ASSESSMENT_COMPLETE.getStatus()); mapper.updateSingleTaskStatus(task, loginUser.getUserid(), RepairTaskStatusEnum.TASK_LOSS_ASSESSMENT_COMPLETE.getStatus());
//3重新生成维修数据 //3重新生成维修数据
for (RepairTaskDetails repairTaskDetails : detailsList){ for (RepairTaskDetails repairTaskDetails : detailsList){
repairTaskDetails.setCreateBy(SecurityUtils.getUsername()); repairTaskDetails.setCreateBy(SecurityUtils.getLoginUser().getUsername());
mapper.insertRad(repairTaskDetails); mapper.insertRad(repairTaskDetails);
} }
} }

View File

@ -96,7 +96,6 @@ public class DirectApplyExportInfo {
*/ */
private String backPhone; private String backPhone;
@Excel(name = "转让方联系人及电话", sort = 5, width = 30)
private String backManAndPhone; private String backManAndPhone;
/** /**
* 退料备注 * 退料备注
@ -115,19 +114,13 @@ public class DirectApplyExportInfo {
*/ */
private String leasePhone; private String leasePhone;
@Excel(name = "接收方联系人及电话", sort = 6, width = 30)
private String leaseManAndPhone; private String leaseManAndPhone;
/** /**
* 领料备注 * 领料备注
*/ */
private String leaseRemark; private String leaseRemark;
@JsonFormat( @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
pattern = "yyyy-MM-dd HH:mm:ss"
)
@Excel(
name = "办理时间", sort = 7,width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss"
)
private Date createTimeTwo; private Date createTimeTwo;
/** /**
* 直转附件 * 直转附件
@ -142,7 +135,7 @@ public class DirectApplyExportInfo {
/** /**
* 0待审批1审批同意2驳回 * 0待审批1审批同意2驳回
*/ */
@Excel(name = "状态", sort = 8, readConverterExp = "0=待审核, 1=审核中, 2=已完成, 3=已驳回") @Excel(name = "状态", sort = 8, readConverterExp = "0=待审核,1=审核中,2=已完成,3=已驳回")
private String status; private String status;
/** /**
* 审核人 * 审核人

View File

@ -81,7 +81,7 @@ public class DirectRotationImpl implements DirectRotationService {
// //使用逗号拼接 // //使用逗号拼接
// directApplyInfos.setDirUrl(String.join(",", directApplyInfoDetails.getDirectApplyInfo().getDirUrls())); // directApplyInfos.setDirUrl(String.join(",", directApplyInfoDetails.getDirectApplyInfo().getDirUrls()));
// } // }
directApplyInfos.setCreateBy(SecurityUtils.getUserId().toString()); directApplyInfos.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
int i = workSiteDirectManageService.saveDirectApplyInfo(directApplyInfos); int i = workSiteDirectManageService.saveDirectApplyInfo(directApplyInfos);
if (i < 0) { if (i < 0) {
return AjaxResult.error("保存失败"); return AjaxResult.error("保存失败");
@ -127,7 +127,7 @@ public class DirectRotationImpl implements DirectRotationService {
his.setNodeId(9); his.setNodeId(9);
his.setNextNodeId(10); his.setNextNodeId(10);
his.setIsAccept(1); his.setIsAccept(1);
his.setCreateBy(SecurityUtils.getUsername()); his.setCreateBy(SecurityUtils.getLoginUser().getUsername());
his.setCreateTime(new Date()); his.setCreateTime(new Date());
hisMapper.addSysWorkflowRecordHistory(his) ; hisMapper.addSysWorkflowRecordHistory(his) ;

View File

@ -56,7 +56,7 @@ public class PartTypeServiceImpl implements IPartTypeService
List<TreeNode> groupList = new ArrayList<>(); List<TreeNode> groupList = new ArrayList<>();
List<TreeNode> list = new ArrayList<>(); List<TreeNode> list = new ArrayList<>();
try { try {
String userId = SecurityUtils.getUserId().toString(); String userId = SecurityUtils.getLoginUser().getUserid().toString();
partType.setCreateBy(userId); partType.setCreateBy(userId);
List<PartType> partTypeList = partTypeMapper.select(partType); List<PartType> partTypeList = partTypeMapper.select(partType);
list = partTypeMapper.selectPartTypeList(partType); list = partTypeMapper.selectPartTypeList(partType);
@ -127,7 +127,7 @@ public class PartTypeServiceImpl implements IPartTypeService
return AjaxResult.error(HttpCodeEnum.NAME_DUPLICATE.getCode(), HttpCodeEnum.NAME_DUPLICATE.getMsg()); return AjaxResult.error(HttpCodeEnum.NAME_DUPLICATE.getCode(), HttpCodeEnum.NAME_DUPLICATE.getMsg());
} }
partType.setCreateTime(DateUtils.getNowDate()); partType.setCreateTime(DateUtils.getNowDate());
partType.setCreateBy(SecurityUtils.getUserId().toString()); partType.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
partType.setParentId(partType.getId() != 0 ? partType.getId() : 0L); partType.setParentId(partType.getId() != 0 ? partType.getId() : 0L);
partType.setLevel(partType.getLevel() != null ? String.valueOf(Integer.valueOf(partType.getLevel()) + 1) : "1"); partType.setLevel(partType.getLevel() != null ? String.valueOf(Integer.valueOf(partType.getLevel()) + 1) : "1");
int result = partTypeMapper.insertPartType(partType); int result = partTypeMapper.insertPartType(partType);
@ -157,7 +157,7 @@ public class PartTypeServiceImpl implements IPartTypeService
} }
} }
partType.setUpdateTime(DateUtils.getNowDate()); partType.setUpdateTime(DateUtils.getNowDate());
partType.setUpdateBy(SecurityUtils.getUserId().toString()); partType.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
int result = partTypeMapper.updatePartType(partType); int result = partTypeMapper.updatePartType(partType);
if (result > 0) { if (result > 0) {
return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg(), result); return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg(), result);

View File

@ -129,7 +129,7 @@ public class StandardConfigManageServiceImpl implements StandardConfigManageServ
} }
bean.setLevel(String.valueOf(2)); bean.setLevel(String.valueOf(2));
bean.setCreateTime(DateUtils.getNowDate()); bean.setCreateTime(DateUtils.getNowDate());
bean.setCreateBy(SecurityUtils.getUserId().toString()); bean.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
int count = mapper.insertConfig(bean); int count = mapper.insertConfig(bean);
return count; return count;
} }
@ -142,7 +142,7 @@ public class StandardConfigManageServiceImpl implements StandardConfigManageServ
throw new RuntimeException("同级下类型配置存在重复!"); throw new RuntimeException("同级下类型配置存在重复!");
} }
bean.setUpdateTime(DateUtils.getNowDate()); bean.setUpdateTime(DateUtils.getNowDate());
bean.setUpdateBy(SecurityUtils.getUserId().toString()); bean.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
int updateResult = mapper.updateConfig(bean); int updateResult = mapper.updateConfig(bean);
return updateResult; return updateResult;
} }
@ -158,7 +158,7 @@ public class StandardConfigManageServiceImpl implements StandardConfigManageServ
// return AjaxResult.error("该类型下有子类型,无法删除"); // return AjaxResult.error("该类型下有子类型,无法删除");
// } // }
bean.setUpdateTime(DateUtils.getNowDate()); bean.setUpdateTime(DateUtils.getNowDate());
bean.setUpdateBy(SecurityUtils.getUserId().toString()); bean.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
int result = mapper.deleteConfigByConfigId(bean); int result = mapper.deleteConfigByConfigId(bean);
int result2 = mapper.deleteConfigDetailByConfigId(bean); int result2 = mapper.deleteConfigDetailByConfigId(bean);
if (result > 0) { if (result > 0) {
@ -181,7 +181,7 @@ public class StandardConfigManageServiceImpl implements StandardConfigManageServ
throw new Exception("该类型下已存在该配置!"); throw new Exception("该类型下已存在该配置!");
} }
bean1.setCreateTime(DateUtils.getNowDate()); bean1.setCreateTime(DateUtils.getNowDate());
bean1.setCreateBy(SecurityUtils.getUserId().toString()); bean1.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
int result = mapper.addConfigDetails(bean1); int result = mapper.addConfigDetails(bean1);
if(result <= 0){ if(result <= 0){
throw new Exception("操作失败!"); throw new Exception("操作失败!");
@ -195,7 +195,7 @@ public class StandardConfigManageServiceImpl implements StandardConfigManageServ
public int updateConfigDetails(StandardConfigDetailsVo bean) { public int updateConfigDetails(StandardConfigDetailsVo bean) {
try { try {
bean.setUpdateTime(DateUtils.getNowDate()); bean.setUpdateTime(DateUtils.getNowDate());
bean.setUpdateBy(SecurityUtils.getUserId().toString()); bean.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
int result = mapper.updateConfigDetails(bean); int result = mapper.updateConfigDetails(bean);
return result; return result;
} catch (Exception e) { } catch (Exception e) {

View File

@ -410,7 +410,7 @@ public class TypeServiceImpl implements ITypeService {
} }
type.setLevel(String.valueOf(Integer.parseInt(type.getLevel()) + 1)); type.setLevel(String.valueOf(Integer.parseInt(type.getLevel()) + 1));
type.setCreateTime(DateUtils.getNowDate()); type.setCreateTime(DateUtils.getNowDate());
type.setCreateBy(SecurityUtils.getUserId().toString()); type.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
int count = typeMapper.insertType(type); int count = typeMapper.insertType(type);
if ((type.getParentId()).equals(0L)) { if ((type.getParentId()).equals(0L)) {
// 插入wh_house_set建立仓库和type的关系 // 插入wh_house_set建立仓库和type的关系
@ -488,7 +488,7 @@ public class TypeServiceImpl implements ITypeService {
} }
type.setUpdateTime(DateUtils.getNowDate()); type.setUpdateTime(DateUtils.getNowDate());
type.setUpdateBy(SecurityUtils.getUserId().toString()); type.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
int updateTypeResult = typeMapper.updateType(type); int updateTypeResult = typeMapper.updateType(type);
// 判断是否更新租赁价格 // 判断是否更新租赁价格
if (updateTypeResult > 0 && null != type.getIsUpdateLeasePrice() && type.getIsUpdateLeasePrice()) { if (updateTypeResult > 0 && null != type.getIsUpdateLeasePrice() && type.getIsUpdateLeasePrice()) {
@ -498,7 +498,7 @@ public class TypeServiceImpl implements ITypeService {
maTypeHistory.setCreateTime(LocalDateTime.now()); maTypeHistory.setCreateTime(LocalDateTime.now());
maTypeHistory.setBeforePrice(oriLeasePrice); maTypeHistory.setBeforePrice(oriLeasePrice);
maTypeHistory.setAfterPrice(type.getLeasePrice()); maTypeHistory.setAfterPrice(type.getLeasePrice());
maTypeHistory.setCreateBy(SecurityUtils.getUsername()); maTypeHistory.setCreateBy(SecurityUtils.getLoginUser().getUsername());
typeMapper.insertMaTypeLeasePriceHistory(maTypeHistory); typeMapper.insertMaTypeLeasePriceHistory(maTypeHistory);
SltAgreementInfo sltAgreementInfo = new SltAgreementInfo(); SltAgreementInfo sltAgreementInfo = new SltAgreementInfo();

View File

@ -352,7 +352,7 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService {
if (StringUtils.isNotBlank(directApplyInfoDetails.getId())) { if (StringUtils.isNotBlank(directApplyInfoDetails.getId())) {
DirectApplyInfo directApplyInfos = getDirectApplyInfoById(directApplyInfoDetails.getId()); DirectApplyInfo directApplyInfos = getDirectApplyInfoById(directApplyInfoDetails.getId());
directApplyInfos.setStatus("1"); directApplyInfos.setStatus("1");
directApplyInfos.setAuditor(SecurityUtils.getUsername()); directApplyInfos.setAuditor(SecurityUtils.getLoginUser().getUsername());
directApplyInfos.setAuditTime(DateUtils.getNowDate()); directApplyInfos.setAuditTime(DateUtils.getNowDate());
res = refuseDirectApplyInfo(directApplyInfos); res = refuseDirectApplyInfo(directApplyInfos);
} else { } else {

View File

@ -93,7 +93,7 @@ public class PartLeaseServiceImpl implements PartLeaseService {
} }
int thisMonthMaxOrder = partLeaseMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth()); int thisMonthMaxOrder = partLeaseMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth());
final String taskCode = genderTaskCode(thisMonthMaxOrder); final String taskCode = genderTaskCode(thisMonthMaxOrder);
partLeaseInfo.setCode(taskCode).setMonthOrder(thisMonthMaxOrder + 1).setCreator(SecurityUtils.getUserId().toString()) partLeaseInfo.setCode(taskCode).setMonthOrder(thisMonthMaxOrder + 1).setCreator(SecurityUtils.getLoginUser().getUserid().toString())
.setCreateTime(DateUtils.getNowDate()); .setCreateTime(DateUtils.getNowDate());
final int insertPartLeaseInfo = partLeaseMapper.insertPartLeaseInfo(partLeaseInfo); final int insertPartLeaseInfo = partLeaseMapper.insertPartLeaseInfo(partLeaseInfo);
final int batchDetailsNum; final int batchDetailsNum;
@ -260,7 +260,7 @@ public class PartLeaseServiceImpl implements PartLeaseService {
partLeaseInfo.getTaskStatus() == null || partLeaseInfo.getTaskId() == null) { partLeaseInfo.getTaskStatus() == null || partLeaseInfo.getTaskId() == null) {
return AjaxResult.error("配件领用审核信息不能为空"); return AjaxResult.error("配件领用审核信息不能为空");
} }
String userId = SecurityUtils.getUserId().toString(); String userId = SecurityUtils.getLoginUser().getUserid().toString();
String createBy = null; String createBy = null;
PartLeaseInfo info = partLeaseMapper.selectPartLeaseInfoById(partLeaseInfo.getTaskId()); PartLeaseInfo info = partLeaseMapper.selectPartLeaseInfoById(partLeaseInfo.getTaskId());
if (info != null) { if (info != null) {

View File

@ -146,7 +146,7 @@ public class PurchaseBindServiceImpl implements IPurchaseBindService {
} }
} }
for (final PurchaseDto purchaseDto : dto.getDtoList()) { for (final PurchaseDto purchaseDto : dto.getDtoList()) {
purchaseDto.setCreateBy(SecurityUtils.getUserId().toString()).setCreateTime(DateUtils.getNowDate()); purchaseDto.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString()).setCreateTime(DateUtils.getNowDate());
purchaseDto.setTaskId(dto.getTaskId()).setTypeId(dto.getTypeId()).setStatus(0); purchaseDto.setTaskId(dto.getTaskId()).setTypeId(dto.getTypeId()).setStatus(0);
if (null != purchaseDto.getQrCode()) { if (null != purchaseDto.getQrCode()) {
if (1 != purchaseBindMapper.bindMaCodeByQrCode(purchaseDto)) { if (1 != purchaseBindMapper.bindMaCodeByQrCode(purchaseDto)) {
@ -346,7 +346,7 @@ public class PurchaseBindServiceImpl implements IPurchaseBindService {
} }
QrCodeUtils.generateQRImage(url, saveDirectory, code + ".jpg", format); QrCodeUtils.generateQRImage(url, saveDirectory, code + ".jpg", format);
String qrUrl = saveDirectory + code + ".jpg"; String qrUrl = saveDirectory + code + ".jpg";
PurchaseDto dto = PurchaseDto.builder().taskId(purchaseDto.getTaskId()).typeId(typeId).qrCode(code).qrUrl(qrUrl).createBy(SecurityUtils.getUserId().toString()).build(); PurchaseDto dto = PurchaseDto.builder().taskId(purchaseDto.getTaskId()).typeId(typeId).qrCode(code).qrUrl(qrUrl).createBy(SecurityUtils.getLoginUser().getUserid().toString()).build();
purchaseBindMapper.insert(dto); purchaseBindMapper.insert(dto);
extracted( addedEntries, zos, materialModel, materialName, code, qrUrl); extracted( addedEntries, zos, materialModel, materialName, code, qrUrl);
} }

View File

@ -4,6 +4,10 @@ import java.util.List;
import java.util.Objects; import java.util.Objects;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.json.JSONObject;
import com.ah.sbd.SmsTool;
import com.ah.sbd.utils.param.SmsParam;
import com.bonus.common.biz.constant.BmConfigItems;
import com.bonus.common.biz.enums.PurchaseTaskStatusEnum; import com.bonus.common.biz.enums.PurchaseTaskStatusEnum;
import com.bonus.common.biz.enums.TmTaskTypeEnum; import com.bonus.common.biz.enums.TmTaskTypeEnum;
import com.bonus.common.core.exception.ServiceException; import com.bonus.common.core.exception.ServiceException;
@ -109,8 +113,8 @@ public class PurchaseNoticePersonServiceImpl implements IPurchaseNoticePersonSer
String splitPhoneNumber = String.join(",", purchaseNoticePersonDto.getPhoneNumbers()); String splitPhoneNumber = String.join(",", purchaseNoticePersonDto.getPhoneNumbers());
try { try {
// 省公司短信发送 // 省公司短信发送
//JSONObject sendResult = SmsTool.sendSms(new SmsParam(splitPhoneNumber, purchaseNoticePersonDto.getContent()), BmConfigItems.ANHUI_COMPANY_SMS_KEY); JSONObject sendResult = SmsTool.sendSms(new SmsParam(splitPhoneNumber, purchaseNoticePersonDto.getContent()), BmConfigItems.ANHUI_COMPANY_SMS_KEY);
String sendResult = SmsUtils.smsToken(splitPhoneNumber, purchaseNoticePersonDto.getContent(),""); //String sendResult = SmsUtils.smsToken(splitPhoneNumber, purchaseNoticePersonDto.getContent(),"");
if (sendResult != null) { if (sendResult != null) {
// 发送短信后修改任务状态 // 发送短信后修改任务状态
if (purchaseNoticePersonDto.getIsPartFlag() != null && purchaseNoticePersonDto.getIsPartFlag() == 0) { if (purchaseNoticePersonDto.getIsPartFlag() != null && purchaseNoticePersonDto.getIsPartFlag() == 0) {

View File

@ -53,7 +53,7 @@ public class DerateRecordQueryServiceImpl implements IDerateReocrdQueryService {
@Override @Override
public List<SltAgreementReduce> getAuditList(SltAgreementInfo bean) { public List<SltAgreementReduce> getAuditList(SltAgreementInfo bean) {
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getLoginUser().getUserid();
bean.setUserId(userId); bean.setUserId(userId);
List<SltAgreementReduce> sltAgreementReduceList = mapper.getAuditList(bean); List<SltAgreementReduce> sltAgreementReduceList = mapper.getAuditList(bean);
try { try {

View File

@ -537,7 +537,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
task.setTaskId(auditDetails.getTaskId()); task.setTaskId(auditDetails.getTaskId());
Long agreementId = repairMapper.getAgreementId(task); Long agreementId = repairMapper.getAgreementId(task);
// 插入任务表 // 插入任务表
Long newTaskId = insertWxTt(SecurityUtils.getUsername()); Long newTaskId = insertWxTt(SecurityUtils.getLoginUser().getUsername());
// 插入协议任务表 // 插入协议任务表
insertTta(newTaskId, agreementId); insertTta(newTaskId, agreementId);
// 处理 -- 修饰审核任务状态 // 处理 -- 修饰审核任务状态
@ -569,7 +569,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
repairTaskDetails.setMaId(repairAuditDetail.getMaId() == null ? null : repairAuditDetail.getMaId().toString()); repairTaskDetails.setMaId(repairAuditDetail.getMaId() == null ? null : repairAuditDetail.getMaId().toString());
repairTaskDetails.setTypeId(repairAuditDetail.getTypeId().toString()); repairTaskDetails.setTypeId(repairAuditDetail.getTypeId().toString());
repairTaskDetails.setRepairNum(repairAuditDetail.getRepairNum()); repairTaskDetails.setRepairNum(repairAuditDetail.getRepairNum());
repairTaskDetails.setCreateBy(SecurityUtils.getUsername()); repairTaskDetails.setCreateBy(SecurityUtils.getLoginUser().getUsername());
repairTaskDetails.setBackId(backId == null ? null : backId); repairTaskDetails.setBackId(backId == null ? null : backId);
repairMapper.insertRepaired(repairTaskDetails); repairMapper.insertRepaired(repairTaskDetails);
} }
@ -583,7 +583,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
.map(RepairAuditDetails::getId) .map(RepairAuditDetails::getId)
.filter(Objects::nonNull) .filter(Objects::nonNull)
.collect(Collectors.toList()); .collect(Collectors.toList());
Long auditBy = SecurityUtils.getUserId(); Long auditBy = SecurityUtils.getLoginUser().getUserid();
return repairAuditDetailsMapper.updateRepairAuditDetailsBatch(ids, String.valueOf(status), auditBy); return repairAuditDetailsMapper.updateRepairAuditDetailsBatch(ids, String.valueOf(status), auditBy);
} catch (final Exception e) { } catch (final Exception e) {
throw new ServiceException("错误信息描述"); throw new ServiceException("错误信息描述");
@ -667,7 +667,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
} }
try { try {
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getLoginUser().getUserid();
int result = repairAuditDetailsMapper.updateRepairAuditDetailsBatch(ids, status, userId); int result = repairAuditDetailsMapper.updateRepairAuditDetailsBatch(ids, status, userId);
// 根据任务id查询内层详情任务状态更新外层任务状态 // 根据任务id查询内层详情任务状态更新外层任务状态
List<RepairAuditDetails> repairAuditDetailsByTaskId = repairAuditDetailsMapper.selectRepairAuditDetailsByTaskId(auditDetails1.getTaskId()); List<RepairAuditDetails> repairAuditDetailsByTaskId = repairAuditDetailsMapper.selectRepairAuditDetailsByTaskId(auditDetails1.getTaskId());
@ -749,7 +749,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
inputVo.setAuditId(details.getId()); inputVo.setAuditId(details.getId());
inputVo.setStatus("0"); inputVo.setStatus("0");
inputVo.setTaskId(newTaskId); inputVo.setTaskId(newTaskId);
inputVo.setCreateBy(String.valueOf(SecurityUtils.getUserId())); inputVo.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
inputList.add(inputVo); inputList.add(inputVo);
} }
if (details.getScrapNum().compareTo(BigDecimal.ZERO) > 0) { if (details.getScrapNum().compareTo(BigDecimal.ZERO) > 0) {
@ -777,7 +777,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
if (bean != null) { if (bean != null) {
scrapApplyDetails.setScrapReason(bean.getScrapReason() == null ? "" : bean.getScrapReason()); scrapApplyDetails.setScrapReason(bean.getScrapReason() == null ? "" : bean.getScrapReason());
scrapApplyDetails.setScrapType(bean.getScrapType() == null ? null : bean.getScrapType()); scrapApplyDetails.setScrapType(bean.getScrapType() == null ? null : bean.getScrapType());
scrapApplyDetails.setCreateBy(bean.getCreateBy() == null ? SecurityUtils.getUsername() : bean.getCreateBy()); scrapApplyDetails.setCreateBy(bean.getCreateBy() == null ? SecurityUtils.getLoginUser().getUsername() : bean.getCreateBy());
} }
scrapApplyDetailsMapper.insertScrapApplyDetails(scrapApplyDetails); scrapApplyDetailsMapper.insertScrapApplyDetails(scrapApplyDetails);
} }
@ -796,7 +796,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
private void insertScrapTta(Long newScrapTaskId, Long agreementId) { private void insertScrapTta(Long newScrapTaskId, Long agreementId) {
final TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(newScrapTaskId, agreementId); final TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(newScrapTaskId, agreementId);
tmTaskAgreement.setCreateTime(DateUtils.getNowDate()); tmTaskAgreement.setCreateTime(DateUtils.getNowDate());
tmTaskAgreement.setCreateBy(SecurityUtils.getUsername()); tmTaskAgreement.setCreateBy(SecurityUtils.getLoginUser().getUsername());
taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement); taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
} }
@ -812,7 +812,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_SCRAP.getTaskTypeId(), ScrapTaskStatusEnum.SCRAP_TASK_NO_FINISHED.getStatus(), TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_SCRAP.getTaskTypeId(), ScrapTaskStatusEnum.SCRAP_TASK_NO_FINISHED.getStatus(),
null,thisMonthMaxOrder + 1, code); null,thisMonthMaxOrder + 1, code);
tmTask.setCreateTime(DateUtils.getNowDate()); tmTask.setCreateTime(DateUtils.getNowDate());
tmTask.setCreateBy(SecurityUtils.getUsername()); tmTask.setCreateBy(SecurityUtils.getLoginUser().getUsername());
// 插入任务 // 插入任务
int taskId = taskMapper.insertTmTask(tmTask); int taskId = taskMapper.insertTmTask(tmTask);
// 如果插入成功且返回的 taskId 大于 0 // 如果插入成功且返回的 taskId 大于 0
@ -843,7 +843,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
private void insertTta(Long newTaskId, Long agreementId) { private void insertTta(Long newTaskId, Long agreementId) {
final TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(newTaskId, agreementId); final TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(newTaskId, agreementId);
tmTaskAgreement.setCreateTime(DateUtils.getNowDate()); tmTaskAgreement.setCreateTime(DateUtils.getNowDate());
tmTaskAgreement.setCreateBy(SecurityUtils.getUsername()); tmTaskAgreement.setCreateBy(SecurityUtils.getLoginUser().getUsername());
taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement); taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
} }
@ -859,7 +859,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_REPAIR_INPUT.getTaskTypeId(), RepairInputStatusEnum.INPUT_TASK_NO_FINISHED.getStatus(), TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_REPAIR_INPUT.getTaskTypeId(), RepairInputStatusEnum.INPUT_TASK_NO_FINISHED.getStatus(),
null,thisMonthMaxOrder + 1, code); null,thisMonthMaxOrder + 1, code);
tmTask.setCreateTime(DateUtils.getNowDate()); tmTask.setCreateTime(DateUtils.getNowDate());
tmTask.setCreateBy(SecurityUtils.getUsername()); tmTask.setCreateBy(SecurityUtils.getLoginUser().getUsername());
// 插入任务 // 插入任务
int taskId = taskMapper.insertTmTask(tmTask); int taskId = taskMapper.insertTmTask(tmTask);
// 如果插入成功且返回的 taskId 大于 0 // 如果插入成功且返回的 taskId 大于 0

View File

@ -334,7 +334,7 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
result += updateRepairRejectDetails(repairInputInfo); result += updateRepairRejectDetails(repairInputInfo);
//插入协议表 //插入协议表
repairInputDetails1.setTypeId(repairInputInfo.getTypeId()); repairInputDetails1.setTypeId(repairInputInfo.getTypeId());
repairInputDetails1.setCreateBy(SecurityUtils.getUsername()); repairInputDetails1.setCreateBy(SecurityUtils.getLoginUser().getUsername());
repairInputDetails1.setTaskId(newTaskId); repairInputDetails1.setTaskId(newTaskId);
repairInputDetails1.setMaId(repairInputInfo.getMaId()); repairInputDetails1.setMaId(repairInputInfo.getMaId());
repairInputDetails1.setRejectNum(repairInputInfo.getPendingInputNum()); repairInputDetails1.setRejectNum(repairInputInfo.getPendingInputNum());
@ -362,9 +362,9 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
inputDetails.setMaId(repairInputInfo.getMaId() == null ? null : repairInputInfo.getMaId()); inputDetails.setMaId(repairInputInfo.getMaId() == null ? null : repairInputInfo.getMaId());
inputDetails.setTaskId(repairInputInfo.getTaskId()); inputDetails.setTaskId(repairInputInfo.getTaskId());
inputDetails.setTypeId(repairInputInfo.getTypeId()); inputDetails.setTypeId(repairInputInfo.getTypeId());
inputDetails.setUpdateBy(SecurityUtils.getUserId().toString()); inputDetails.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
inputDetails.setUpdateTime(DateUtils.getNowDate()); inputDetails.setUpdateTime(DateUtils.getNowDate());
inputDetails.setAuditBy(SecurityUtils.getUserId()); inputDetails.setAuditBy(SecurityUtils.getLoginUser().getUserid());
inputDetails.setAuditTime(DateUtils.getNowDate()); inputDetails.setAuditTime(DateUtils.getNowDate());
result += repairInputDetailsMapper.updateRepairInputDetails(inputDetails); result += repairInputDetailsMapper.updateRepairInputDetails(inputDetails);
@ -390,8 +390,8 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
} }
//根据任务id查询退料id //根据任务id查询退料id
Long backId = repairInputDetailsMapper.selectBackIdByTaskId(repairInputDetails.getTaskId()); Long backId = repairInputDetailsMapper.selectBackIdByTaskId(repairInputDetails.getTaskId());
repairInputDetails.setCreateBy(SecurityUtils.getUsername()); repairInputDetails.setCreateBy(SecurityUtils.getLoginUser().getUsername());
repairInputDetails.setUpdateBy(SecurityUtils.getUserId().toString()); repairInputDetails.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
repairInputDetails.setUpdateTime(DateUtils.getNowDate()); repairInputDetails.setUpdateTime(DateUtils.getNowDate());
repairInputDetails.setBackId(backId); repairInputDetails.setBackId(backId);
// 编码类型驳回 // 编码类型驳回
@ -420,12 +420,12 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
inputDetails.setTaskId(repairInputDetails.getTaskId()); inputDetails.setTaskId(repairInputDetails.getTaskId());
inputDetails.setTypeId(repairInputDetails.getTypeId()); inputDetails.setTypeId(repairInputDetails.getTypeId());
inputDetails.setRejectNum(BigDecimal.valueOf(1)); inputDetails.setRejectNum(BigDecimal.valueOf(1));
inputDetails.setUpdateBy(SecurityUtils.getUserId().toString()); inputDetails.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
inputDetails.setUpdateTime(DateUtils.getNowDate()); inputDetails.setUpdateTime(DateUtils.getNowDate());
inputDetails.setCreateBy(SecurityUtils.getUsername()); inputDetails.setCreateBy(SecurityUtils.getLoginUser().getUsername());
inputDetails.setRejectReason(repairInputDetails.getRejectReason()); inputDetails.setRejectReason(repairInputDetails.getRejectReason());
inputDetails.setBackId(repairInputDetails.getBackId()); inputDetails.setBackId(repairInputDetails.getBackId());
inputDetails.setAuditBy(SecurityUtils.getUserId()); inputDetails.setAuditBy(SecurityUtils.getLoginUser().getUserid());
inputDetails.setAuditTime(DateUtils.getNowDate()); inputDetails.setAuditTime(DateUtils.getNowDate());
result += repairInputDetailsMapper.updateRepairInputDetails(inputDetails); result += repairInputDetailsMapper.updateRepairInputDetails(inputDetails);
inputDetails.setStatus(MaMachineStatusEnum.BACK_REPAIR.getStatus().toString()); inputDetails.setStatus(MaMachineStatusEnum.BACK_REPAIR.getStatus().toString());
@ -446,7 +446,7 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
private int processQuantityTypeReject(RepairInputDetails repairInputDetails) { private int processQuantityTypeReject(RepairInputDetails repairInputDetails) {
int result = 0; int result = 0;
repairInputDetails.setStatus(repairInputDetails.getRejectNum().equals(repairInputDetails.getPendingInputNum()) ? "2" : "0"); repairInputDetails.setStatus(repairInputDetails.getRejectNum().equals(repairInputDetails.getPendingInputNum()) ? "2" : "0");
repairInputDetails.setAuditBy(SecurityUtils.getUserId()); repairInputDetails.setAuditBy(SecurityUtils.getLoginUser().getUserid());
repairInputDetails.setAuditTime(DateUtils.getNowDate()); repairInputDetails.setAuditTime(DateUtils.getNowDate());
result += repairInputDetailsMapper.updateRepairInputDetails(repairInputDetails); result += repairInputDetailsMapper.updateRepairInputDetails(repairInputDetails);
if (result > 0) { if (result > 0) {
@ -484,7 +484,7 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
String agreementId = String.valueOf(repairInputDetails.getAgreementId()); String agreementId = String.valueOf(repairInputDetails.getAgreementId());
TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(newTaskId, Long.parseLong(agreementId)); TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(newTaskId, Long.parseLong(agreementId));
tmTaskAgreement.setCreateTime(DateUtils.getNowDate()); tmTaskAgreement.setCreateTime(DateUtils.getNowDate());
tmTaskAgreement.setCreateBy(SecurityUtils.getUsername()); tmTaskAgreement.setCreateBy(SecurityUtils.getLoginUser().getUsername());
res = taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement); res = taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
return res; return res;
} }
@ -501,7 +501,7 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_REPAIR.getTaskTypeId(), BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus(), TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_REPAIR.getTaskTypeId(), BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus(),
null,thisMonthMaxOrder + 1, code); null,thisMonthMaxOrder + 1, code);
tmTask.setCreateTime(DateUtils.getNowDate()); tmTask.setCreateTime(DateUtils.getNowDate());
tmTask.setCreateBy(SecurityUtils.getUsername()); tmTask.setCreateBy(SecurityUtils.getLoginUser().getUsername());
tmTask.setPreTaskId(preTaskId); tmTask.setPreTaskId(preTaskId);
// 插入任务 // 插入任务
int taskId = taskMapper.insertTmTask(tmTask); int taskId = taskMapper.insertTmTask(tmTask);
@ -540,7 +540,7 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
throw new ServiceException("入库数量不能大于预入库数量"); throw new ServiceException("入库数量不能大于预入库数量");
} }
} }
repairInputDetails.setUpdateBy(SecurityUtils.getUserId().toString()); repairInputDetails.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
repairInputDetails.setUpdateTime(DateUtils.getNowDate()); repairInputDetails.setUpdateTime(DateUtils.getNowDate());
// 编码类型入库 // 编码类型入库
@ -589,9 +589,9 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
inputDetails.setTaskId(repairInputDetails.getTaskId()); inputDetails.setTaskId(repairInputDetails.getTaskId());
inputDetails.setTypeId(repairInputDetails.getTypeId()); inputDetails.setTypeId(repairInputDetails.getTypeId());
inputDetails.setInputNum(BigDecimal.valueOf(1)); inputDetails.setInputNum(BigDecimal.valueOf(1));
inputDetails.setUpdateBy(SecurityUtils.getUserId().toString()); inputDetails.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
inputDetails.setUpdateTime(DateUtils.getNowDate()); inputDetails.setUpdateTime(DateUtils.getNowDate());
inputDetails.setAuditBy(SecurityUtils.getUserId()); inputDetails.setAuditBy(SecurityUtils.getLoginUser().getUserid());
inputDetails.setAuditTime(DateUtils.getNowDate()); inputDetails.setAuditTime(DateUtils.getNowDate());
result += repairInputDetailsMapper.updateRepairInputDetails(inputDetails); result += repairInputDetailsMapper.updateRepairInputDetails(inputDetails);
inputDetails.setStatus(MaMachineStatusEnum.IN_STORE.getStatus().toString()); inputDetails.setStatus(MaMachineStatusEnum.IN_STORE.getStatus().toString());
@ -611,7 +611,7 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
private int processQuantityTypeStorage(RepairInputDetails repairInputDetails) { private int processQuantityTypeStorage(RepairInputDetails repairInputDetails) {
int result = 0; int result = 0;
repairInputDetails.setStatus(repairInputDetails.getInputNum().equals(repairInputDetails.getPendingInputNum()) ? "1" : "0"); repairInputDetails.setStatus(repairInputDetails.getInputNum().equals(repairInputDetails.getPendingInputNum()) ? "1" : "0");
repairInputDetails.setAuditBy(SecurityUtils.getUserId()); repairInputDetails.setAuditBy(SecurityUtils.getLoginUser().getUserid());
repairInputDetails.setAuditTime(DateUtils.getNowDate()); repairInputDetails.setAuditTime(DateUtils.getNowDate());
result += repairInputDetailsMapper.updateRepairInputDetails(repairInputDetails); result += repairInputDetailsMapper.updateRepairInputDetails(repairInputDetails);
if (result > 0) { if (result > 0) {
@ -707,7 +707,7 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
inputDetails.setMaId(repairInputInfo.getMaId() == null ? null : repairInputInfo.getMaId()); inputDetails.setMaId(repairInputInfo.getMaId() == null ? null : repairInputInfo.getMaId());
inputDetails.setTaskId(repairInputInfo.getTaskId()); inputDetails.setTaskId(repairInputInfo.getTaskId());
inputDetails.setTypeId(repairInputInfo.getTypeId()); inputDetails.setTypeId(repairInputInfo.getTypeId());
inputDetails.setAuditBy(SecurityUtils.getUserId()); inputDetails.setAuditBy(SecurityUtils.getLoginUser().getUserid());
inputDetails.setAuditTime(DateUtils.getNowDate()); inputDetails.setAuditTime(DateUtils.getNowDate());
result += repairInputDetailsMapper.updateRepairInputDetails(inputDetails); result += repairInputDetailsMapper.updateRepairInputDetails(inputDetails);

View File

@ -516,7 +516,7 @@ public class RepairServiceImpl implements RepairService {
bean.setRemark(repairPartDetails.getRemark()); bean.setRemark(repairPartDetails.getRemark());
repairMapper.updateRepairer(bean); repairMapper.updateRepairer(bean);
} else { } else {
bean.setRepairer(SecurityUtils.getUsername()); bean.setRepairer(SecurityUtils.getLoginUser().getUsername());
repairMapper.updateRepairer(bean); repairMapper.updateRepairer(bean);
} }
@ -685,7 +685,7 @@ public class RepairServiceImpl implements RepairService {
int res; int res;
TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(newTaskId, agreementId); TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(newTaskId, agreementId);
tmTaskAgreement.setCreateTime(DateUtils.getNowDate()); tmTaskAgreement.setCreateTime(DateUtils.getNowDate());
tmTaskAgreement.setCreateBy(SecurityUtils.getUsername()); tmTaskAgreement.setCreateBy(SecurityUtils.getLoginUser().getUsername());
res = taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement); res = taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
return res; return res;
} }
@ -1055,7 +1055,7 @@ public class RepairServiceImpl implements RepairService {
// 进行维修拆分 // 进行维修拆分
if (isWxFlag) { if (isWxFlag) {
// 插入任务表 // 插入任务表
Long newTaskId = insertTt(SecurityUtils.getUsername()); Long newTaskId = insertTt(SecurityUtils.getLoginUser().getUsername());
// 插入协议任务表 // 插入协议任务表
int res = insertTta(newTaskId, agreementId); int res = insertTta(newTaskId, agreementId);
if (res <= 0) { if (res <= 0) {
@ -1064,7 +1064,7 @@ public class RepairServiceImpl implements RepairService {
if (!CollectionUtils.isEmpty(repairTaskDetails)) { if (!CollectionUtils.isEmpty(repairTaskDetails)) {
for (RepairTaskDetails repairTaskDetail : repairTaskDetails) { for (RepairTaskDetails repairTaskDetail : repairTaskDetails) {
repairTaskDetail.setTaskId(newTaskId); repairTaskDetail.setTaskId(newTaskId);
repairTaskDetail.setCreateBy(SecurityUtils.getUsername()); repairTaskDetail.setCreateBy(SecurityUtils.getLoginUser().getUsername());
repairTaskDetail.setStatus("0"); repairTaskDetail.setStatus("0");
repairTaskDetail.setNewTaskId(newTaskId); repairTaskDetail.setNewTaskId(newTaskId);
repairMapper.insertRepaired(repairTaskDetail); repairMapper.insertRepaired(repairTaskDetail);
@ -1210,7 +1210,7 @@ public class RepairServiceImpl implements RepairService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int batchQualified(ArrayList<Long> ids) { public int batchQualified(ArrayList<Long> ids) {
return repairMapper.batchQualified(ids, SecurityUtils.getUsername()); return repairMapper.batchQualified(ids, SecurityUtils.getLoginUser().getUsername());
} }
@Override @Override
@ -1303,7 +1303,7 @@ public class RepairServiceImpl implements RepairService {
List<RepairTaskDetails> list = repairMapper.getTestRecordData(bean); List<RepairTaskDetails> list = repairMapper.getTestRecordData(bean);
if (list.size() > 0) { if (list.size() > 0) {
for (RepairTaskDetails bean1 : list) { for (RepairTaskDetails bean1 : list) {
bean1.setUserName(SecurityUtils.getUsername()); bean1.setUserName(SecurityUtils.getLoginUser().getUsername());
//查询配件列表 //查询配件列表
List<PartType> partList = repairMapper.getPartData(bean1); List<PartType> partList = repairMapper.getPartData(bean1);
bean1.setPartTypeList(partList); bean1.setPartTypeList(partList);

View File

@ -199,7 +199,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
if (CollectionUtils.isNotEmpty(scrapApplyDetails.getScrapApplyDetailsList())) { if (CollectionUtils.isNotEmpty(scrapApplyDetails.getScrapApplyDetailsList())) {
for (ScrapApplyDetails applyDetails : scrapApplyDetails.getScrapApplyDetailsList()) { for (ScrapApplyDetails applyDetails : scrapApplyDetails.getScrapApplyDetailsList()) {
applyDetails.setStatus("1"); applyDetails.setStatus("1");
applyDetails.setAuditBy(SecurityUtils.getUserId()); applyDetails.setAuditBy(SecurityUtils.getLoginUser().getUserid());
applyDetails.setAuditTime(DateUtils.getNowDate()); applyDetails.setAuditTime(DateUtils.getNowDate());
result = scrapApplyDetailsMapper.updateStatus(applyDetails); result = scrapApplyDetailsMapper.updateStatus(applyDetails);
} }
@ -218,7 +218,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
if (CollectionUtils.isNotEmpty(applyDetailsList)) { if (CollectionUtils.isNotEmpty(applyDetailsList)) {
for (ScrapApplyDetails applyDetails1 : applyDetailsList) { for (ScrapApplyDetails applyDetails1 : applyDetailsList) {
applyDetails1.setStatus("1"); applyDetails1.setStatus("1");
applyDetails1.setAuditBy(SecurityUtils.getUserId()); applyDetails1.setAuditBy(SecurityUtils.getLoginUser().getUserid());
applyDetails1.setAuditTime(DateUtils.getNowDate()); applyDetails1.setAuditTime(DateUtils.getNowDate());
result = scrapApplyDetailsMapper.updateStatus(applyDetails1); result = scrapApplyDetailsMapper.updateStatus(applyDetails1);
} }
@ -278,11 +278,11 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
result += insertTta(newTaskId, scrapApplyDetails); result += insertTta(newTaskId, scrapApplyDetails);
for (ScrapApplyDetails applyDetails : scrapApplyDetails.getScrapApplyDetailsList()) { for (ScrapApplyDetails applyDetails : scrapApplyDetails.getScrapApplyDetailsList()) {
applyDetails.setStatus("2"); applyDetails.setStatus("2");
applyDetails.setAuditBy(SecurityUtils.getUserId()); applyDetails.setAuditBy(SecurityUtils.getLoginUser().getUserid());
applyDetails.setAuditTime(DateUtils.getNowDate()); applyDetails.setAuditTime(DateUtils.getNowDate());
result = scrapApplyDetailsMapper.updateStatus(applyDetails); result = scrapApplyDetailsMapper.updateStatus(applyDetails);
Long backId = scrapApplyDetailsMapper.selectBackIdByTaskId(applyDetails.getParentId()); Long backId = scrapApplyDetailsMapper.selectBackIdByTaskId(applyDetails.getParentId());
applyDetails.setCreateBy(SecurityUtils.getUsername()); applyDetails.setCreateBy(SecurityUtils.getLoginUser().getUsername());
applyDetails.setCreateTime(DateUtils.getNowDate()); applyDetails.setCreateTime(DateUtils.getNowDate());
applyDetails.setBackId(backId); applyDetails.setBackId(backId);
applyDetails.setNewTaskId(newTaskId); applyDetails.setNewTaskId(newTaskId);
@ -311,7 +311,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
List<ScrapApplyDetails> applyDetailsList = scrapApplyDetailsList.stream().filter(applyDetails1 -> "0".equals(applyDetails1.getStatus())).collect(Collectors.toList()); List<ScrapApplyDetails> applyDetailsList = scrapApplyDetailsList.stream().filter(applyDetails1 -> "0".equals(applyDetails1.getStatus())).collect(Collectors.toList());
for (ScrapApplyDetails applyDetails1 : applyDetailsList) { for (ScrapApplyDetails applyDetails1 : applyDetailsList) {
applyDetails1.setStatus("2"); applyDetails1.setStatus("2");
applyDetails1.setAuditBy(SecurityUtils.getUserId()); applyDetails1.setAuditBy(SecurityUtils.getLoginUser().getUserid());
applyDetails1.setAuditTime(DateUtils.getNowDate()); applyDetails1.setAuditTime(DateUtils.getNowDate());
result = scrapApplyDetailsMapper.updateStatus(applyDetails1); result = scrapApplyDetailsMapper.updateStatus(applyDetails1);
if (applyDetails1.getMaId() != null) { if (applyDetails1.getMaId() != null) {
@ -319,7 +319,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
result += scrapApplyDetailsMapper.updateMaStatus(applyDetails1); result += scrapApplyDetailsMapper.updateMaStatus(applyDetails1);
} }
Long backId = scrapApplyDetailsMapper.selectBackIdByTaskId(applyDetails1.getParentId()); Long backId = scrapApplyDetailsMapper.selectBackIdByTaskId(applyDetails1.getParentId());
applyDetails1.setCreateBy(SecurityUtils.getUsername()); applyDetails1.setCreateBy(SecurityUtils.getLoginUser().getUsername());
applyDetails1.setCreateTime(DateUtils.getNowDate()); applyDetails1.setCreateTime(DateUtils.getNowDate());
applyDetails1.setBackId(backId); applyDetails1.setBackId(backId);
applyDetails1.setNewTaskId(newTaskId); applyDetails1.setNewTaskId(newTaskId);
@ -387,7 +387,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
for (Long id : scrapApplyDetails.getIdList()) { for (Long id : scrapApplyDetails.getIdList()) {
scrapApplyDetails.setId(id); scrapApplyDetails.setId(id);
scrapApplyDetails.setLedgerStatus("1"); scrapApplyDetails.setLedgerStatus("1");
scrapApplyDetails.setLedgerBy(SecurityUtils.getUserId()); scrapApplyDetails.setLedgerBy(SecurityUtils.getLoginUser().getUserid());
scrapApplyDetails.setLedgerTime(DateUtils.getNowDate()); scrapApplyDetails.setLedgerTime(DateUtils.getNowDate());
result += scrapApplyDetailsMapper.ledgerApprove(scrapApplyDetails); result += scrapApplyDetailsMapper.ledgerApprove(scrapApplyDetails);
} }
@ -443,7 +443,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
for (ScrapApplyDetails applyDetails : scrapApplyDetailsList) { for (ScrapApplyDetails applyDetails : scrapApplyDetailsList) {
if (idList.contains(applyDetails.getId())) { if (idList.contains(applyDetails.getId())) {
applyDetails.setLedgerStatus(ScrapTaskStatusEnum.SCRAP_TASK_TO_REJECT.getStatus().toString()); applyDetails.setLedgerStatus(ScrapTaskStatusEnum.SCRAP_TASK_TO_REJECT.getStatus().toString());
applyDetails.setLedgerBy(SecurityUtils.getUserId()); applyDetails.setLedgerBy(SecurityUtils.getLoginUser().getUserid());
applyDetails.setLedgerTime(DateUtils.getNowDate()); applyDetails.setLedgerTime(DateUtils.getNowDate());
applyDetails.setRejectReason(scrapApplyDetails.getRejectReason()); applyDetails.setRejectReason(scrapApplyDetails.getRejectReason());
result = scrapApplyDetailsMapper.ledgerApprove(applyDetails); result = scrapApplyDetailsMapper.ledgerApprove(applyDetails);
@ -459,7 +459,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
// 维修报废 // 维修报废
if (ScrapSourceEnum.REPAIR_SCRAP.getStatus().equals(applyDetails.getScrapSource())) { if (ScrapSourceEnum.REPAIR_SCRAP.getStatus().equals(applyDetails.getScrapSource())) {
Long backId = scrapApplyDetailsMapper.selectBackIdByTaskId(applyDetails.getParentId()); Long backId = scrapApplyDetailsMapper.selectBackIdByTaskId(applyDetails.getParentId());
applyDetails.setCreateBy(SecurityUtils.getUsername()); applyDetails.setCreateBy(SecurityUtils.getLoginUser().getUsername());
applyDetails.setCreateTime(DateUtils.getNowDate()); applyDetails.setCreateTime(DateUtils.getNowDate());
applyDetails.setBackId(backId); applyDetails.setBackId(backId);
applyDetails.setNewTaskId(newTaskId); applyDetails.setNewTaskId(newTaskId);
@ -471,7 +471,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
applyDetails.setLedgerStatus(ScrapTaskStatusEnum.SCRAP_TASK_NO_FINISHED.getStatus().toString()); applyDetails.setLedgerStatus(ScrapTaskStatusEnum.SCRAP_TASK_NO_FINISHED.getStatus().toString());
applyDetails.setLedgerBy(null); applyDetails.setLedgerBy(null);
applyDetails.setLedgerTime(null); applyDetails.setLedgerTime(null);
applyDetails.setCreateBy(SecurityUtils.getUsername()); applyDetails.setCreateBy(SecurityUtils.getLoginUser().getUsername());
applyDetails.setCreateTime(DateUtils.getNowDate()); applyDetails.setCreateTime(DateUtils.getNowDate());
applyDetails.setRejectReason(null); applyDetails.setRejectReason(null);
result += scrapApplyDetailsMapper.insertScrapApplyDetails(applyDetails); result += scrapApplyDetailsMapper.insertScrapApplyDetails(applyDetails);
@ -590,7 +590,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
List<ScrapApplyDetails> detailsList = scrapApplyDetails.getScrapApplyDetailsList(); List<ScrapApplyDetails> detailsList = scrapApplyDetails.getScrapApplyDetailsList();
for (ScrapApplyDetails applyDetails : detailsList) { for (ScrapApplyDetails applyDetails : detailsList) {
applyDetails.setTaskId(newTaskId); applyDetails.setTaskId(newTaskId);
applyDetails.setCreateBy(SecurityUtils.getUsername()); applyDetails.setCreateBy(SecurityUtils.getLoginUser().getUsername());
applyDetails.setCreateTime(DateUtils.getNowDate()); applyDetails.setCreateTime(DateUtils.getNowDate());
applyDetails.setScrapSource("3"); applyDetails.setScrapSource("3");
if (CollectionUtils.isNotEmpty(applyDetails.getMaCodeList())) { if (CollectionUtils.isNotEmpty(applyDetails.getMaCodeList())) {
@ -629,7 +629,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
private int getFileResult(ScrapApplyDetails scrapApplyDetails, int result, Long newTaskId) { private int getFileResult(ScrapApplyDetails scrapApplyDetails, int result, Long newTaskId) {
if (CollectionUtils.isNotEmpty(scrapApplyDetails.getFileList())) { if (CollectionUtils.isNotEmpty(scrapApplyDetails.getFileList())) {
for (BmFileInfo fileInfo : scrapApplyDetails.getFileList()) { for (BmFileInfo fileInfo : scrapApplyDetails.getFileList()) {
fileInfo.setCreateBy(SecurityUtils.getUsername()); fileInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
fileInfo.setCreateTime(DateUtils.getNowDate()); fileInfo.setCreateTime(DateUtils.getNowDate());
fileInfo.setFileType(6L); fileInfo.setFileType(6L);
fileInfo.setTaskType(TmTaskTypeEnum.TM_TASK_PART_SCRAP.getTaskTypeId()); fileInfo.setTaskType(TmTaskTypeEnum.TM_TASK_PART_SCRAP.getTaskTypeId());
@ -652,7 +652,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_PART_SCRAP.getTaskTypeId(), RepairInputStatusEnum.INPUT_TASK_NO_FINISHED.getStatus(), TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_PART_SCRAP.getTaskTypeId(), RepairInputStatusEnum.INPUT_TASK_NO_FINISHED.getStatus(),
null,thisMonthMaxOrder + 1, code); null,thisMonthMaxOrder + 1, code);
tmTask.setCreateTime(DateUtils.getNowDate()); tmTask.setCreateTime(DateUtils.getNowDate());
tmTask.setCreateBy(SecurityUtils.getUsername()); tmTask.setCreateBy(SecurityUtils.getLoginUser().getUsername());
// 插入任务 // 插入任务
int taskId = taskMapper.insertTmTask(tmTask); int taskId = taskMapper.insertTmTask(tmTask);
// 如果插入成功且返回的 taskId 大于 0 // 如果插入成功且返回的 taskId 大于 0
@ -875,7 +875,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
// 根据前端传的status来判断审核通过还是驳回1 通过 2 驳回 // 根据前端传的status来判断审核通过还是驳回1 通过 2 驳回
for (Long taskId : scrapApplyDetails.getTaskIdList()) { for (Long taskId : scrapApplyDetails.getTaskIdList()) {
scrapApplyDetails.setTaskId(taskId); scrapApplyDetails.setTaskId(taskId);
scrapApplyDetails.setAuditBy(SecurityUtils.getUserId()); scrapApplyDetails.setAuditBy(SecurityUtils.getLoginUser().getUserid());
scrapApplyDetails.setAuditTime(DateUtils.getNowDate()); scrapApplyDetails.setAuditTime(DateUtils.getNowDate());
result += scrapApplyDetailsMapper.updateTaskStatus(scrapApplyDetails); result += scrapApplyDetailsMapper.updateTaskStatus(scrapApplyDetails);
// 修改任务状态 // 修改任务状态
@ -1015,7 +1015,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_REPAIR.getTaskTypeId(), RepairTaskStatusEnum.TASK_STATUS_PROCESSING.getStatus(), TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_REPAIR.getTaskTypeId(), RepairTaskStatusEnum.TASK_STATUS_PROCESSING.getStatus(),
null,thisMonthMaxOrder + 1, code); null,thisMonthMaxOrder + 1, code);
tmTask.setCreateTime(DateUtils.getNowDate()); tmTask.setCreateTime(DateUtils.getNowDate());
tmTask.setCreateBy(SecurityUtils.getUsername()); tmTask.setCreateBy(SecurityUtils.getLoginUser().getUsername());
tmTask.setPreTaskId(preTaskId); tmTask.setPreTaskId(preTaskId);
// 插入任务 // 插入任务
int taskId = taskMapper.insertTmTask(tmTask); int taskId = taskMapper.insertTmTask(tmTask);
@ -1055,7 +1055,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
} }
TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(newTaskId, agreementId); TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(newTaskId, agreementId);
tmTaskAgreement.setCreateTime(DateUtils.getNowDate()); tmTaskAgreement.setCreateTime(DateUtils.getNowDate());
tmTaskAgreement.setCreateBy(SecurityUtils.getUsername()); tmTaskAgreement.setCreateBy(SecurityUtils.getLoginUser().getUsername());
res = taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement); res = taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
return res; return res;
} }

View File

@ -65,7 +65,7 @@ public class SltAgreementReduceRecord {
private BigDecimal leaseMoneyAll; private BigDecimal leaseMoneyAll;
/** 状态0未结算1待审核2审核通过3审核驳回 */ /** 状态0未结算1待审核2审核通过3审核驳回 */
@Excel(name = "状态", sort = 8, readConverterExp = "0=待审核, 1=审核中, 2=已审核, 3=已驳回") @Excel(name = "状态", sort = 8, readConverterExp = "0=待审核,1=审核中,2=已审核,3=已驳回")
@ApiModelProperty(value = "状态0未结算1待审核2审核通过3审核驳回") @ApiModelProperty(value = "状态0未结算1待审核2审核通过3审核驳回")
private String status; private String status;

View File

@ -457,14 +457,14 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
throw new ServiceException("slt_agreement_apply修改失败"); throw new ServiceException("slt_agreement_apply修改失败");
} }
sltInfoVo.setUpdateTime(DateUtils.getNowDate()); sltInfoVo.setUpdateTime(DateUtils.getNowDate());
sltInfoVo.setCreateBy(String.valueOf(SecurityUtils.getUserId())); sltInfoVo.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
int countTwo = sltAgreementInfoMapper.updateBmAgreementStatus(sltInfoVo); int countTwo = sltAgreementInfoMapper.updateBmAgreementStatus(sltInfoVo);
if (countTwo != 1) { if (countTwo != 1) {
throw new ServiceException("bm_agreement_info修改失败"); throw new ServiceException("bm_agreement_info修改失败");
} }
} else { } else {
sltInfoVo.setCreateTime(DateUtils.getNowDate()); sltInfoVo.setCreateTime(DateUtils.getNowDate());
sltInfoVo.setCreateBy(String.valueOf(SecurityUtils.getUserId())); sltInfoVo.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
//新增 //新增
int countOne = sltAgreementInfoMapper.insertSltAgreementApply(sltInfoVo); int countOne = sltAgreementInfoMapper.insertSltAgreementApply(sltInfoVo);
if (countOne != 1) { if (countOne != 1) {

View File

@ -79,7 +79,7 @@ public class SltAgreementReduceServiceImpl implements ISltAgreementReduceService
} }
if (null != list) { if (null != list) {
sltAgreement.setCreator(SecurityUtils.getUserId().toString()); sltAgreement.setCreator(SecurityUtils.getLoginUser().getUserid().toString());
// 插入外层任务信息 // 插入外层任务信息
Long rs = sltAgreementRecudceMapper.insertReduce(sltAgreement); Long rs = sltAgreementRecudceMapper.insertReduce(sltAgreement);
Long taskId = sltAgreement.getId(); Long taskId = sltAgreement.getId();

View File

@ -173,7 +173,7 @@ public class DirectAuditImpl implements IDirectAuditService {
his.setNodeId(flowNodeId); his.setNodeId(flowNodeId);
his.setNextNodeId(nextNodeId); his.setNextNodeId(nextNodeId);
his.setIsAccept(Integer.parseInt(isAccept)); his.setIsAccept(Integer.parseInt(isAccept));
his.setCreateBy(SecurityUtils.getUsername()); his.setCreateBy(SecurityUtils.getLoginUser().getUsername());
his.setCreateTime(new Date()); his.setCreateTime(new Date());
his.setRemark(remark); his.setRemark(remark);
sysWorkflowRecordHistoryMapper.addSysWorkflowRecordHistory(his) ; sysWorkflowRecordHistoryMapper.addSysWorkflowRecordHistory(his) ;

View File

@ -106,7 +106,7 @@ public class SysWorkflowNodeServiceImpl implements SysWorkflowNodeService {
@Override @Override
public List<SysWorkflowNode> listByTaskId(SysWorkflowNode sysWorkflowNode) { public List<SysWorkflowNode> listByTaskId(SysWorkflowNode sysWorkflowNode) {
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getLoginUser().getUserid();
List<SysWorkflowNode> sysWorkflowNodeList = sysWorkflowNodeMapper.listByTaskId(sysWorkflowNode); List<SysWorkflowNode> sysWorkflowNodeList = sysWorkflowNodeMapper.listByTaskId(sysWorkflowNode);
for (SysWorkflowNode SysWorkflowNode: sysWorkflowNodeList) { for (SysWorkflowNode SysWorkflowNode: sysWorkflowNodeList) {
SysWorkflowRecordHistory sysWorkflowRecordHistory = new SysWorkflowRecordHistory(); SysWorkflowRecordHistory sysWorkflowRecordHistory = new SysWorkflowRecordHistory();

View File

@ -107,7 +107,7 @@ public class SysWorkflowRecordHistoryServiceImpl implements SysWorkflowRecordHis
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int updateSysWorkflowRecordHistory(SysWorkflowRecordHistory sysWorkflowRecordHistory) { public int updateSysWorkflowRecordHistory(SysWorkflowRecordHistory sysWorkflowRecordHistory) {
//保存审核人信息 //保存审核人信息
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getLoginUser().getUserid();
sysWorkflowRecordHistory.setCreateBy(userId.toString()); sysWorkflowRecordHistory.setCreateBy(userId.toString());
sysWorkflowRecordHistoryMapper.addSysWorkflowRecordHistory(sysWorkflowRecordHistory); sysWorkflowRecordHistoryMapper.addSysWorkflowRecordHistory(sysWorkflowRecordHistory);
//根据当前审批状态修改流程状态 //根据当前审批状态修改流程状态
@ -205,9 +205,9 @@ public class SysWorkflowRecordHistoryServiceImpl implements SysWorkflowRecordHis
BackTaskStatusEnum.BACK_TASK_IN_FINISHED.getStatus(), BackTaskStatusEnum.BACK_TASK_IN_FINISHED.getStatus(),
null,thisMonthMaxOrder + 1, code); null,thisMonthMaxOrder + 1, code);
task.setCreateTime(DateUtils.getNowDate()); task.setCreateTime(DateUtils.getNowDate());
task.setCreateBy(SecurityUtils.getUsername()); task.setCreateBy(SecurityUtils.getLoginUser().getUsername());
backApplyInfo.setCode(code); backApplyInfo.setCode(code);
backApplyInfo.setCreateBy(SecurityUtils.getUsername()); backApplyInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
backApplyInfo.setCreateTime(DateUtils.getNowDate()); backApplyInfo.setCreateTime(DateUtils.getNowDate());
backApplyInfo.setDirectId(Long.valueOf(directApplyInfo.getId())); backApplyInfo.setDirectId(Long.valueOf(directApplyInfo.getId()));
// 保存退料信息到 tm_task 表中 // 保存退料信息到 tm_task 表中
@ -228,11 +228,11 @@ public class SysWorkflowRecordHistoryServiceImpl implements SysWorkflowRecordHis
LeaseTaskStatusEnum.LEASE_TASK_FINISHED.getStatus(),null LeaseTaskStatusEnum.LEASE_TASK_FINISHED.getStatus(),null
,maxOrderByDate + 1, taskCode); ,maxOrderByDate + 1, taskCode);
tmTask1.setCreateTime(DateUtils.getNowDate()); tmTask1.setCreateTime(DateUtils.getNowDate());
tmTask1.setCreateBy(SecurityUtils.getUsername()); tmTask1.setCreateBy(SecurityUtils.getLoginUser().getUsername());
tmTaskMapper.insertTmTask(tmTask1); tmTaskMapper.insertTmTask(tmTask1);
TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask1.getTaskId(), Long.valueOf(info.getLeaseAgreementId())); TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask1.getTaskId(), Long.valueOf(info.getLeaseAgreementId()));
tmTaskAgreement.setCreateTime(DateUtils.getNowDate()); tmTaskAgreement.setCreateTime(DateUtils.getNowDate());
tmTaskAgreement.setCreateBy(SecurityUtils.getUsername()); tmTaskAgreement.setCreateBy(SecurityUtils.getLoginUser().getUsername());
taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement); taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
/** 设置审批人为默认的董班长 --防止代码冲突 **/ /** 设置审批人为默认的董班长 --防止代码冲突 **/
Long peopleId = leaseApplyInfoMapper.getDirectAuditBy(); Long peopleId = leaseApplyInfoMapper.getDirectAuditBy();
@ -242,7 +242,7 @@ public class SysWorkflowRecordHistoryServiceImpl implements SysWorkflowRecordHis
applyInfo.setTaskId(tmTask1.getTaskId()); applyInfo.setTaskId(tmTask1.getTaskId());
applyInfo.setLeasePerson(info.getLeaseMan()); applyInfo.setLeasePerson(info.getLeaseMan());
applyInfo.setPhone(info.getLeasePhone()); applyInfo.setPhone(info.getLeasePhone());
applyInfo.setCreateBy(SecurityUtils.getUsername()); applyInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername());
applyInfo.setCreateTime(DateUtils.getNowDate()); applyInfo.setCreateTime(DateUtils.getNowDate());
applyInfo.setDirectId(Long.valueOf(directApplyInfo.getId())); applyInfo.setDirectId(Long.valueOf(directApplyInfo.getId()));
/** 设置审批人为默认的董班长 --防止代码冲突 **/ /** 设置审批人为默认的董班长 --防止代码冲突 **/
@ -314,7 +314,7 @@ public class SysWorkflowRecordHistoryServiceImpl implements SysWorkflowRecordHis
record.setOutNum(BigDecimal.valueOf(directApplyDetails.getDirectNum())); record.setOutNum(BigDecimal.valueOf(directApplyDetails.getDirectNum()));
record.setOutType("1".equals(directApplyDetails.getManageType()) ? record.setOutType("1".equals(directApplyDetails.getManageType()) ?
1 : 0); 1 : 0);
record.setCreateBy(SecurityUtils.getUsername()); record.setCreateBy(SecurityUtils.getLoginUser().getUsername());
record.setCreateTime(DateUtils.getNowDate()); record.setCreateTime(DateUtils.getNowDate());
count = leaseOutDetailsMapper.insertLeaseOutDetails(record); count = leaseOutDetailsMapper.insertLeaseOutDetails(record);
// 插入结算表 // 插入结算表
@ -353,7 +353,7 @@ public class SysWorkflowRecordHistoryServiceImpl implements SysWorkflowRecordHis
LeaseApplyDetails details = new LeaseApplyDetails(); LeaseApplyDetails details = new LeaseApplyDetails();
details.setParentId(applyInfo.getId()); details.setParentId(applyInfo.getId());
details.setCreateTime(DateUtils.getNowDate()); details.setCreateTime(DateUtils.getNowDate());
details.setCreateBy(SecurityUtils.getUsername()); details.setCreateBy(SecurityUtils.getLoginUser().getUsername());
details.setTypeId(Long.valueOf(directApplyDetails.getTypeId())); details.setTypeId(Long.valueOf(directApplyDetails.getTypeId()));
details.setPreNum(BigDecimal.valueOf(directApplyDetails.getDirectNum())); details.setPreNum(BigDecimal.valueOf(directApplyDetails.getDirectNum()));
details.setAlNum(BigDecimal.valueOf(directApplyDetails.getDirectNum())); details.setAlNum(BigDecimal.valueOf(directApplyDetails.getDirectNum()));
@ -393,7 +393,7 @@ public class SysWorkflowRecordHistoryServiceImpl implements SysWorkflowRecordHis
BackApplyDetails details = new BackApplyDetails(); BackApplyDetails details = new BackApplyDetails();
details.setParentId(backApplyInfo.getId()); details.setParentId(backApplyInfo.getId());
details.setTypeId(Long.valueOf(directApplyDetails.getTypeId())); details.setTypeId(Long.valueOf(directApplyDetails.getTypeId()));
details.setCreateBy(SecurityUtils.getUsername()); details.setCreateBy(SecurityUtils.getLoginUser().getUsername());
details.setCreateTime(DateUtils.getNowDate()); details.setCreateTime(DateUtils.getNowDate());
details.setPreNum(BigDecimal.valueOf(directApplyDetails.getDirectNum())); details.setPreNum(BigDecimal.valueOf(directApplyDetails.getDirectNum()));
details.setMaId(directApplyDetails.getMaId() == null ? details.setMaId(directApplyDetails.getMaId() == null ?
@ -450,7 +450,7 @@ public class SysWorkflowRecordHistoryServiceImpl implements SysWorkflowRecordHis
details.setNum(directApplyDetails.getUseNum() == null ? details.setNum(directApplyDetails.getUseNum() == null ?
BigDecimal.ZERO : BigDecimal.valueOf(directApplyDetails.getUseNum())); BigDecimal.ZERO : BigDecimal.valueOf(directApplyDetails.getUseNum()));
details.setStatus(String.valueOf(BackTaskStatusEnum.BACK_TASK_IN_FINISHED.getStatus())); details.setStatus(String.valueOf(BackTaskStatusEnum.BACK_TASK_IN_FINISHED.getStatus()));
details.setCreateBy(SecurityUtils.getUsername()); details.setCreateBy(SecurityUtils.getLoginUser().getUsername());
details.setCreateTime(DateUtils.getNowDate()); details.setCreateTime(DateUtils.getNowDate());
details.setTypeId(Long.valueOf(directApplyDetails.getTypeId())); details.setTypeId(Long.valueOf(directApplyDetails.getTypeId()));
// 保存退料详情 // 保存退料详情
@ -472,7 +472,7 @@ public class SysWorkflowRecordHistoryServiceImpl implements SysWorkflowRecordHis
if (result > 0) { if (result > 0) {
TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(task.getTaskId(), Long.valueOf(info.getBackAgreementId())); TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(task.getTaskId(), Long.valueOf(info.getBackAgreementId()));
tmTaskAgreement.setCreateTime(DateUtils.getNowDate()); tmTaskAgreement.setCreateTime(DateUtils.getNowDate());
tmTaskAgreement.setCreateBy(SecurityUtils.getUsername()); tmTaskAgreement.setCreateBy(SecurityUtils.getLoginUser().getUsername());
taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement); taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
backApplyInfo.setTaskId(task.getTaskId()); backApplyInfo.setTaskId(task.getTaskId());
/** 设置审批人为默认的李勇 --防止代码冲突 **/ /** 设置审批人为默认的李勇 --防止代码冲突 **/