dms模块优化

master
zch 3 months ago
parent acc82ef812
commit 82165894ba

@ -3,7 +3,10 @@ package com.hw.dms.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.hw.dms.domain.DmsBaseDeviceLedger;
import com.hw.dms.service.IDmsBaseDeviceLedgerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
@ -35,6 +38,9 @@ public class DmsBaseDeviceInstallController extends BaseController
@Autowired
private IDmsBaseDeviceInstallService dmsBaseDeviceInstallService;
@Autowired
private IDmsBaseDeviceLedgerService dmsBaseDeviceLedgerService;
/**
*
*/
@ -76,8 +82,14 @@ public class DmsBaseDeviceInstallController extends BaseController
@RequiresPermissions("dms:install:add")
@Log(title = "设备安装信息", businessType = BusinessType.INSERT)
@PostMapping
@Transactional
public AjaxResult add(@RequestBody DmsBaseDeviceInstall dmsBaseDeviceInstall)
{
//添加设备安装记录时,也会更新设备台账中的设备位置
DmsBaseDeviceLedger dmsBaseDeviceLedger = new DmsBaseDeviceLedger();
dmsBaseDeviceLedger.setDeviceLocation(dmsBaseDeviceInstall.getInstallPosition());
dmsBaseDeviceLedger.setDeviceId(dmsBaseDeviceInstall.getDeviceId());
dmsBaseDeviceLedgerService.updateDmsBaseDeviceLedger(dmsBaseDeviceLedger);
return toAjax(dmsBaseDeviceInstallService.insertDmsBaseDeviceInstall(dmsBaseDeviceInstall));
}

@ -3,6 +3,7 @@ package com.hw.dms.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.hw.dms.domain.DmsBaseInspectRoute;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -47,6 +48,16 @@ public class DmsBaseInspectProjectController extends BaseController
return getDataTable(list);
}
/**
* 线
*/
@GetMapping("/getdmsBaseInspectProjectList")
public AjaxResult getdmsBaseInspectProjectList(DmsBaseInspectProject dmsBaseInspectProject)
{
List<DmsBaseInspectProject> list = dmsBaseInspectProjectService
.selectDmsBaseInspectProjectList(dmsBaseInspectProject);
return success(list);
}
/**
*
*/

@ -3,6 +3,7 @@ package com.hw.dms.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.hw.dms.domain.DmsBaseLubeStandard;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -47,6 +48,17 @@ public class DmsBaseInspectRouteController extends BaseController
return getDataTable(list);
}
/**
* 线
*/
@GetMapping("/getdmsBaseInspectRouteList")
public AjaxResult getdmsBaseInspectRouteList(DmsBaseInspectRoute dmsBaseInspectRoute)
{
List<DmsBaseInspectRoute> list = dmsBaseInspectRouteService
.selectDmsBaseInspectRouteList(dmsBaseInspectRoute);
return success(list);
}
/**
* 线
*/

@ -3,6 +3,7 @@ package com.hw.dms.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.hw.dms.domain.DmsBaseMaintStandard;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -60,6 +61,17 @@ public class DmsBaseLubeStandardController extends BaseController
util.exportExcel(response, list, "润滑标准信息数据");
}
/**
*
*/
@GetMapping("/getLueStandardList")
public AjaxResult getLueStandardList(DmsBaseLubeStandard dmsBaseLubeStandard)
{
List<DmsBaseLubeStandard> list = dmsBaseLubeStandardService
.selectDmsBaseLubeStandardList(dmsBaseLubeStandard);
return success(list);
}
/**
*
*/

@ -61,6 +61,17 @@ public class DmsBaseMaintStandardController extends BaseController
}
/**
*
*/
@GetMapping("/getMaintStandardlist")
public AjaxResult getMaintStandardlist(DmsBaseMaintStandard dmsBaseMaintStandard)
{
List<DmsBaseMaintStandard> list = dmsBaseMaintStandardService
.selectDmsBaseMaintStandardList(dmsBaseMaintStandard);
return success(list);
}
/**
*
*/
@RequiresPermissions("dms:standard:query")
@ -70,6 +81,7 @@ public class DmsBaseMaintStandardController extends BaseController
return success(dmsBaseMaintStandardService.selectDmsBaseMaintStandardByMaintStandardId(maintStandardId));
}
/**
*
*/

@ -7,6 +7,7 @@ import javax.servlet.http.HttpServletResponse;
import com.hw.dms.domain.DmsBaseDeviceLedger;
import com.hw.dms.service.IDmsBaseDeviceLedgerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
@ -47,7 +48,6 @@ public class DmsBaseTransferInfoController extends BaseController
@GetMapping("/list")
public TableDataInfo list(DmsBaseTransferInfo dmsBaseTransferInfo)
{
startPage();
List<DmsBaseTransferInfo> list = dmsBaseTransferInfoService.selectDmsBaseTransferInfoList(dmsBaseTransferInfo);
return getDataTable(list);
}
@ -81,6 +81,7 @@ public class DmsBaseTransferInfoController extends BaseController
@RequiresPermissions("dms:info:add")
@Log(title = "设备转移信息", businessType = BusinessType.INSERT)
@PostMapping
@Transactional
public AjaxResult add(@RequestBody DmsBaseTransferInfo dmsBaseTransferInfo)
{
//转移时修改设备信息

@ -106,9 +106,10 @@ public class DmsBillsInspectInstanceController extends BaseController
@PostMapping("/autoAdd")
public AjaxResult autoAdd(@RequestBody String dmsBillsInstanceId)
{
String s = dmsBillsInstanceId.replaceAll("\"", "");
// 使用 replaceAll 方法将双引号替换为空字符串
String result = dmsBillsInstanceId.replaceAll("\"", "");
DmsPlanInspect dmsPlanInspect = dmsPlanInspectService.selectDmsPlanInspectByPlanInspectId(Long.valueOf(s));
DmsPlanInspect dmsPlanInspect = dmsPlanInspectService.selectDmsPlanInspectByPlanInspectId(Long.valueOf(result));
DmsBillsInspectInstance dmsBillsInspectInstance = new DmsBillsInspectInstance();

@ -44,7 +44,7 @@ public class DmsBaseDeviceParam extends BaseEntity
/** 读取频率S */
@Excel(name = "读取频率", readConverterExp = "S=")
private Long readFrequency;
private int readFrequency;
/** 是否标识1-是2-否 */
@Excel(name = "是否标识1-是2-否")
@ -122,12 +122,12 @@ public class DmsBaseDeviceParam extends BaseEntity
{
return paramType;
}
public void setReadFrequency(Long readFrequency)
public void setReadFrequency(int readFrequency)
{
this.readFrequency = readFrequency;
}
public Long getReadFrequency()
public int getReadFrequency()
{
return readFrequency;
}

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
@ -63,15 +64,38 @@ public class DmsBaseDeviceBomServiceImpl implements IDmsBaseDeviceBomService
if (dmsBaseDeviceBom.getParentId()==0){
dmsBaseDeviceBom.setAncestors("0");
}
else{
DmsBaseDeviceBom dmsBaseDeviceBom1 = new DmsBaseDeviceBom();
dmsBaseDeviceBom1.setDeviceBomId(dmsBaseDeviceBom.getParentId());
String ancestors = dmsBaseDeviceBomMapper.selectDmsBaseDeviceBomList(dmsBaseDeviceBom1).get(0).getAncestors();
dmsBaseDeviceBom.setAncestors(ancestors+","+dmsBaseDeviceBom.getParentId());
else {
DmsBaseDeviceBom selectDeviceBom = new DmsBaseDeviceBom();
selectDeviceBom.setDeviceBomId(dmsBaseDeviceBom.getParentId());
String ancestors = dmsBaseDeviceBomMapper.selectDmsBaseDeviceBomList(selectDeviceBom).get(0).getAncestors();
dmsBaseDeviceBom.setAncestors(ancestors + "," + dmsBaseDeviceBom.getParentId());
//遍历所有祖先节点检查设备ID是否重复,设备的bom不能包含其设备本身
String ancestorsNode = dmsBaseDeviceBom.getAncestors();
for (String ancestorsOne : ancestorsNode.split(",")) {
if (ancestorsOne.equals("0")) {
continue;
}
DmsBaseDeviceBom DeviceBomUpdate = dmsBaseDeviceBomMapper.
selectDmsBaseDeviceBomByDeviceBomId(Long.parseLong(ancestorsOne));
if (dmsBaseDeviceBom.getDeviceId().equals(DeviceBomUpdate.getDeviceId())) {
throw new ServiceException("不能添加与祖先节点相同的设备编号");
}
}
//同一双亲节点的设备ID不能重复不同双亲结点同一层级的兄弟节点可以重复
//顶级节点可以重复,顶级节点不进else
DmsBaseDeviceBom query = new DmsBaseDeviceBom();
query.setParentId(dmsBaseDeviceBom.getParentId());
// 查询父节点的所有子节点即兄弟节点都放到列表sibling中
List<DmsBaseDeviceBom> siblings = dmsBaseDeviceBomMapper.selectDmsBaseDeviceBomList(query);
// 遍历兄弟节点检查设备ID是否重复
for (DmsBaseDeviceBom sibling : siblings) {
if (dmsBaseDeviceBom.getDeviceId().equals(sibling.getDeviceId())) {
throw new ServiceException("不能添加与兄弟节点相同的设备编号: " + dmsBaseDeviceBom.getDeviceId());
}
}
}
return dmsBaseDeviceBomMapper.insertDmsBaseDeviceBom(dmsBaseDeviceBom);
}
/**
* BOM
*
@ -86,10 +110,34 @@ public class DmsBaseDeviceBomServiceImpl implements IDmsBaseDeviceBomService
dmsBaseDeviceBom.setAncestors("0");
}
else{
DmsBaseDeviceBom dmsBaseDeviceBom1 = new DmsBaseDeviceBom();
dmsBaseDeviceBom1.setDeviceBomId(dmsBaseDeviceBom.getParentId());
String ancestors = dmsBaseDeviceBomMapper.selectDmsBaseDeviceBomList(dmsBaseDeviceBom1).get(0).getAncestors();
DmsBaseDeviceBom DeviceBom = new DmsBaseDeviceBom();
DeviceBom.setDeviceBomId(dmsBaseDeviceBom.getParentId());
String ancestors = dmsBaseDeviceBomMapper.selectDmsBaseDeviceBomList(DeviceBom).get(0).getAncestors();
dmsBaseDeviceBom.setAncestors(ancestors+","+dmsBaseDeviceBom.getParentId());
//遍历所有祖先节点检查设备ID是否重复,设备的bom不能包含其设备本身
String ancestorsNode = dmsBaseDeviceBom.getAncestors();
for (String ancestorsOne : ancestorsNode.split(",")) {
if (ancestorsOne.equals("0")) {
continue;
}
DmsBaseDeviceBom DeviceBomUpdate = dmsBaseDeviceBomMapper.
selectDmsBaseDeviceBomByDeviceBomId(Long.parseLong(ancestorsOne));
if (dmsBaseDeviceBom.getDeviceId().equals(DeviceBomUpdate.getDeviceId())) {
throw new ServiceException("不能添加与祖先节点相同的设备编号");
}
}
//同一双亲节点的设备ID不能重复不同双亲结点同一层级的兄弟节点可以重复
//顶级节点可以重复,顶级节点不进else
DmsBaseDeviceBom query = new DmsBaseDeviceBom();
query.setParentId(dmsBaseDeviceBom.getParentId());
// 查询父节点的所有子节点
List<DmsBaseDeviceBom> siblings = dmsBaseDeviceBomMapper.selectDmsBaseDeviceBomList(query);
// 查询父节点的所有子节点即兄弟节点都放到列表sibling中
for (DmsBaseDeviceBom sibling : siblings) {
if (dmsBaseDeviceBom.getDeviceId().equals(sibling.getDeviceId())) {
throw new ServiceException("不能添加与兄弟节点相同的设备编号: " + dmsBaseDeviceBom.getDeviceId());
}
}
}
dmsBaseDeviceBom.setUpdateTime(DateUtils.getNowDate());
return dmsBaseDeviceBomMapper.updateDmsBaseDeviceBom(dmsBaseDeviceBom);

@ -1,7 +1,9 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -54,7 +56,12 @@ public class DmsBaseDeviceDebuggingServiceImpl implements IDmsBaseDeviceDebuggin
@Override
public int insertDmsBaseDeviceDebugging(DmsBaseDeviceDebugging dmsBaseDeviceDebugging)
{
LoginUser loginUser = new LoginUser();
DmsBaseDeviceDebugging DeviceDebugging = new DmsBaseDeviceDebugging();
DeviceDebugging.setWorkOrder(dmsBaseDeviceDebugging.getWorkOrder());
List<DmsBaseDeviceDebugging> DmsBaseDeviceDebugginglist = dmsBaseDeviceDebuggingMapper
.selectDmsBaseDeviceDebuggingList(DeviceDebugging);
if (DmsBaseDeviceDebugginglist.size() > 0)throw new ServiceException("设备调试信息已存在");
LoginUser loginUser = SecurityUtils.getLoginUser();
dmsBaseDeviceDebugging.setCreateBy(loginUser.getUsername());
dmsBaseDeviceDebugging.setCreateTime(DateUtils.getNowDate());
return dmsBaseDeviceDebuggingMapper.insertDmsBaseDeviceDebugging(dmsBaseDeviceDebugging);
@ -68,8 +75,15 @@ public class DmsBaseDeviceDebuggingServiceImpl implements IDmsBaseDeviceDebuggin
*/
@Override
public int updateDmsBaseDeviceDebugging(DmsBaseDeviceDebugging dmsBaseDeviceDebugging)
{
LoginUser loginUser = new LoginUser();
{ DmsBaseDeviceDebugging DeviceDebugging = new DmsBaseDeviceDebugging();
DeviceDebugging.setWorkOrder(dmsBaseDeviceDebugging.getWorkOrder());
List<DmsBaseDeviceDebugging> DeviceDebugginglist = dmsBaseDeviceDebuggingMapper
.selectDmsBaseDeviceDebuggingList(DeviceDebugging);
if (DeviceDebugginglist.size() > 0 && !dmsBaseDeviceDebugging.getDeviceDebuggingId()
.equals(DeviceDebugginglist.get(0).getDeviceDebuggingId())){
throw new ServiceException("设备调试信息已存在");
}
LoginUser loginUser = SecurityUtils.getLoginUser();
dmsBaseDeviceDebugging.setUpdateBy(loginUser.getUsername());
dmsBaseDeviceDebugging.setUpdateTime(DateUtils.getNowDate());
return dmsBaseDeviceDebuggingMapper.updateDmsBaseDeviceDebugging(dmsBaseDeviceDebugging);

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
@ -55,6 +56,11 @@ public class DmsBaseDeviceDepreciationServiceImpl implements IDmsBaseDeviceDepre
@Override
public int insertDmsBaseDeviceDepreciation(DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation)
{
DmsBaseDeviceDepreciation DeviceDepreciation = new DmsBaseDeviceDepreciation();
DeviceDepreciation.setDeviceId(dmsBaseDeviceDepreciation.getDeviceId());
List<DmsBaseDeviceDepreciation> list = dmsBaseDeviceDepreciationMapper
.selectDmsBaseDeviceDepreciationList(DeviceDepreciation);
if (list.size()>0)throw new ServiceException("该设备折旧记录已存在");
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseDeviceDepreciation.setCreateBy(user.getUsername());
dmsBaseDeviceDepreciation.setIsFlag(1l);
@ -71,6 +77,14 @@ public class DmsBaseDeviceDepreciationServiceImpl implements IDmsBaseDeviceDepre
@Override
public int updateDmsBaseDeviceDepreciation(DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation)
{
DmsBaseDeviceDepreciation DeviceDepreciation = new DmsBaseDeviceDepreciation();
DeviceDepreciation.setDeviceId(dmsBaseDeviceDepreciation.getDeviceId());
List<DmsBaseDeviceDepreciation> DeviceDepreciationlist = dmsBaseDeviceDepreciationMapper
.selectDmsBaseDeviceDepreciationList(DeviceDepreciation);
if (DeviceDepreciationlist.size()>0&& ! DeviceDepreciationlist.get(0).getDeviceDepreciationId()
.equals(dmsBaseDeviceDepreciation.getDeviceDepreciationId())){
throw new ServiceException("该设备折旧记录已存在");
}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseDeviceDepreciation.setUpdateBy(user.getUsername());
dmsBaseDeviceDepreciation.setUpdateTime(DateUtils.getNowDate());

@ -3,6 +3,7 @@ package com.hw.dms.service.impl;
import java.util.List;
import java.util.Map;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
@ -57,7 +58,11 @@ public class DmsBaseDeviceFilesServiceImpl implements IDmsBaseDeviceFilesService
@Override
public int insertDmsBaseDeviceFiles(DmsBaseDeviceFiles dmsBaseDeviceFiles)
{
DmsBaseDeviceFiles DeviceFiles = new DmsBaseDeviceFiles();
DeviceFiles.setFilesCode(dmsBaseDeviceFiles.getFilesCode());
List <DmsBaseDeviceFiles> dmsBaseDeviceFilesList = dmsBaseDeviceFilesMapper
.selectDmsBaseDeviceFilesList(DeviceFiles);
if(dmsBaseDeviceFilesList.size()>0 ) {throw new ServiceException("设备档案编号已存在");}
String url = dmsBaseDeviceFiles.getFilesPath();
int index = url.lastIndexOf("/");
String name = url.substring(index+1);
@ -79,8 +84,14 @@ public class DmsBaseDeviceFilesServiceImpl implements IDmsBaseDeviceFilesService
@Override
public int updateDmsBaseDeviceFiles(DmsBaseDeviceFiles dmsBaseDeviceFiles)
{
DmsBaseDeviceFiles DeviceFiles = new DmsBaseDeviceFiles();
DeviceFiles.setFilesCode(dmsBaseDeviceFiles.getFilesCode());
List <DmsBaseDeviceFiles> dmsBaseDeviceFilesList = dmsBaseDeviceFilesMapper
.selectDmsBaseDeviceFilesList(DeviceFiles);
if(dmsBaseDeviceFilesList.size()>0 && !dmsBaseDeviceFiles.getDeviceFilesId()
.equals(dmsBaseDeviceFilesList.get(0).getDeviceFilesId())) {
throw new ServiceException("设备档案编号已存在");
}
LoginUser user = SecurityUtils.getLoginUser();
int index = dmsBaseDeviceFiles.getFilesPath().lastIndexOf("/");
String name = dmsBaseDeviceFiles.getFilesPath().substring(index+1);

@ -1,7 +1,9 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -54,8 +56,14 @@ public class DmsBaseDeviceInstallServiceImpl implements IDmsBaseDeviceInstallSer
@Override
public int insertDmsBaseDeviceInstall(DmsBaseDeviceInstall dmsBaseDeviceInstall)
{
LoginUser loginUser = new LoginUser();
LoginUser loginUser = SecurityUtils.getLoginUser();
DmsBaseDeviceInstall DeviceInstall = new DmsBaseDeviceInstall();
DeviceInstall.setDeviceId(dmsBaseDeviceInstall.getDeviceId());
List<DmsBaseDeviceInstall> dmsBaseDeviceInstallList = dmsBaseDeviceInstallMapper
.selectDmsBaseDeviceInstallList(DeviceInstall);
if (dmsBaseDeviceInstallList.size()>0){
throw new ServiceException("该设备已安装,只能有一条安装记录");
}
dmsBaseDeviceInstall.setCreateBy(loginUser.getUsername());
dmsBaseDeviceInstall.setCreateTime(DateUtils.getNowDate());
return dmsBaseDeviceInstallMapper.insertDmsBaseDeviceInstall(dmsBaseDeviceInstall);
@ -69,9 +77,15 @@ public class DmsBaseDeviceInstallServiceImpl implements IDmsBaseDeviceInstallSer
*/
@Override
public int updateDmsBaseDeviceInstall(DmsBaseDeviceInstall dmsBaseDeviceInstall)
{
LoginUser loginUser = new LoginUser();
{ DmsBaseDeviceInstall DeviceInstall = new DmsBaseDeviceInstall();
DeviceInstall.setDeviceId(dmsBaseDeviceInstall.getDeviceId());
List<DmsBaseDeviceInstall> dmsBaseDeviceInstallList = dmsBaseDeviceInstallMapper
.selectDmsBaseDeviceInstallList(DeviceInstall);
if (dmsBaseDeviceInstallList.size()>0&&!dmsBaseDeviceInstallList.get(0).getDeviceInstallId()
.equals(dmsBaseDeviceInstall.getDeviceInstallId())){
throw new ServiceException("该设备已安装,只能有一条安装记录");
}
LoginUser loginUser = SecurityUtils.getLoginUser();
dmsBaseDeviceInstall.setUpdateBy(loginUser.getUsername());
dmsBaseDeviceInstall.setUpdateTime(DateUtils.getNowDate());
return dmsBaseDeviceInstallMapper.updateDmsBaseDeviceInstall(dmsBaseDeviceInstall);

@ -4,6 +4,7 @@ import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -53,7 +54,15 @@ public class DmsBaseDeviceLedgerServiceImpl implements IDmsBaseDeviceLedgerServi
@Override
public int insertDmsBaseDeviceLedger(DmsBaseDeviceLedger dmsBaseDeviceLedger) {
dmsBaseDeviceLedger.setIsFlag(1l);
LoginUser loginUser = new LoginUser();
LoginUser loginUser = SecurityUtils.getLoginUser();
DmsBaseDeviceLedger DeviceLedger = new DmsBaseDeviceLedger();
DeviceLedger.setDeviceCode(dmsBaseDeviceLedger.getDeviceCode());
List<DmsBaseDeviceLedger> dmsBaseDeviceLedgerList = dmsBaseDeviceLedgerMapper.
selectDmsBaseDeviceLedgerList(DeviceLedger);
if (dmsBaseDeviceLedgerList.size()>0) {
throw new ServiceException("设备编号已存在");
}
dmsBaseDeviceLedger.setCreateBy(loginUser.getUsername());
dmsBaseDeviceLedger.setCreateTime(DateUtils.getNowDate());
return dmsBaseDeviceLedgerMapper.insertDmsBaseDeviceLedger(dmsBaseDeviceLedger);
@ -67,7 +76,18 @@ public class DmsBaseDeviceLedgerServiceImpl implements IDmsBaseDeviceLedgerServi
*/
@Override
public int updateDmsBaseDeviceLedger(DmsBaseDeviceLedger dmsBaseDeviceLedger) {
LoginUser loginUser = new LoginUser();
LoginUser loginUser = SecurityUtils.getLoginUser();
//先判断DeviceCode是否为空设备转移时转入的实体是没有DeviceCode不会触发这个方法
if (dmsBaseDeviceLedger.getDeviceCode() != null) {
DmsBaseDeviceLedger DeviceLedger = new DmsBaseDeviceLedger();
DeviceLedger.setDeviceCode(dmsBaseDeviceLedger.getDeviceCode());
List<DmsBaseDeviceLedger> dmsBaseDeviceLedgerList = dmsBaseDeviceLedgerMapper
.selectDmsBaseDeviceLedgerList(DeviceLedger);
if (!dmsBaseDeviceLedgerList.isEmpty() && !dmsBaseDeviceLedgerList.get(0).getDeviceId()
.equals(dmsBaseDeviceLedger.getDeviceId())) {
throw new ServiceException(dmsBaseDeviceLedger.getDeviceCode() + "编号已存在");
}
}
dmsBaseDeviceLedger.setUpdateBy(loginUser.getUsername());
dmsBaseDeviceLedger.setUpdateTime(DateUtils.getNowDate());
return dmsBaseDeviceLedgerMapper.updateDmsBaseDeviceLedger(dmsBaseDeviceLedger);

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
@ -55,6 +56,11 @@ public class DmsBaseDeviceParamServiceImpl implements IDmsBaseDeviceParamService
@Override
public int insertDmsBaseDeviceParam(DmsBaseDeviceParam dmsBaseDeviceParam)
{
DmsBaseDeviceParam DeviceParam =new DmsBaseDeviceParam();
DeviceParam.setParamCode(dmsBaseDeviceParam.getParamCode());
List<DmsBaseDeviceParam> dmsBaseDeviceParamList = dmsBaseDeviceParamMapper
.selectDmsBaseDeviceParamList(DeviceParam);
if (dmsBaseDeviceParamList.size()>0) throw new ServiceException("参数编码重复");
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseDeviceParam.setCreateBy(user.getUsername());
dmsBaseDeviceParam.setIsFlag(1l);
@ -71,6 +77,14 @@ public class DmsBaseDeviceParamServiceImpl implements IDmsBaseDeviceParamService
@Override
public int updateDmsBaseDeviceParam(DmsBaseDeviceParam dmsBaseDeviceParam)
{
DmsBaseDeviceParam DeviceParam =new DmsBaseDeviceParam();
DeviceParam.setParamCode(dmsBaseDeviceParam.getParamCode());
List<DmsBaseDeviceParam> dmsBaseDeviceParamList = dmsBaseDeviceParamMapper
.selectDmsBaseDeviceParamList(DeviceParam);
if (dmsBaseDeviceParamList.size()>0 && !dmsBaseDeviceParamList.get(0).getDeviceParamId()
.equals(dmsBaseDeviceParam.getDeviceParamId())) {
throw new ServiceException("参数编码重复");
}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseDeviceParam.setUpdateBy(user.getUsername());
dmsBaseDeviceParam.setIsFlag(1l);

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -53,6 +54,11 @@ public class DmsBaseDevicePurchaseServiceImpl implements IDmsBaseDevicePurchaseS
@Override
public int insertDmsBaseDevicePurchase(DmsBaseDevicePurchase dmsBaseDevicePurchase)
{
DmsBaseDevicePurchase DevicePurchase = new DmsBaseDevicePurchase();
DevicePurchase.setWorkOrder(dmsBaseDevicePurchase.getWorkOrder());
List<DmsBaseDevicePurchase> dmsBaseDevicePurchaseS = dmsBaseDevicePurchaseMapper
.selectDmsBaseDevicePurchaseList(DevicePurchase);
if (dmsBaseDevicePurchaseS.size() > 0){throw new ServiceException("工单号已存在");}
dmsBaseDevicePurchase.setCreateTime(DateUtils.getNowDate());
return dmsBaseDevicePurchaseMapper.insertDmsBaseDevicePurchase(dmsBaseDevicePurchase);
}
@ -66,6 +72,14 @@ public class DmsBaseDevicePurchaseServiceImpl implements IDmsBaseDevicePurchaseS
@Override
public int updateDmsBaseDevicePurchase(DmsBaseDevicePurchase dmsBaseDevicePurchase)
{
DmsBaseDevicePurchase DevicePurchase = new DmsBaseDevicePurchase();
DevicePurchase.setWorkOrder(dmsBaseDevicePurchase.getWorkOrder());
List<DmsBaseDevicePurchase> dmsBaseDevicePurchaseList= dmsBaseDevicePurchaseMapper
.selectDmsBaseDevicePurchaseList(DevicePurchase);
if (dmsBaseDevicePurchaseList.size() > 0 && !dmsBaseDevicePurchase.getDevicePurchaseId()
.equals(dmsBaseDevicePurchaseList.get(0).getDevicePurchaseId())){
throw new ServiceException("采购计划编号已存在");
}
dmsBaseDevicePurchase.setUpdateTime(DateUtils.getNowDate());
return dmsBaseDevicePurchaseMapper.updateDmsBaseDevicePurchase(dmsBaseDevicePurchase);
}

@ -1,7 +1,9 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -54,7 +56,14 @@ public class DmsBaseDeviceSuplierServiceImpl implements IDmsBaseDeviceSuplierSer
@Override
public int insertDmsBaseDeviceSuplier(DmsBaseDeviceSuplier dmsBaseDeviceSuplier)
{
LoginUser loginUser = new LoginUser();
LoginUser loginUser = SecurityUtils.getLoginUser();
DmsBaseDeviceSuplier DeviceSuplier = new DmsBaseDeviceSuplier();
DeviceSuplier.setSuplierCode(dmsBaseDeviceSuplier.getSuplierCode());
List<DmsBaseDeviceSuplier> dmsBaseDeviceSuplierList = dmsBaseDeviceSuplierMapper.
selectDmsBaseDeviceSuplierList(DeviceSuplier);
if (dmsBaseDeviceSuplierList.size() > 0){
throw new ServiceException("供应商编号已存在");
}
dmsBaseDeviceSuplier.setCreateBy(loginUser.getUsername());
//添加标识
dmsBaseDeviceSuplier.setIsFlag(1l);
@ -71,7 +80,15 @@ public class DmsBaseDeviceSuplierServiceImpl implements IDmsBaseDeviceSuplierSer
@Override
public int updateDmsBaseDeviceSuplier(DmsBaseDeviceSuplier dmsBaseDeviceSuplier)
{
LoginUser loginUser = new LoginUser();
LoginUser loginUser = SecurityUtils.getLoginUser();
DmsBaseDeviceSuplier DeviceSuplier = new DmsBaseDeviceSuplier();
DeviceSuplier.setSuplierCode(dmsBaseDeviceSuplier.getSuplierCode());
List<DmsBaseDeviceSuplier> dmsBaseDeviceSuplierList = dmsBaseDeviceSuplierMapper.
selectDmsBaseDeviceSuplierList(DeviceSuplier);
if (dmsBaseDeviceSuplierList.size() > 0 && !dmsBaseDeviceSuplierList.get(0).getSupplierId()
.equals(dmsBaseDeviceSuplier.getSupplierId())){
throw new ServiceException("供应商编号已存在");
}
dmsBaseDeviceSuplier.setUpdateBy(loginUser.getUsername());
dmsBaseDeviceSuplier.setUpdateTime(DateUtils.getNowDate());
return dmsBaseDeviceSuplierMapper.updateDmsBaseDeviceSuplier(dmsBaseDeviceSuplier);

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.dms.domain.DmsBaseDeviceBom;
@ -56,6 +57,11 @@ public class DmsBaseDeviceTypeServiceImpl implements IDmsBaseDeviceTypeService
@Override
public int insertDmsBaseDeviceType(DmsBaseDeviceType dmsBaseDeviceType)
{
DmsBaseDeviceType DeviceType = new DmsBaseDeviceType();
DeviceType.setTypeCode(dmsBaseDeviceType.getTypeCode());
List<DmsBaseDeviceType> dmsBaseDeviceTypeList = dmsBaseDeviceTypeMapper.
selectDmsBaseDeviceTypeList(DeviceType);
if(dmsBaseDeviceTypeList.size()>0){throw new ServiceException("设备类型编码已存在");}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseDeviceType.setCreateBy(user.getUsername());
dmsBaseDeviceType.setIsFlag(1l);
@ -82,6 +88,14 @@ public class DmsBaseDeviceTypeServiceImpl implements IDmsBaseDeviceTypeService
@Override
public int updateDmsBaseDeviceType(DmsBaseDeviceType dmsBaseDeviceType)
{
DmsBaseDeviceType DeviceType = new DmsBaseDeviceType();
DeviceType.setTypeCode(dmsBaseDeviceType.getTypeCode());
List<DmsBaseDeviceType> dmsBaseDeviceTypeList = dmsBaseDeviceTypeMapper.
selectDmsBaseDeviceTypeList(DeviceType);
if(dmsBaseDeviceTypeList.size()>0 && !dmsBaseDeviceTypeList.get(0).getDeviceTypeId().
equals(dmsBaseDeviceType.getDeviceTypeId())){
throw new ServiceException("设备类型编码已存在");
}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseDeviceType.setUpdateBy(user.getUsername());
dmsBaseDeviceType.setUpdateTime(DateUtils.getNowDate());

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
@ -55,6 +56,13 @@ public class DmsBaseInspectProjectServiceImpl implements IDmsBaseInspectProjectS
@Override
public int insertDmsBaseInspectProject(DmsBaseInspectProject dmsBaseInspectProject)
{
DmsBaseInspectProject InspectProject = new DmsBaseInspectProject();
InspectProject.setInspectProjectCode(dmsBaseInspectProject.getInspectProjectCode());
List<DmsBaseInspectProject> DmsBaseInspectProjectList = dmsBaseInspectProjectMapper
.selectDmsBaseInspectProjectList(InspectProject);
if (DmsBaseInspectProjectList.size()>0){
throw new ServiceException("巡检项目编号已存在");
}
if (dmsBaseInspectProject.getInspectType()==null){
dmsBaseInspectProject.setInspectType("1");
}
@ -74,6 +82,14 @@ public class DmsBaseInspectProjectServiceImpl implements IDmsBaseInspectProjectS
@Override
public int updateDmsBaseInspectProject(DmsBaseInspectProject dmsBaseInspectProject)
{
DmsBaseInspectProject InspectProject = new DmsBaseInspectProject();
InspectProject.setInspectProjectCode(dmsBaseInspectProject.getInspectProjectCode());
List<DmsBaseInspectProject> DmsBaseInspectProjectList = dmsBaseInspectProjectMapper
.selectDmsBaseInspectProjectList(InspectProject);
if (DmsBaseInspectProjectList.size()>0 && !DmsBaseInspectProjectList.get(0).getInspectProjectId()
.equals(dmsBaseInspectProject.getInspectProjectId())){
throw new ServiceException("巡检项目编号已存在");
}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseInspectProject.setUpdateBy(user.getUsername());
dmsBaseInspectProject.setUpdateTime(DateUtils.getNowDate());

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.log.annotation.Log;
import com.hw.common.security.utils.SecurityUtils;
@ -59,6 +60,11 @@ public class DmsBaseInspectRouteServiceImpl implements IDmsBaseInspectRouteServi
if (dmsBaseInspectRoute.getInspectType()==null){
dmsBaseInspectRoute.setInspectType("1");
}
DmsBaseInspectRoute InspectRoute = new DmsBaseInspectRoute();
InspectRoute.setRouteCode(dmsBaseInspectRoute.getRouteCode());
List<DmsBaseInspectRoute> InspectRoutelist = dmsBaseInspectRouteMapper.
selectDmsBaseInspectRouteList(InspectRoute);
if (InspectRoutelist.size()>0)throw new ServiceException("该路线已存在");
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseInspectRoute.setCreateBy(user.getUsername());
dmsBaseInspectRoute.setIsFlag("1");
@ -75,6 +81,14 @@ public class DmsBaseInspectRouteServiceImpl implements IDmsBaseInspectRouteServi
@Override
public int updateDmsBaseInspectRoute(DmsBaseInspectRoute dmsBaseInspectRoute)
{
DmsBaseInspectRoute InspectRoute = new DmsBaseInspectRoute();
InspectRoute.setRouteCode(dmsBaseInspectRoute.getRouteCode());
List<DmsBaseInspectRoute> InspectRoutelist = dmsBaseInspectRouteMapper.
selectDmsBaseInspectRouteList(InspectRoute);
if (InspectRoutelist.size()>0 && !dmsBaseInspectRoute.getInspectRouteId()
.equals(InspectRoutelist.get(0).getInspectRouteId())){
throw new ServiceException("该路线已存在");
}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseInspectRoute.setUpdateBy(user.getUsername());
dmsBaseInspectRoute.setUpdateTime(DateUtils.getNowDate());

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
@ -55,6 +56,11 @@ public class DmsBaseInspectStandardServiceImpl implements IDmsBaseInspectStandar
@Override
public int insertDmsBaseInspectStandard(DmsBaseInspectStandard dmsBaseInspectStandard)
{
DmsBaseInspectStandard InspectStandard = new DmsBaseInspectStandard();
InspectStandard.setStandardCode(dmsBaseInspectStandard.getStandardCode());
List<DmsBaseInspectStandard> dmsBaseInspectStandardList = dmsBaseInspectStandardMapper.
selectDmsBaseInspectStandardList(InspectStandard);
if (dmsBaseInspectStandardList.size() > 0){throw new ServiceException("巡检标准编号已存在");}
dmsBaseInspectStandard.setIsFlag("1");
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseInspectStandard.setCreateBy(user.getUsername());
@ -71,6 +77,14 @@ public class DmsBaseInspectStandardServiceImpl implements IDmsBaseInspectStandar
@Override
public int updateDmsBaseInspectStandard(DmsBaseInspectStandard dmsBaseInspectStandard)
{
DmsBaseInspectStandard InspectStandard = new DmsBaseInspectStandard();
InspectStandard.setStandardCode(dmsBaseInspectStandard.getStandardCode());
List<DmsBaseInspectStandard> dmsBaseInspectStandardList = dmsBaseInspectStandardMapper.
selectDmsBaseInspectStandardList(InspectStandard);
if (dmsBaseInspectStandardList.size() > 0 && !dmsBaseInspectStandardList.get(0).getInspectStandardId()
.equals(dmsBaseInspectStandard.getInspectStandardId())){
throw new ServiceException("巡检标准编号已存在");
}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseInspectStandard.setUpdateBy(user.getUsername());
dmsBaseInspectStandard.setUpdateTime(DateUtils.getNowDate());

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
@ -55,6 +56,12 @@ public class DmsBaseLubeStandardServiceImpl implements IDmsBaseLubeStandardServi
@Override
public int insertDmsBaseLubeStandard(DmsBaseLubeStandard dmsBaseLubeStandard)
{
//ZCH
DmsBaseLubeStandard LubeStandard = new DmsBaseLubeStandard();
LubeStandard.setLubeStandardCode(dmsBaseLubeStandard.getLubeStandardCode());
List<DmsBaseLubeStandard> dmsBaseLubeStandardList = dmsBaseLubeStandardMapper.
selectDmsBaseLubeStandardList(LubeStandard);
if (dmsBaseLubeStandardList.size()>0){throw new ServiceException("润滑标准编码已存在");}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseLubeStandard.setIsFlag("1");
dmsBaseLubeStandard.setCreateBy(user.getUsername());
@ -71,7 +78,15 @@ public class DmsBaseLubeStandardServiceImpl implements IDmsBaseLubeStandardServi
@Override
public int updateDmsBaseLubeStandard(DmsBaseLubeStandard dmsBaseLubeStandard)
{
//ZCH
DmsBaseLubeStandard LubeStandard = new DmsBaseLubeStandard();
LubeStandard.setLubeStandardCode(dmsBaseLubeStandard.getLubeStandardCode());
List<DmsBaseLubeStandard> dmsBaseLubeStandardList = dmsBaseLubeStandardMapper.
selectDmsBaseLubeStandardList(LubeStandard);
if (dmsBaseLubeStandardList.size()>0&&!dmsBaseLubeStandard.getLubeStandardId()
.equals(dmsBaseLubeStandardList.get(0).getLubeStandardId())){
throw new ServiceException("润滑标准编码已存在");
}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseLubeStandard.setUpdateBy(user.getUsername());
dmsBaseLubeStandard.setUpdateTime(DateUtils.getNowDate());

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
@ -55,7 +56,14 @@ public class DmsBaseLubeStationServiceImpl implements IDmsBaseLubeStationService
@Override
public int insertDmsBaseLubeStation(DmsBaseLubeStation dmsBaseLubeStation)
{
LoginUser user = new LoginUser();
LoginUser user = SecurityUtils.getLoginUser();
DmsBaseLubeStation BaseLubeStation = new DmsBaseLubeStation();
BaseLubeStation.setLubeStationCode(dmsBaseLubeStation.getLubeStationCode());
List<DmsBaseLubeStation> dmsBaseLubeStationList = dmsBaseLubeStationMapper
.selectDmsBaseLubeStationList(BaseLubeStation);
if (dmsBaseLubeStationList.size() > 0){
throw new ServiceException("润滑部位编码已存在");
}
dmsBaseLubeStation.setIsFlag("1");
dmsBaseLubeStation.setCreateBy(user.getUsername());
dmsBaseLubeStation.setCreateTime(DateUtils.getNowDate());
@ -71,6 +79,15 @@ public class DmsBaseLubeStationServiceImpl implements IDmsBaseLubeStationService
@Override
public int updateDmsBaseLubeStation(DmsBaseLubeStation dmsBaseLubeStation)
{
//ZCH
DmsBaseLubeStation BaseLubeStation = new DmsBaseLubeStation();
BaseLubeStation.setLubeStationCode(dmsBaseLubeStation.getLubeStationCode());
List<DmsBaseLubeStation> dmsBaseLubeStationList = dmsBaseLubeStationMapper
.selectDmsBaseLubeStationList(BaseLubeStation);
if (dmsBaseLubeStationList.size() > 0 && !dmsBaseLubeStationList.get(0).
getLubeStationId().equals(dmsBaseLubeStation.getLubeStationId())){
throw new ServiceException("润滑部位编码已存在");
}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseLubeStation.setUpdateBy(user.getUsername());
dmsBaseLubeStation.setUpdateTime(DateUtils.getNowDate());

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
@ -55,7 +56,13 @@ public class DmsBaseMaintStandardServiceImpl implements IDmsBaseMaintStandardSer
@Override
public int insertDmsBaseMaintStandard(DmsBaseMaintStandard dmsBaseMaintStandard)
{
DmsBaseMaintStandard MaintStandard = new DmsBaseMaintStandard();
MaintStandard.setMaintStandardCode(dmsBaseMaintStandard.getMaintStandardCode());
List<DmsBaseMaintStandard> dmsBaseMaintStandardList = dmsBaseMaintStandardMapper
.selectDmsBaseMaintStandardList(MaintStandard);
if (dmsBaseMaintStandardList.size()>0 ) {
throw new ServiceException("保养标准编码已存在");
}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseMaintStandard.setIsFlag(1l);
dmsBaseMaintStandard.setDeviceTypeId(0l);
@ -73,6 +80,14 @@ public class DmsBaseMaintStandardServiceImpl implements IDmsBaseMaintStandardSer
@Override
public int updateDmsBaseMaintStandard(DmsBaseMaintStandard dmsBaseMaintStandard)
{
DmsBaseMaintStandard MaintStandard = new DmsBaseMaintStandard();
MaintStandard.setMaintStandardCode(dmsBaseMaintStandard.getMaintStandardCode());
List<DmsBaseMaintStandard> dmsBaseMaintStandardList = dmsBaseMaintStandardMapper
.selectDmsBaseMaintStandardList(MaintStandard);
if (dmsBaseMaintStandardList.size()>0 && !dmsBaseMaintStandardList.get(0).getMaintStandardId()
.equals(dmsBaseMaintStandard.getMaintStandardId())) {
throw new ServiceException("保养标准编码已存在");
}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseMaintStandard.setUpdateBy(user.getUsername());

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
@ -55,6 +56,11 @@ public class DmsBaseMaintStationServiceImpl implements IDmsBaseMaintStationServi
@Override
public int insertDmsBaseMaintStation(DmsBaseMaintStation dmsBaseMaintStation)
{
DmsBaseMaintStation MaintStation = new DmsBaseMaintStation();
MaintStation.setMaintStationCode(dmsBaseMaintStation.getMaintStationCode());
List<DmsBaseMaintStation> dmsBaseMaintStationlist = dmsBaseMaintStationMapper
.selectDmsBaseMaintStationList(MaintStation);
if (dmsBaseMaintStationlist.size() > 0){throw new ServiceException("保养部位信息编码已存在");}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseMaintStation.setIsFlag(1l);
dmsBaseMaintStation.setCreateBy(user.getUsername());
@ -71,6 +77,13 @@ public class DmsBaseMaintStationServiceImpl implements IDmsBaseMaintStationServi
@Override
public int updateDmsBaseMaintStation(DmsBaseMaintStation dmsBaseMaintStation)
{
DmsBaseMaintStation MaintStation = new DmsBaseMaintStation();
MaintStation.setMaintStationCode(dmsBaseMaintStation.getMaintStationCode());
List<DmsBaseMaintStation> dmsBaseMaintStationlist = dmsBaseMaintStationMapper
.selectDmsBaseMaintStationList(MaintStation);
if (dmsBaseMaintStationlist.size() > 0 && !dmsBaseMaintStationlist.get(0).getMaintStationId()
.equals(dmsBaseMaintStation.getMaintStationId())){
throw new ServiceException("保养部位信息编码已存在");}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseMaintStation.setUpdateBy(user.getUsername());
dmsBaseMaintStation.setUpdateTime(DateUtils.getNowDate());

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
@ -55,6 +56,13 @@ public class DmsBaseOutsrcInfoServiceImpl implements IDmsBaseOutsrcInfoService
@Override
public int insertDmsBaseOutsrcInfo(DmsBaseOutsrcInfo dmsBaseOutsrcInfo)
{
DmsBaseOutsrcInfo OutsrcInfo = new DmsBaseOutsrcInfo();
OutsrcInfo.setOutsrcCode(dmsBaseOutsrcInfo.getOutsrcCode());
List<DmsBaseOutsrcInfo> dmsBaseOutsrcInfoList = dmsBaseOutsrcInfoMapper.
selectDmsBaseOutsrcInfoList(OutsrcInfo);
if (dmsBaseOutsrcInfoList.size()>0){
throw new ServiceException("外协编号已存在");
}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseOutsrcInfo.setIsFlag(1l);
dmsBaseOutsrcInfo.setCreateBy(user.getUsername());
@ -71,6 +79,14 @@ public class DmsBaseOutsrcInfoServiceImpl implements IDmsBaseOutsrcInfoService
@Override
public int updateDmsBaseOutsrcInfo(DmsBaseOutsrcInfo dmsBaseOutsrcInfo)
{
DmsBaseOutsrcInfo OutsrcInfo = new DmsBaseOutsrcInfo();
OutsrcInfo.setOutsrcCode(dmsBaseOutsrcInfo.getOutsrcCode());
List<DmsBaseOutsrcInfo> dmsBaseOutsrcInfoList = dmsBaseOutsrcInfoMapper.
selectDmsBaseOutsrcInfoList(OutsrcInfo);
if (dmsBaseOutsrcInfoList.size()>0 && !dmsBaseOutsrcInfo.getOutsrcId()
.equals(dmsBaseOutsrcInfoList.get(0).getOutsrcId())){
throw new ServiceException("外协编号已存在");
}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseOutsrcInfo.setUpdateBy(user.getUsername());
dmsBaseOutsrcInfo.setUpdateTime(DateUtils.getNowDate());

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
@ -55,6 +56,11 @@ public class DmsBaseShutReasonServiceImpl implements IDmsBaseShutReasonService
@Override
public int insertDmsBaseShutReason(DmsBaseShutReason dmsBaseShutReason)
{
DmsBaseShutReason ShutReason = new DmsBaseShutReason();
ShutReason.setReasonCode(dmsBaseShutReason.getReasonCode());
List<DmsBaseShutReason> dmsBaseShutReasonList = dmsBaseShutReasonMapper
.selectDmsBaseShutReasonList(ShutReason);
if (dmsBaseShutReasonList.size()>0){throw new ServiceException("停机原因编号已存在");}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseShutReason.setIsFlag("1");
dmsBaseShutReason.setCreateBy(user.getUsername());
@ -71,6 +77,14 @@ public class DmsBaseShutReasonServiceImpl implements IDmsBaseShutReasonService
@Override
public int updateDmsBaseShutReason(DmsBaseShutReason dmsBaseShutReason)
{
DmsBaseShutReason ShutReason = new DmsBaseShutReason();
ShutReason.setReasonCode(dmsBaseShutReason.getReasonCode());
List<DmsBaseShutReason> dmsBaseShutReasonList = dmsBaseShutReasonMapper
.selectDmsBaseShutReasonList(ShutReason);
if (dmsBaseShutReasonList.size()>0 && !dmsBaseShutReason.getShutReasonId()
.equals(dmsBaseShutReasonList.get(0).getShutReasonId())){
throw new ServiceException("停机原因编号已存在");
}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseShutReason.setUpdateBy(user.getUsername());
dmsBaseShutReason.setUpdateTime(DateUtils.getNowDate());

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
@ -55,6 +56,11 @@ public class DmsBaseShutTypeServiceImpl implements IDmsBaseShutTypeService
@Override
public int insertDmsBaseShutType(DmsBaseShutType dmsBaseShutType)
{
DmsBaseShutType ShutType = new DmsBaseShutType();
ShutType.setTypeCode(dmsBaseShutType.getTypeCode());
List<DmsBaseShutType> DmsBaseShutTypeList = dmsBaseShutTypeMapper
.selectDmsBaseShutTypeList(ShutType);
if (DmsBaseShutTypeList.size() > 0){throw new ServiceException("停机类型编码已存在");}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseShutType.setIsFlag("1");
dmsBaseShutType.setCreateBy(user.getUsername());
@ -71,7 +77,15 @@ public class DmsBaseShutTypeServiceImpl implements IDmsBaseShutTypeService
@Override
public int updateDmsBaseShutType(DmsBaseShutType dmsBaseShutType)
{
LoginUser user = new LoginUser();
LoginUser user = SecurityUtils.getLoginUser();
DmsBaseShutType ShutType = new DmsBaseShutType();
ShutType.setTypeCode(dmsBaseShutType.getTypeCode());
List<DmsBaseShutType> DmsBaseShutTypeList = dmsBaseShutTypeMapper
.selectDmsBaseShutTypeList(ShutType);
if (DmsBaseShutTypeList.size() > 0 && !dmsBaseShutType.getShutTypeId()
.equals(DmsBaseShutTypeList.get(0).getShutTypeId())){
throw new ServiceException("停机类型编码已存在");
}
dmsBaseShutType.setUpdateBy(user.getUsername());
dmsBaseShutType.setUpdateTime(DateUtils.getNowDate());
return dmsBaseShutTypeMapper.updateDmsBaseShutType(dmsBaseShutType);

@ -1,8 +1,11 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.dms.domain.DmsBaseDeviceParam;
import com.hw.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -55,6 +58,13 @@ public class DmsBaseSpecialdeviceParamServiceImpl implements IDmsBaseSpecialdevi
@Override
public int insertDmsBaseSpecialdeviceParam(DmsBaseSpecialdeviceParam dmsBaseSpecialdeviceParam)
{
DmsBaseSpecialdeviceParam DeviceParam =new DmsBaseSpecialdeviceParam();
DeviceParam.setParamCode(dmsBaseSpecialdeviceParam.getParamCode());
List<DmsBaseSpecialdeviceParam> dmsBaseDeviceParamList = dmsBaseSpecialdeviceParamMapper
.selectDmsBaseSpecialdeviceParamList(DeviceParam);
if (dmsBaseDeviceParamList.size()>0 ) {
throw new ServiceException("参数编号重复");
}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseSpecialdeviceParam.setCreateBy(user.getUsername());
dmsBaseSpecialdeviceParam.setIsFlag(1l);
@ -71,7 +81,15 @@ public class DmsBaseSpecialdeviceParamServiceImpl implements IDmsBaseSpecialdevi
@Override
public int updateDmsBaseSpecialdeviceParam(DmsBaseSpecialdeviceParam dmsBaseSpecialdeviceParam)
{
LoginUser user = new LoginUser();
DmsBaseSpecialdeviceParam DeviceParam =new DmsBaseSpecialdeviceParam();
DeviceParam.setParamCode(dmsBaseSpecialdeviceParam.getParamCode());
List<DmsBaseSpecialdeviceParam> dmsBaseDeviceParamList = dmsBaseSpecialdeviceParamMapper
.selectDmsBaseSpecialdeviceParamList(DeviceParam);
if (dmsBaseDeviceParamList.size()>0 && !dmsBaseDeviceParamList.get(0).getSpecialdeviceParamId()
.equals(dmsBaseSpecialdeviceParam.getSpecialdeviceParamId())) {
throw new ServiceException("参数编号重复");
}
LoginUser user = SecurityUtils.getLoginUser();
dmsBaseSpecialdeviceParam.setUpdateBy(user.getUsername());
dmsBaseSpecialdeviceParam.setUpdateTime(DateUtils.getNowDate());
return dmsBaseSpecialdeviceParamMapper.updateDmsBaseSpecialdeviceParam(dmsBaseSpecialdeviceParam);

@ -1,7 +1,10 @@
package com.hw.dms.service.impl;
import java.util.Date;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -54,7 +57,28 @@ public class DmsBaseTransferInfoServiceImpl implements IDmsBaseTransferInfoServi
@Override
public int insertDmsBaseTransferInfo(DmsBaseTransferInfo dmsBaseTransferInfo)
{
LoginUser loginUser = new LoginUser();
LoginUser loginUser = SecurityUtils.getLoginUser();
if (dmsBaseTransferInfo.getDevicePositionNew().equals(dmsBaseTransferInfo.getDevicePosition())){
throw new ServiceException("新位置不能与原位置相同");
} else if (dmsBaseTransferInfo.getDevicePosition() == null) {
throw new ServiceException("转移前必须有安装位置");
}
//dmsBaseTransferInfoSave是数据库原有的时间dmsBaseTransferInfo是要新插入的时间
DmsBaseTransferInfo dmsBaseTransferInfoSave = new DmsBaseTransferInfo();
dmsBaseTransferInfoSave.setDeviceId(dmsBaseTransferInfo.getDeviceId());
dmsBaseTransferInfoSave.setDevicePositionNew(dmsBaseTransferInfo.getDevicePosition());
List<DmsBaseTransferInfo> dmsBaseTransferInfoList = dmsBaseTransferInfoMapper
.selectDmsBaseTransferInfoList(dmsBaseTransferInfoSave);
if (dmsBaseTransferInfoList.size() > 0) {
for (DmsBaseTransferInfo dmsBaseTransferInfoDate : dmsBaseTransferInfoList) {
Date oldDate = dmsBaseTransferInfoDate.getDeviceTransferTime();
Date newDate = dmsBaseTransferInfo.getDeviceTransferTime();
int result = newDate.compareTo(oldDate);
if (result == -1) {
throw new ServiceException("设备转移时间不能小于之前记录的设备转移时间");
}
}
}
dmsBaseTransferInfo.setCreateBy(loginUser.getUsername());
dmsBaseTransferInfo.setCreateTime(DateUtils.getNowDate());
return dmsBaseTransferInfoMapper.insertDmsBaseTransferInfo(dmsBaseTransferInfo);
@ -69,7 +93,7 @@ public class DmsBaseTransferInfoServiceImpl implements IDmsBaseTransferInfoServi
@Override
public int updateDmsBaseTransferInfo(DmsBaseTransferInfo dmsBaseTransferInfo)
{
LoginUser loginUser = new LoginUser();
LoginUser loginUser = SecurityUtils.getLoginUser();
dmsBaseTransferInfo.setUpdateBy(loginUser.getUsername());
dmsBaseTransferInfo.setUpdateTime(DateUtils.getNowDate());
return dmsBaseTransferInfoMapper.updateDmsBaseTransferInfo(dmsBaseTransferInfo);

@ -3,6 +3,7 @@ package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -55,7 +56,7 @@ public class DmsFlowCheckplanDetailServiceImpl implements IDmsFlowCheckplanDetai
@Override
public int insertDmsFlowCheckplanDetail(DmsFlowCheckplanDetail dmsFlowCheckplanDetail)
{
LoginUser loginUser = new LoginUser();
LoginUser loginUser = SecurityUtils.getLoginUser();
dmsFlowCheckplanDetail.setCreateBy(loginUser.getUsername());
dmsFlowCheckplanDetail.setCreateTime(DateUtils.getNowDate());
return dmsFlowCheckplanDetailMapper.insertDmsFlowCheckplanDetail(dmsFlowCheckplanDetail);
@ -70,7 +71,7 @@ public class DmsFlowCheckplanDetailServiceImpl implements IDmsFlowCheckplanDetai
@Override
public int updateDmsFlowCheckplanDetail(DmsFlowCheckplanDetail dmsFlowCheckplanDetail)
{
LoginUser loginUser = new LoginUser();
LoginUser loginUser = SecurityUtils.getLoginUser();
dmsFlowCheckplanDetail.setUpdateBy(loginUser.getUsername());
dmsFlowCheckplanDetail.setUpdateTime(DateUtils.getNowDate());
return dmsFlowCheckplanDetailMapper.updateDmsFlowCheckplanDetail(dmsFlowCheckplanDetail);

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import com.hw.common.core.constant.DmsConstants;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.dms.domain.BaseAttachInfo;
import com.hw.dms.domain.DmsInstanceFile;
@ -77,6 +78,11 @@ public class DmsKnowledgeLubeServiceImpl implements IDmsKnowledgeLubeService
@Override
public int insertDmsKnowledgeLube(DmsKnowledgeLube dmsKnowledgeLube)
{
DmsKnowledgeLube KnowledgeLube = new DmsKnowledgeLube();
KnowledgeLube.setExperienceCode(dmsKnowledgeLube.getExperienceCode());
List<DmsKnowledgeLube> dmsKnowledgeLubeList = dmsKnowledgeLubeMapper
.selectDmsKnowledgeLubeList(KnowledgeLube);
if (dmsKnowledgeLubeList.size()>0){throw new ServiceException("该编号已存在");}
dmsKnowledgeLube.setCreateTime(DateUtils.getNowDate());
dmsKnowledgeLube.setIsFlag("1");
@ -98,6 +104,14 @@ public class DmsKnowledgeLubeServiceImpl implements IDmsKnowledgeLubeService
@Override
public int updateDmsKnowledgeLube(DmsKnowledgeLube dmsKnowledgeLube)
{
DmsKnowledgeLube KnowledgeLube = new DmsKnowledgeLube();
KnowledgeLube.setExperienceCode(dmsKnowledgeLube.getExperienceCode());
List<DmsKnowledgeLube> dmsKnowledgeLubeList = dmsKnowledgeLubeMapper
.selectDmsKnowledgeLubeList(KnowledgeLube);
if (dmsKnowledgeLubeList.size()>0 && !dmsKnowledgeLube.getKnowledgeLubeId()
.equals(dmsKnowledgeLubeList.get(0).getKnowledgeLubeId())){
throw new ServiceException("该编号已存在");
}
dmsKnowledgeLube.setUpdateTime(DateUtils.getNowDate());
int i = dmsKnowledgeLubeMapper.updateDmsKnowledgeLube(dmsKnowledgeLube);
baseAttachInfoMapper.deleteListBaseAttachInfos(DmsConstants.MES_BASE_ATTACH_INFO_KNOWLEDGELUBE,dmsKnowledgeLube.getKnowledgeLubeId());

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import com.hw.common.core.constant.DmsConstants;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.dms.domain.BaseAttachInfo;
import com.hw.dms.domain.DmsBaseMaintStation;
@ -75,7 +76,11 @@ public class DmsKnowledgeMaintServiceImpl implements IDmsKnowledgeMaintService
@Override
public int insertDmsKnowledgeMaint(DmsKnowledgeMaint dmsKnowledgeMaint)
{
DmsKnowledgeMaint KnowledgeMaint = new DmsKnowledgeMaint();
KnowledgeMaint.setExperienceCode(dmsKnowledgeMaint.getExperienceCode());
List<DmsKnowledgeMaint> DmsKnowledgeMaintList = dmsKnowledgeMaintMapper
.selectDmsKnowledgeMaintList(KnowledgeMaint);
if (DmsKnowledgeMaintList.size()>0){throw new ServiceException("知识库编号已存在");}
dmsKnowledgeMaint.setCreateTime(DateUtils.getNowDate());
dmsKnowledgeMaint.setIsFlag("1");
int i = dmsKnowledgeMaintMapper.insertDmsKnowledgeMaint(dmsKnowledgeMaint);
@ -94,6 +99,14 @@ public class DmsKnowledgeMaintServiceImpl implements IDmsKnowledgeMaintService
@Override
public int updateDmsKnowledgeMaint(DmsKnowledgeMaint dmsKnowledgeMaint)
{
DmsKnowledgeMaint KnowledgeMaint = new DmsKnowledgeMaint();
KnowledgeMaint.setExperienceCode(dmsKnowledgeMaint.getExperienceCode());
List<DmsKnowledgeMaint> DmsKnowledgeMaintList = dmsKnowledgeMaintMapper
.selectDmsKnowledgeMaintList(KnowledgeMaint);
if (DmsKnowledgeMaintList.size()>0 && !dmsKnowledgeMaint.getKnowledgeMaintId()
.equals(DmsKnowledgeMaintList.get(0).getKnowledgeMaintId())){
throw new ServiceException("知识库编号已存在");
}
dmsKnowledgeMaint.setUpdateTime(DateUtils.getNowDate());
int i = dmsKnowledgeMaintMapper.updateDmsKnowledgeMaint(dmsKnowledgeMaint);
baseAttachInfoMapper.deleteListBaseAttachInfos(DmsConstants.MES_BASE_ATTACH_INFO_KNOWLEDGEMAINT,dmsKnowledgeMaint.getKnowledgeMaintId());

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import com.hw.common.core.constant.DmsConstants;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.dms.domain.BaseAttachInfo;
import com.hw.dms.mapper.BaseAttachInfoMapper;
@ -72,6 +73,11 @@ public class DmsKnowledgeRepairServiceImpl implements IDmsKnowledgeRepairService
@Override
public int insertDmsKnowledgeRepair(DmsKnowledgeRepair dmsKnowledgeRepair)
{
DmsKnowledgeRepair KnowledgeRepair = new DmsKnowledgeRepair();
KnowledgeRepair.setExperienceCode(dmsKnowledgeRepair.getExperienceCode());
List<DmsKnowledgeRepair> dmsKnowledgeRepairList = dmsKnowledgeRepairMapper
.selectDmsKnowledgeRepairList(KnowledgeRepair);
if (dmsKnowledgeRepairList.size() > 0) {throw new ServiceException("知识库编号已存在");}
dmsKnowledgeRepair.setCreateTime(DateUtils.getNowDate());
dmsKnowledgeRepair.setIsFlag("1");
int i = dmsKnowledgeRepairMapper.insertDmsKnowledgeRepair(dmsKnowledgeRepair);
@ -91,6 +97,14 @@ public class DmsKnowledgeRepairServiceImpl implements IDmsKnowledgeRepairService
@Override
public int updateDmsKnowledgeRepair(DmsKnowledgeRepair dmsKnowledgeRepair)
{
DmsKnowledgeRepair ledgeRepair = new DmsKnowledgeRepair();
ledgeRepair.setExperienceCode(dmsKnowledgeRepair.getExperienceCode());
List<DmsKnowledgeRepair> dmsKnowledgeRepairList = dmsKnowledgeRepairMapper
.selectDmsKnowledgeRepairList(ledgeRepair);
if (dmsKnowledgeRepairList.size() > 0 && !dmsKnowledgeRepair.getKnowledgeRepairId()
.equals(dmsKnowledgeRepairList.get(0).getKnowledgeRepairId())) {
throw new ServiceException("知识库编号已存在");
}
dmsKnowledgeRepair.setUpdateTime(DateUtils.getNowDate());
int i = dmsKnowledgeRepairMapper.updateDmsKnowledgeRepair(dmsKnowledgeRepair);
baseAttachInfoMapper.deleteListBaseAttachInfos(DmsConstants.MES_BASE_ATTACH_INFO_KNOWLEDGEREPAIR,dmsKnowledgeRepair.getKnowledgeRepairId());

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.model.LoginUser;
@ -55,7 +56,8 @@ public class DmsPlanMaintDetailServiceImpl implements IDmsPlanMaintDetailService
@Override
public int insertDmsPlanMaintDetail(DmsPlanMaintDetail dmsPlanMaintDetail)
{
dmsPlanMaintDetail.setCreateBy(SecurityUtils.getUsername());
if (dmsPlanMaintDetail.getDeviceId()==null){throw new ServiceException("设备名称不能为空");}
dmsPlanMaintDetail.setCreateBy(SecurityUtils.getUsername());
dmsPlanMaintDetail.setCreateTime(DateUtils.getNowDate());
dmsPlanMaintDetail.setIsFlag(1l);
return dmsPlanMaintDetailMapper.insertDmsPlanMaintDetail(dmsPlanMaintDetail);

@ -9,6 +9,14 @@ export function listDmsBaseInspectProject(query) {
})
}
// 查询巡检项目信息列表
export function getdmsBaseInspectProjectList(query) {
return request({
url: '/dms/dmsBaseInspectProject/getdmsBaseInspectProjectList',
method: 'get',
params: query
})
}
// 查询巡检项目信息详细
export function getDmsBaseInspectProject(inspectProjectId) {
return request({

@ -9,6 +9,14 @@ export function listDmsBaseInspectRoute(query) {
})
}
// 查询巡检线路信息列表
export function getdmsBaseInspectRouteList(query) {
return request({
url: '/dms/dmsBaseInspectRoute/getdmsBaseInspectRouteList',
method: 'get',
params: query
})
}
// 查询巡检线路信息详细
export function getDmsBaseInspectRoute(inspectRouteId) {
return request({

@ -9,6 +9,15 @@ export function listLubeStandard(query) {
})
}
// 查询润滑标准信息列表
export function getLueStandardList(query) {
return request({
url: '/dms/lubeStandard/getLueStandardList',
method: 'get',
params: query
})
}
// 查询润滑标准信息详细
export function getLubeStandard(lubeStandardId) {
return request({

@ -8,7 +8,6 @@ export function listStandard(query) {
params: query
})
}
// 查询保养标准信息详细
export function getStandard(maintStandardId) {
return request({
@ -17,6 +16,15 @@ export function getStandard(maintStandardId) {
})
}
// 查询保养标准信息详细
export function getMaintStandardlist(query) {
return request({
url: '/dms/standard/getMaintStandardlist',
method: 'get',
params: query
})
}
// 新增保养标准信息
export function addStandard(data) {
return request({

@ -297,12 +297,14 @@
</el-input>
</el-form-item>
</el-col>
<div>
<el-button type="primary" @click="submitForm"> </el-button>
</div>
<!-- <div>-->
<!-- <el-button type="primary" @click="submitForm"> </el-button>-->
<!-- </div>-->
<el-col :span="24">
<el-form-item prop="submitButton" label-width="300px">
<el-button type="primary" @click="submitForm"> </el-button>
</el-form-item>
</el-col>
</el-form>
</el-row>
</div>

@ -308,7 +308,7 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
this.$modal.confirm('是否确认删除设备类型信息编号为"' + row.deviceTypeId + '"的数据项?').then(function() {
this.$modal.confirm('是否确认删除设备类型编号为"' + row.typeCode + '"的数据项?').then(function() {
return delDevicetype(row.deviceTypeId);
}).then(() => {
this.getList();

@ -216,7 +216,7 @@
import { listBom, getBom, delBom, addBom, updateBom ,selectBomByDeviceType} from "@/api/dms/bom";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { listLedger } from '@/api/dms/ledger'
import {getDeviceLedgerList, listLedger} from '@/api/dms/ledger'
import { listDevicetype } from '@/api/dms/devicetype'
export default {
@ -302,8 +302,8 @@ export default {
/** 查询设备台账信息列表 */
getDeviceLedger() {
this.loading = true;
listLedger(this.queryParams).then(response => {
this.ledgerList = response.rows;
getDeviceLedgerList({}).then(response => {
this.ledgerList = response.data;
});
},
/** 查询设备BOM信息列表 */
@ -413,6 +413,7 @@ export default {
this.form.parentId = row.deviceBomId;
} else {
this.form.parentId = 0;
this.change(); // parentId change,bom1
}
this.open = true;
this.title = "添加设备BOM信息";

@ -196,7 +196,7 @@
<!-- <el-input v-model="form.deviceId" placeholder="请输入设备ID,关联dms_base_device_ledger的device_id" />-->
<!-- </el-form-item>-->
<el-form-item label="设备名称" prop="deviceId" >
<el-select v-model="form.deviceId" placeholder="请选择设备" :disabled=isDis>
<el-select v-model="form.deviceId" placeholder="请选择设备" :disabled="form.deviceId!=null">
<el-option
v-for="item in ledgerList"
:key="item.deviceId"
@ -239,7 +239,7 @@
<script>
import { listDebugging, getDebugging, delDebugging, addDebugging, updateDebugging } from "@/api/dms/debugging";
import { listLedger } from '@/api/dms/ledger'
import {getDeviceLedgerList, listLedger} from '@/api/dms/ledger'
export default {
name: "Debugging",
@ -291,6 +291,9 @@ export default {
status: [
{ required: true, message: "调试状态(0未调试1调试中2已完成)不能为空", trigger: "change" }
],
workOrder: [
{ required: true, message: "调试单号不能为空", trigger: "blur" }
],
}
};
},
@ -302,8 +305,8 @@ export default {
/** 查询设备台账信息列表 */
getDeviceLedger() {
this.loading = true;
listLedger(this.queryParams).then(response => {
this.ledgerList = response.rows;
getDeviceLedgerList({}).then(response => {
this.ledgerList = response.data;
});
},
/** 查询设备调试信息列表 */
@ -394,10 +397,13 @@ export default {
});
},
/** 删除按钮操作 */
handleDelete(row) {
handleDelete(row)
{
const deviceDebuggingIds = row.deviceDebuggingId || this.ids;
this.$modal.confirm('是否确认删除设备调试信息编号为"' + deviceDebuggingIds + '"的数据项?').then(function() {
const deviceId = row.deviceId || this.ids;
this.$modal.confirm('是否确认删除设备编号为"' + deviceId + '"的数据项?').then(function() {
return delDebugging(deviceDebuggingIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");

@ -331,7 +331,7 @@ export default {
};
},
created() {
getDeviceLedgerList(null).then(response => {
getDeviceLedgerList({}).then(response => {
this.deviceLedgerList = response.data
})
this.getList();

@ -361,7 +361,9 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const inspectProjectIds = row.inspectProjectId || this.ids;
this.$modal.confirm('是否确认删除巡检项目信息编号为"' + inspectProjectIds + '"的数据项?').then(function() {
inspectProjectCode
const inspectProjectCode = row.inspectProjectCode || this.ids;
this.$modal.confirm('是否确认删除巡检项目信息编号为"' + inspectProjectCode + '"的数据项?').then(function() {
return delDmsBaseInspectProject(inspectProjectIds);
}).then(() => {
this.getList();

@ -284,7 +284,10 @@ export default {
{ required: true, message: "线路类型", trigger: "blur" }
],
deviceTypeId: [
{ required: true, message: "设备类型ID关联dms_base_device_type的device_type_id不能为空", trigger: "blur" }
{ required: true, message: "设备类型ID不能为空", trigger: "blur" }
],
routeCode:[
{ required: true, message: "线路编号不能为空", trigger: "blur" }
],
// isFlag: [
// { required: true, message: "1-0-", trigger: "blur" }
@ -391,7 +394,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const inspectRouteIds = row.inspectRouteId || this.ids;
this.$modal.confirm('是否确认删除巡检线路信息编号为"' + inspectRouteIds + '"的数据项?').then(function() {
const routeCode = row.routeCode || this.ids;
this.$modal.confirm('是否确认删除巡检线路信息编号为"' + routeCode + '"的数据项?').then(function() {
return delDmsBaseInspectRoute(inspectRouteIds);
}).then(() => {
this.getList();

@ -196,7 +196,7 @@
<script>
import { listDmsBaseInspectStandard, getDmsBaseInspectStandard, delDmsBaseInspectStandard, addDmsBaseInspectStandard, updateDmsBaseInspectStandard } from "@/api/dms/dmsBaseInspectStandard";
import { listDmsBaseInspectProject } from '@/api/dms/dmsBaseInspectProject'
import {getdmsBaseInspectProjectList} from '@/api/dms/dmsBaseInspectProject'
export default {
name: "DmsBaseInspectStandard",
@ -240,10 +240,10 @@ export default {
{ required: true, message: "标准名称不能为空", trigger: "blur" }
],
inspectProjectId: [
{ required: true, message: "巡检项目ID关联dms_base_inspect_project的inspect_project_id不能为空", trigger: "blur" }
{ required: true, message: "巡检项目ID不能为空", trigger: "blur" }
],
isFlag: [
{ required: true, message: "是否标识1-是0-否不能为空", trigger: "blur" }
standardCode: [
{ required: true, message: "标准编号不能为空", trigger: "blur" }
],
}
};
@ -255,8 +255,8 @@ export default {
methods: {
/** 查询巡检项目信息列表 */
getProject() {
listDmsBaseInspectProject(this.queryParams).then(response => {
this.dmsBaseInspectProjectList = response.rows;
getdmsBaseInspectProjectList({}).then(response => {
this.dmsBaseInspectProjectList = response.data;
});
},
/** 查询巡检标准信息列表 */
@ -346,7 +346,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const inspectStandardIds = row.inspectStandardId || this.ids;
this.$modal.confirm('是否确认删除巡检标准信息编号为"' + inspectStandardIds + '"的数据项?').then(function() {
const standardCode = row.standardCode || this.ids;
this.$modal.confirm('是否确认删除巡检标准信息编号为"' + standardCode + '"的数据项?').then(function() {
return delDmsBaseInspectStandard(inspectStandardIds);
}).then(() => {
this.getList();

@ -320,7 +320,7 @@ export default {
//
rules: {
inspectType: [
{ required: true, message: "检查类型(1巡检,2点检)不能为空", trigger: "change" }
{ required: true, message: "检查类型不能为空", trigger: "change" }
],
isFlag: [
{ required: true, message: "是否标识1-是0-否不能为空", trigger: "blur" }

@ -105,12 +105,20 @@
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-info"-->
<!-- @click="getJump(scope.row)"-->
<!-- v-hasPermi="['dms:dmsBillsFaultInstance:edit']"-->
<!-- dmsBillsLubeInstance -->
<!-- >详情</el-button>-->
<el-button
size="mini"
type="text"
icon="el-icon-info"
@click="getJump(scope.row)"
v-hasPermi="['dms:dmsBillsFaultInstance:edit']"
v-hasPermi="['dms:dmsBillsLubeInstance:edit']"
>详情</el-button>
<!--el-button
size="mini"

@ -58,7 +58,7 @@
<el-col :span="8" >
<el-form-item label="润滑级别" prop="lubeLevel">
<el-select v-model="form.lubeLevel" placeholder="巡检线路" :disabled=true>
<el-select v-model="form.lubeLevel" placeholder="润滑级别" :disabled=true>
<el-option
v-for="item in dict.type.dms_lube_level"
:key="item.value"
@ -70,12 +70,12 @@
</el-col>
<el-col :span="8">
<el-form-item label="润滑组别" prop="lubeGroup">
<el-input v-model="form.lubeGroup" placeholder="请输入检修组别" :disabled=true />
<el-input v-model="form.lubeGroup" placeholder="请输入润滑组别" :disabled=true />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="润滑负责人" prop="lubeSupervisor">
<el-input v-model="form.lubeSupervisor" placeholder="请输入检修负责人" :disabled=true />
<el-input v-model="form.lubeSupervisor" placeholder="请输入润滑负责人" :disabled=true />
</el-form-item>
</el-col>
@ -98,7 +98,7 @@
<!-- v-bind:disabled="repairInstanceActivity.processStepOrder!=dmsBillsLubeInstanceActivityList.length+1"-->
<!-- >{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<el-select v-model="form.lubeLevel" placeholder="巡检线路" :disabled=true>
<el-select v-model="form.lubeLevel" placeholder="润滑级别" :disabled=true>
<el-option
v-for="item in dict.type.dms_lube_level"
:key="item.value"
@ -157,8 +157,8 @@
<!-- >-->
<!-- </el-input>-->
<!-- </el-form-item>-->
<el-form-item label="检修类型" prop="lubeLevel">
<el-select v-model="form1.lubeLevel" placeholder="巡检线路" >
<el-form-item label="润滑级别" prop="lubeLevel">
<el-select v-model="form1.lubeLevel" placeholder="润滑级别" >
<el-option
v-for="item in dict.type.dms_lube_level"
:key="item.value"
@ -170,20 +170,20 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检修组别"
<el-form-item label="润滑组别"
>
<el-input
v-model="form1.lubeGroup"
placeholder="检修组别">
placeholder="润滑组别">
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检修负责人"
<el-form-item label="润滑负责人"
>
<el-input
v-model="form1.lubeSupervisor"
placeholder="检修负责人">
placeholder="润滑负责人">
</el-input>
</el-form-item>
</el-col>

@ -138,12 +138,19 @@
@click="handleDelete(scope.row)"
v-hasPermi="['dms:dmsBillsMaintInstance:remove']"
>删除</el-button-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-info"-->
<!-- @click="getJump(scope.row)"-->
<!-- v-hasPermi="['dms:dmsBillsMaintInstance:view']"-->
<!-- >详情</el-button>-->
<el-button
size="mini"
type="text"
icon="el-icon-info"
@click="getJump(scope.row)"
v-hasPermi="['dms:dmsBillsMaintInstance:view']"
v-hasPermi="['dms:dmsBillsMaintInstance:edit']"
>详情</el-button>
</template>
</el-table-column>

@ -243,7 +243,7 @@
<script>
import { listDmsFiles, getDmsFiles, delDmsFiles, addDmsFiles, updateDmsFiles } from "@/api/dms/dmsFiles";
import { getToken } from '@/utils/auth'
import { listLedger } from '@/api/dms/ledger'
import {getDeviceLedgerList, listLedger} from '@/api/dms/ledger'
export default {
name: "DmsFiles",
@ -263,7 +263,7 @@ export default {
// , ['png', 'jpg', 'jpeg']
fileType: {
type: Array,
default: () => ["doc", "xls", "ppt", "txt", "pdf"],
default: () => ["doc", "xls", "ppt", "txt", "pdf","xlsx","docx","pptx"],
},
//
isShowTip: {
@ -326,12 +326,15 @@ export default {
filesName: [
{ required: true, message: "档案名称不能为空", trigger: "blur" }
],
filesCode: [
{ required: true, message: "档案编号不能为空", trigger: "blur" }
],
deviceId: [
{ required: true, message: "档案名称不能为空", trigger: "blur" }
],
// filesPath: [
// { required: true, message: "", trigger: "blur" }
// ],
// isFlag: [
// { required: true, message: "1-2-", trigger: "blur" }
// ],
}
};
},
@ -376,8 +379,8 @@ export default {
},
/** 查询设备台账信息列表 */
getDeviveLedger() {
listLedger(this.queryParams).then(response => {
this.ledgerList = response.rows;
getDeviceLedgerList({}).then(response => {
this.ledgerList = response.data;
});
},
//
@ -582,8 +585,9 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
const filesCode = row.filesCode || this.ids;
const deviceFilesIds = row.deviceFilesId || this.ids;
this.$modal.confirm('是否确认删除设备档案信息编号为"' + deviceFilesIds + '"的数据项?').then(function() {
this.$modal.confirm('是否确认删除设备档案编号为"' + filesCode + '"的数据项?').then(function() {
return delDmsFiles(deviceFilesIds);
}).then(() => {
this.getList();

@ -247,6 +247,9 @@ export default {
outsrcName: [
{ required: true, message: "单位名称不能为空", trigger: "blur" }
],
outsrcCode: [
{ required: true, message: "外协编号不能为空", trigger: "blur" }
],
// isFlag: [
// { required: true, message: "1-2-", trigger: "blur" }
// ],
@ -343,10 +346,12 @@ export default {
});
},
/** 删除按钮操作 */
handleDelete(row) {
handleDelete(row)
{
const outsrcIds = row.outsrcId || this.ids;
this.$modal.confirm('是否确认删除外协信息编号为"' + outsrcIds + '"的数据项?').then(function() {
return delDmsInfo(outsrcIds);
const outsrcCode = row.outsrcCode || this.ids;
this.$modal.confirm('是否确认删除外协编号为"' + outsrcCode + '"的数据项?').then(function() {
return delDmsInfo(outsrcIds)
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");

@ -246,8 +246,8 @@
<el-row>
<el-col :span="12">
<el-form-item label="时限" prop="timeLimitDays">
<el-input-number v-model="form.timeLimitDays" placeholder="请输入天数" :precision="0" :min="0" :max="10000"/>
<el-input-number v-model="form.timeLimitHours" placeholder="请输入小时" :precision="0" :min="0" :max="23"/>
<el-input-number v-model="form.timeLimitDays" placeholder="请输入天数" :precision="0" :min="0" :max="10000"/>
<el-input-number v-model="form.timeLimitHours" placeholder="请输入小时" :precision="0" :min="0" :max="23"/>小时
</el-form-item>
</el-col>
</el-row>
@ -271,11 +271,24 @@
<!-- >{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<el-form-item label="cron表达式" prop="cronExpression">
<!-- <el-form-item label="cron表达式" prop="cronExpression">
<el-input v-model="form.cronExpression" placeholder="请输入cron执行表达式">
<template slot="append">
<el-button type="primary" @click="handleShowCron">
生成表达式
<i class="el-icon-time el-icon&#45;&#45;right"></i>
</el-button>
</template>
</el-input>
</el-form-item>-->
<el-form-item label="定时计划" prop="cronExpression">
<el-input
:value="form.cronExpression"
readonly
placeholder="只能点击右侧生成器">
<template slot="append">
<el-button type="primary" @click="handleShowCron">
生成计划表达式
<i class="el-icon-time el-icon--right"></i>
</el-button>
</template>
@ -304,7 +317,7 @@
<script>
import { listDmsPlanInspect, getDmsPlanInspect, delDmsPlanInspect, addDmsPlanInspect, updateDmsPlanInspect } from "@/api/dms/dmsPlanInspect";
import { listDmsBaseInspectRoute } from '@/api/dms/dmsBaseInspectRoute'
import {getdmsBaseInspectRouteList} from '@/api/dms/dmsBaseInspectRoute'
import Crontab from '@/components/Crontab/index'
export default {
@ -354,8 +367,11 @@ export default {
form: {},
//
rules: {
isFlag: [
{ required: true, message: "是否标识1-是0-否不能为空", trigger: "blur" }
planInspectName: [
{ required: true, message: "计划名称不能为空", trigger: "blur" }
],
cronExpression: [
{ required: true, message: "表达式不能为空", trigger: "blur" }
],
}
};
@ -372,13 +388,13 @@ export default {
},
/** 确定后回传值 */
crontabFill(value) {
this.form.cronExpression = value;
// this.form.cronExpression = value;
this.$set(this.form,'cronExpression',value)
},
/** 查询巡检线路信息列表 */
getRoute() {
listDmsBaseInspectRoute(this.queryParams).then(response => {
this.dmsBaseInspectRouteList = response.rows;
getdmsBaseInspectRouteList({}).then(response => {
this.dmsBaseInspectRouteList = response.data;
});
},
/** 查询巡检计划信息列表 */
@ -471,7 +487,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const planInspectIds = row.planInspectId || this.ids;
this.$modal.confirm('是否确认删除巡检计划信息编号为"' + planInspectIds + '"的数据项?').then(function() {
const planInspectCode = row.planInspectCode || this.ids;
this.$modal.confirm('是否确认删除巡检计划信息编号为"' + planInspectCode + '"的数据项?').then(function() {
return delDmsPlanInspect(planInspectIds);
}).then(() => {
this.getList();

@ -420,7 +420,7 @@ export default {
},
created() {
console.log('url参数',this.$route.query)
getDeviceLedgerList(null).then(response => {
getDeviceLedgerList({}).then(response => {
this.deviceLedgerList = response.data
})
const alarmId = this.$route.query.alarmId

@ -49,6 +49,7 @@
placeholder="请选择计划巡检时间">
</el-date-picker>
</el-form-item>
<el-form-item label="实际开始时间" prop="realBeginTime">
<el-date-picker clearable
v-model="queryParams.realBeginTime"
@ -65,7 +66,8 @@
value-format="yyyy-MM-dd"
placeholder="请选择实际结束时间">
</el-date-picker>
</el-form-item>
</el-form-item>-->
<!-- <el-form-item label="执行人员" prop="performer">-->
<!-- <el-input-->
<!-- v-model="queryParams.performer"-->
@ -476,7 +478,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const recordInspectIds = row.recordInspectId || this.ids;
this.$modal.confirm('是否确认删除巡检记录编号为"' + recordInspectIds + '"的数据项?').then(function() {
const billsInspectCode = row.billsInspectCode || this.ids;
this.$modal.confirm('是否确认删除巡检记录编号为"' + billsInspectCode + '"的数据项?').then(function() {
return delDmsRecordInspect(recordInspectIds);
}).then(() => {
this.getList();

@ -505,7 +505,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const recordLubeIds = row.recordLubeId || this.ids;
this.$modal.confirm('是否确认删除润滑记录编号为"' + recordLubeIds + '"的数据项?').then(function() {
const billsLubeCode = row.billsLubeCode || this.ids;
this.$modal.confirm('是否确认删除润滑记录编号为"' + billsLubeCode + '"的数据项?').then(function() {
return delDmsRecordLube(recordLubeIds);
}).then(() => {
this.getList();

@ -115,6 +115,7 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['dms:info:remove']"
disabled
>删除</el-button>
</el-col>
<el-col :span="1.5">
@ -171,6 +172,7 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['dms:info:remove']"
disabled
>删除</el-button>
</template>
</el-table-column>
@ -236,7 +238,7 @@
<script>
import { listInfo, getInfo, delInfo, addInfo, updateInfo ,getLedgerById} from "@/api/dms/info";
import { listLedger } from '@/api/dms/ledger'
import {getDeviceLedgerList, listLedger} from '@/api/dms/ledger'
export default {
name: "Info",
@ -310,8 +312,8 @@ export default {
/** 查询设备台账信息列表 */
getDeviceLedger() {
this.loading = true;
listLedger(this.queryParams).then(response => {
this.ledgerList = response.rows;
getDeviceLedgerList({}).then(response => {
this.ledgerList = response.data;
});
},
/** 查询设备转移信息列表 */
@ -404,7 +406,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const transferInfoIds = row.transferInfoId || this.ids;
this.$modal.confirm('是否确认删除设备转移信息编号为"' + transferInfoIds + '"的数据项?').then(function() {
const deviceId = row.deviceId || this.ids;
this.$modal.confirm('是否确认删除设备编号为"' + deviceId + '"的数据项?').then(function() {
return delInfo(transferInfoIds);
}).then(() => {
this.getList();

@ -98,6 +98,7 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['dms:install:remove']"
disabled
>删除</el-button>
</el-col>
<el-col :span="1.5">
@ -153,6 +154,7 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['dms:install:remove']"
disabled
>删除</el-button>
</template>
</el-table-column>
@ -213,7 +215,7 @@
<script>
import { listInstall, getInstall, delInstall, addInstall, updateInstall } from "@/api/dms/install";
import { listLedger } from '@/api/dms/ledger'
import {getDeviceLedgerList, listLedger} from '@/api/dms/ledger'
export default {
name: "Install",
@ -260,7 +262,10 @@ export default {
//
rules: {
deviceId: [
{ required: true, message: "设备ID,关联dms_base_device_ledger的device_id不能为空", trigger: "blur" }
{ required: true, message: "设备ID不能为空", trigger: "blur" }
],
installPosition: [
{ required: true, message: "安装地点不能为空", trigger: "blur" }
],
}
};
@ -273,8 +278,8 @@ export default {
/** 查询设备台账信息列表 */
getDeviceLedger() {
this.loading = true;
listLedger(this.queryParams).then(response => {
this.ledgerList = response.rows;
getDeviceLedgerList({}).then(response => {
this.ledgerList = response.data;
});
},
/** 查询设备安装信息列表 */
@ -370,7 +375,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const deviceInstallIds = row.deviceInstallId || this.ids;
this.$modal.confirm('是否确认删除设备安装信息编号为"' + deviceInstallIds + '"的数据项?').then(function() {
const deviceId = row.deviceId || this.ids;
this.$modal.confirm('是否确认删除设备安装信息编号为"' + deviceId + '"的数据项?').then(function() {
return delInstall(deviceInstallIds);
}).then(() => {
this.getList();

@ -85,9 +85,9 @@
<el-table v-loading="loading" :data="knowledgeLubeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键标识" align="center" prop="knowledgeLubeId" />-->
<!-- <el-table-column label="主键标识" align="center" prop="knowledgeLubeId" />-->
<el-table-column label="经验编号" align="center" prop="experienceCode" />
<!-- <el-table-column label="设备类型ID关联dms_base_device_type的device_type_id" align="center" prop="deviceTypeId" />-->
<!-- <el-table-column label="设备类型ID关联dms_base_device_type的device_type_id" align="center" prop="deviceTypeId" />-->
<el-table-column label="设备类型" align="center" prop="deviceTypeId" >
<template slot-scope="scope">
<span
@ -100,7 +100,7 @@
</span>
</template>
</el-table-column>
<!-- <el-table-column label="润滑部位关联dms_base_lube_station的lube_station_id" align="center" prop="lubeStationId" />-->
<!-- <el-table-column label="润滑部位关联dms_base_lube_station的lube_station_id" align="center" prop="lubeStationId" />-->
<el-table-column label="润滑部位" align="center" prop="lubeStationId" >
<template slot-scope="scope">
<span
@ -150,9 +150,9 @@
<el-form-item label="经验编号" prop="experienceCode">
<el-input v-model="form.experienceCode" placeholder="请输入经验编号" />
</el-form-item>
<!-- <el-form-item label="设备类型ID关联dms_base_device_type的device_type_id" prop="deviceTypeId">-->
<!-- <el-input v-model="form.deviceTypeId" placeholder="请输入设备类型ID关联dms_base_device_type的device_type_id" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="设备类型ID关联dms_base_device_type的device_type_id" prop="deviceTypeId">-->
<!-- <el-input v-model="form.deviceTypeId" placeholder="请输入设备类型ID关联dms_base_device_type的device_type_id" />-->
<!-- </el-form-item>-->
<el-form-item label="设备类型" prop="deviceTypeId" >
<el-select v-model="form.deviceTypeId" placeholder="请选择设备类型">
<el-option
@ -163,9 +163,9 @@
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="润滑部位关联dms_base_lube_station的lube_station_id" prop="lubeStationId">-->
<!-- <el-input v-model="form.lubeStationId" placeholder="请输入润滑部位关联dms_base_lube_station的lube_station_id" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="润滑部位关联dms_base_lube_station的lube_station_id" prop="lubeStationId">-->
<!-- <el-input v-model="form.lubeStationId" placeholder="请输入润滑部位关联dms_base_lube_station的lube_station_id" />-->
<!-- </el-form-item>-->
<el-form-item label="润滑部位" prop="lubeStationId" >
<el-select v-model="form.lubeStationId" placeholder="请选择润滑部位">
<el-option
@ -176,9 +176,9 @@
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="润滑标准" prop="protocolCode">-->
<!-- <el-input v-model="form.protocolCode" placeholder="请输入润滑标准" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="润滑标准" prop="protocolCode">-->
<!-- <el-input v-model="form.protocolCode" placeholder="请输入润滑标准" />-->
<!-- </el-form-item>-->
<el-form-item label="润滑标准" prop="protocolCode" >
<el-select v-model="form.protocolCode" placeholder="请选择润滑标准">
<el-option
@ -317,7 +317,8 @@ export default {
beforePictureUpload(file){
// isCommonName true
this.isCommonName = true;
const isJPG = file.type === 'image/jpeg';
/* const isJPG = file.type === 'image/jpeg';*!/*/
const isAllowedType = file.type === 'image/jpeg' || file.type === 'image/png'; // JPGPNG
const isLt2M = file.size / 1024 / 1024 < 2;
//
if(this.fileListPut.length > 0){
@ -328,8 +329,12 @@ export default {
}
})
}
/*
if (!isJPG) {
this.$message.error('请上传图片格式的文件!');
}*/
if (!isAllowedType) {
this.$message.error('请上传JPG或PNG图片格式的文件');
}
if (!isLt2M) {
this.$message.error('上传的图片不能超过2MB!');
@ -365,7 +370,6 @@ export default {
},
/** 查询润滑标准信息列表 */
getLubeStandard() {
listLubeStandard(this.queryParams).then(response => {
@ -478,7 +482,7 @@ export default {
handleDelete(row) {
const knowledgeLubeCodes = row.experienceCode || this.codes;
const knowledgeLubeIds = row.knowledgeLubeId || this.ids;
this.$modal.confirm('是否确认删除润滑知识库编号为"' + knowledgeLubeCodes + '"的数据项?').then(function() {
this.$modal.confirm('是否确认删除润滑知识库编号为"' + knowledgeLubeCodes + '"的数据项?').then(function () {
return delKnowledgeLube(knowledgeLubeIds);
}).then(() => {
this.getList();

@ -251,6 +251,9 @@ export default {
isFlag: [
{ required: true, message: "是否标识1-是0-否不能为空", trigger: "blur" }
],
experienceCode: [
{ required: true, message: "经验编号不能为空", trigger: "blur" }
],
}
};
},
@ -263,7 +266,7 @@ export default {
beforePictureUpload(file){
// isCommonName true
this.isCommonName = true;
const isJPG = file.type === 'image/jpeg';
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png'; // JPGPNG
const isLt2M = file.size / 1024 / 1024 < 2;
//
if(this.fileListPut.length > 0){
@ -275,7 +278,7 @@ export default {
})
}
if (!isJPG) {
this.$message.error('请上传图片格式的文件!');
this.$message.error('请上传JPG或PNG图片格式的文件!');
}
if (!isLt2M) {
this.$message.error('上传的图片不能超过2MB!');

@ -294,7 +294,6 @@ export default {
maintProtocol: [
{ required: true, message: "保养标准不能为空", trigger: "blur" }
],
}
};
},
@ -309,7 +308,7 @@ export default {
beforePictureUpload(file){
// isCommonName true
this.isCommonName = true;
const isJPG = file.type === 'image/jpeg';
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png'; // JPGPNG
const isLt2M = file.size / 1024 / 1024 < 2;
//
if(this.fileListPut.length > 0){
@ -321,7 +320,7 @@ export default {
})
}
if (!isJPG) {
this.$message.error('请上传图片格式的文件!');
this.$message.error('请上传JPG或PNG图片格式的文件!');
}
if (!isLt2M) {
this.$message.error('上传的图片不能超过2MB!');

@ -62,7 +62,7 @@
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="设备位置" prop="deviceLocation">
<el-form-item label="设备位置" prop="deviceLocation" >
<el-input
v-model="queryParams.deviceLocation"
placeholder="请输入设备位置"
@ -562,7 +562,7 @@
<el-input v-model="form.assetNumber" placeholder="请输入资产编号" />
</el-form-item>
<el-form-item label="设备位置" prop="deviceLocation">
<el-input v-model="form.deviceLocation" placeholder="请输入设备位置" />
<el-input v-model="form.deviceLocation" placeholder="设备位置在设备安装或转移中维护" disabled/>
</el-form-item>
<!-- <el-form-item label="设备类型" prop="deviceTypeId">-->
<!-- <el-input v-model="form.deviceTypeId" placeholder="请输入设备类型,关联dm_base_device_type的device_type_id" />-->
@ -1312,7 +1312,7 @@ export default {
}
});
},
/** 删除按钮操作 */
/* /!** 删除按钮操作 *!/
handleDelete(row) {
const deviceIds = row.deviceId || this.ids;
this.$modal.confirm('是否确认删除设备台账信息编号为"' + deviceIds + '"的数据项?').then(function() {
@ -1321,6 +1321,17 @@ export default {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},*/
/** 删除按钮操作 */
handleDelete(row) {
const deviceCode = row.deviceCode || this.ids;
const deviceId = row.deviceId || this.ids;
this.$modal.confirm('是否确认删除设备台账编号为"' + deviceCode + '"的数据项?').then(function() {
return delLedger(deviceId);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {

@ -217,8 +217,21 @@
<!-- <el-form-item label="关联sys_job主键" prop="jobId">-->
<!-- <el-input v-model="form.jobId" placeholder="请输入关联sys_job主键" />-->
<!-- </el-form-item>-->
<el-form-item label="定时计划" prop="cronExpression">
<!-- <el-form-item label="定时计划" prop="cronExpression">
<el-input v-model="form.cronExpression" placeholder="请输入定时计划">
<template slot="append">
<el-button type="primary" @click="handleShowCron">
生成计划表达式
<i class="el-icon-time el-icon&#45;&#45;right"></i>
</el-button>
</template>
</el-input>
</el-form-item>-->
<el-form-item label="定时计划" prop="cronExpression">
<el-input
:value="form.cronExpression"
readonly
placeholder="只能点击右侧生成器">
<template slot="append">
<el-button type="primary" @click="handleShowCron">
生成计划表达式
@ -310,7 +323,7 @@ export default {
//
rules: {
deviceId: [
{ required: true, message: "润滑设备ID,关联dms_base_device_ledger的device_id不能为空", trigger: "blur" }
{ required: true, message: "润滑设备ID不能为空", trigger: "blur" }
],
cronExpression: [
{ required: true, message: "定时计划不能为空", trigger: "blur" }
@ -330,8 +343,8 @@ export default {
},
/** 确定后回传值 */
crontabFill(value) {
this.form.cronExpression = value;
// this.form.cronExpression = value;
this.$set(this.form,'cronExpression',value)
},
/** 查询设备台账信息列表 */
getDeviceLedger() {
@ -433,7 +446,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const planLubeIds = row.planLubeId || this.ids;
this.$modal.confirm('是否确认删除润滑计划编号为"' + planLubeIds + '"的数据项?').then(function() {
const planLubeCode = row.planLubeCode || this.ids;
this.$modal.confirm('是否确认删除润滑计划编号为"' + planLubeCode + '"的数据项?').then(function() {
return delLube(planLubeIds);
}).then(() => {
this.getList();

@ -335,7 +335,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const lubeStandardIds = row.lubeStandardId || this.ids;
this.$modal.confirm('是否确认删除润滑标准信息编号为"' + lubeStandardIds + '"的数据项?').then(function() {
const lubeStandardCode = row.lubeStandardCode || this.ids;
this.$modal.confirm('是否确认删除润滑标准信息编号为"' + lubeStandardCode + '"的数据项?').then(function() {
return delLubeStandard(lubeStandardIds);
}).then(() => {
this.getList();

@ -231,7 +231,7 @@
<script>
import { listLubeStation, getLubeStation, delLubeStation, addLubeStation, updateLubeStation } from "@/api/dms/lubeStation";
import { listDevicetype } from '@/api/dms/devicetype'
import { listLubeStandard } from '@/api/dms/lubeStandard'
import { getLueStandardList } from '@/api/dms/lubeStandard'
export default {
name: "LubeStation",
@ -272,11 +272,14 @@ export default {
//
rules: {
deviceTypeId: [
{ required: true, message: "设备类型ID关联dms_base_device_type的device_type_id不能为空", trigger: "blur" }
{ required: true, message: "设备类型ID不能为空", trigger: "blur" }
],
lubeStationName: [
{ required: true, message: "部位名称不能为空", trigger: "blur" }
],
lubeStationCode: [
{ required: true, message: "部位编号不能为空", trigger: "blur" }
],
// isFlag: [
// { required: true, message: "1-0-", trigger: "blur" }
// ],
@ -291,9 +294,8 @@ export default {
methods: {
/** 查询润滑标准信息列表 */
getLubeStandard() {
listLubeStandard(this.queryParams).then(response => {
this.lubeStandardList = response.rows;
console.log(this.lubeStandardList)
getLueStandardList({}).then(response => {
this.lubeStandardList = response.data;
});
},
//
@ -388,7 +390,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const lubeStationIds = row.lubeStationId || this.ids;
this.$modal.confirm('是否确认删除润滑部位信息编号为"' + lubeStationIds + '"的数据项?').then(function() {
const lubeStationCode = row.lubeStationCode || this.ids;
this.$modal.confirm('是否确认删除润滑部位信息编号为"' + lubeStationCode + '"的数据项?').then(function() {
return delLubeStation(lubeStationIds);
}).then(() => {
this.getList();

@ -231,13 +231,26 @@
<el-row>
<el-col :span="12">
<el-form-item label="时限" prop="timeLimitDays">
<el-input-number v-model="form.timeLimitDays" placeholder="请输入天数" :precision="0" :min="0" :max="10000"/>
<el-input-number v-model="form.timeLimitHours" placeholder="请输入小时" :precision="0" :min="0" :max="23"/>
<el-input-number v-model="form.timeLimitDays" placeholder="请输入天数" :precision="0" :min="0" :max="10000"/>
<el-input-number v-model="form.timeLimitHours" placeholder="请输入小时" :precision="0" :min="0" :max="23"/>小时
</el-form-item>
</el-col>
</el-row>
<el-form-item label="定时计划" prop="cronExpression">
<!-- <el-form-item label="定时计划" prop="cronExpression">
<el-input v-model="form.cronExpression" placeholder="请输入cron执行表达式" readonly>
<template slot="append">
<el-button type="primary" @click="handleShowCron">
生成计划表达式
<i class="el-icon-time el-icon&#45;&#45;right"></i>
</el-button>
</template>
</el-input>
</el-form-item>-->
<el-form-item label="定时计划" prop="cronExpression">
<el-input
:value="form.cronExpression"
readonly
placeholder="只能点击右侧生成器">
<template slot="append">
<el-button type="primary" @click="handleShowCron">
生成计划表达式
@ -246,7 +259,6 @@
</template>
</el-input>
</el-form-item>
<!-- <el-form-item label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input v-model="form.isFlag" placeholder="请输入是否标识1-是2-否" />-->
<!-- </el-form-item>-->
@ -354,8 +366,8 @@ export default {
},
/** 确定后回传值 */
crontabFill(value) {
this.form.cronExpression = value;
// this.form.cronExpression = value;
this.$set(this.form,'cronExpression',value)
},
//
jumpToDetail(row){
@ -474,8 +486,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const planMaintIds = row.planMaintId || this.ids;
const planMatinCodes = row.planMatinCode || this.codes
this.$modal.confirm('是否确认删除保养计划编号为"' + planMatinCodes + '"的数据项?').then(function() {
const planMatinCode = row.planMaintCode || this.ids;
this.$modal.confirm('是否确认删除保养计划编号为"' + planMatinCode + '"的数据项?').then(function() {
return delMaint(planMaintIds);
}).then(() => {
this.getList();

@ -32,9 +32,9 @@
<!--&lt;!&ndash; @keyup.enter.native="handleQuery"&ndash;&gt;-->
<!--&lt;!&ndash; />&ndash;&gt;-->
<!--&lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!--&lt;!&ndash; <el-form-item label="保养部位,关联dms_base_maint_station的maint_station_id" prop="maintStationId">&ndash;&gt;-->
<!--&lt;!&ndash; <el-form-item label="保养部位,关联dms_base_maint_station的maint_station_id" prop="maintStationCode">&ndash;&gt;-->
<!--&lt;!&ndash; <el-input&ndash;&gt;-->
<!--&lt;!&ndash; v-model="queryParams.maintStationId"&ndash;&gt;-->
<!--&lt;!&ndash; v-model="queryParams.maintStationCode"&ndash;&gt;-->
<!--&lt;!&ndash; placeholder="请输入保养部位,关联dms_base_maint_station的maint_station_id"&ndash;&gt;-->
<!--&lt;!&ndash; clearable&ndash;&gt;-->
<!--&lt;!&ndash; @keyup.enter.native="handleQuery"&ndash;&gt;-->
@ -160,7 +160,7 @@
</span>
</template>
</el-table-column>
<!-- <el-table-column label="保养部位,关联dms_base_maint_station的maint_station_id" align="center" prop="maintStationId" />-->
<!-- <el-table-column label="保养部位,关联dms_base_maint_station的maint_station_id" align="center" prop="maintStationCode" />-->
<el-table-column label="保养部位" align="center" prop="maintStationName" >
</el-table-column>
<el-table-column label="保养标准" align="center" prop="maintProtocol" />
@ -285,21 +285,19 @@
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="保养部位,关联dms_base_maint_station的maint_station_id" prop="maintStationId">-->
<!-- <el-input v-model="form.maintStationId" placeholder="请输入保养部位,关联dms_base_maint_station的maint_station_id" />-->
<!-- <el-form-item label="保养部位,关联dms_base_maint_station的maint_station_id" prop="maintStationCode">-->
<!-- <el-input v-model="form.maintStationCode" placeholder="请输入保养部位,关联dms_base_maint_station的maint_station_id" />-->
<!-- </el-form-item>-->
<el-form-item label="保养部位" prop="maintStationId" >
<el-select v-model="form.maintStationId" placeholder="请选择设备">
<el-form-item label="保养部位" prop="maintStationCode" >
<el-select v-model="form.maintStationCode" placeholder="请选择设备">
<el-option
v-for="item in stationList"
:key="item.maintStationId"
:label="item.maintStationName"
:value="item.maintStationId">
:key="item.maintStationCode"
:label="item.maintStationCode"
:value="item.maintStationCode">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="保养标准" prop="maintStandardId" >
<el-select v-model="form.maintStandardId" placeholder="请选择标准">
<el-option
@ -384,6 +382,15 @@ export default {
planMaintId: [
{ required: true, message: "计划ID关联dms_plan_maint的plan_maint_id不能为空", trigger: "blur" }
],
deviceId: [
{ required: true, message: "设备名称不能为空", trigger: "blur" }
],
maintStationCode: [
{ required: true, message: "保养部位不能为空", trigger: "blur" }
],
maintStandardId: [
{ required: true, message: "保养标准不能为空", trigger: "blur" }
],
// deviceId: [
// { required: true, message: "IDdms_base_device_ledgerdevice_id", trigger: "blur" }
// ],

@ -251,7 +251,7 @@
<script>
import { listDevicedepreciation, getDevicedepreciation, delDevicedepreciation, addDevicedepreciation, updateDevicedepreciation } from "@/api/dms/devicedepreciation";
import { listLedger } from '@/api/dms/ledger'
import {getDeviceLedgerList, listLedger} from '@/api/dms/ledger'
export default {
name: "Devicedepreciation",
@ -306,12 +306,11 @@ export default {
{ required: true, message: "设备ID不能为空", trigger: "blur" }
],
repairFrequency:[
// { type: 'number', message: "",trigger: "blur" }
{pattern:/^[1-9]\d*$/,message: "维修次数必须为数字",trigger: "blur" }
],
repairCosts:[{pattern:/^[1-9]\d*$/,message: "维修费用必须为数字",trigger: "blur" }],
depreciationCost:[{pattern:/^[1-9]\d*$/,message: "折旧费用必须为数字",trigger: "blur" }],
useLife:[{pattern:/^[1-9]\d*$/,message: "使用年限必须为",trigger: "blur" }],
{pattern:/^[1-9]\d*$/,message: "维修次数必须为整数",trigger: "blur" }
],
repairCosts:[{pattern:/^\d+(\.\d{1,2})?$/, message: "维修费用必须为数字(最多两位小数)",trigger: "blur" }],
depreciationCost:[{pattern:/^\d+(\.\d{1,2})?$/,message: "折旧费用必须为数字(最多两位小数)",trigger: "blur" }],
useLife:[{ pattern: /^\d+(\.\d{1,2})?$/,message: "使用年限必须为数字(最多两位小数)",trigger: "blur" }],
},
};
@ -324,8 +323,8 @@ export default {
/** 查询设备台账信息列表 */
getDeviceLedger() {
this.loading = true;
listLedger(this.queryParams).then(response => {
this.ledgerList = response.rows;
getDeviceLedgerList({}).then(response => {
this.ledgerList = response.data;
});
},
/** 查询设备折旧信息列表 */
@ -421,7 +420,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const deviceDepreciationIds = row.deviceDepreciationId || this.ids;
this.$modal.confirm('是否确认删除设备折旧信息编号为"' + deviceDepreciationIds + '"的数据项?').then(function() {
const deviceId = row.deviceId || this.ids;
this.$modal.confirm('是否确认删除设备折旧信息编号为"' + deviceId + '"的数据项?').then(function() {
return delDevicedepreciation(deviceDepreciationIds);
}).then(() => {
this.getList();

@ -220,7 +220,7 @@
<script>
import { listParam, getParam, delParam, addParam, updateParam } from "@/api/dms/param";
import { listLedger } from '@/api/dms/ledger'
import {getDeviceLedgerList, listLedger} from '@/api/dms/ledger'
export default {
name: "Param",
@ -269,6 +269,9 @@ export default {
paramName: [
{ required: true, message: "参数名称不能为空", trigger: "blur" }
],
readFrequency :[
{pattern:/^[1-9]\d*$/,message: "读写频率必须为整数",trigger: "blur" }
],
// isFlag: [
// { required: true, message: "1-2-", trigger: "blur" }
// ],
@ -282,8 +285,8 @@ export default {
methods: {
/** 查询设备台账信息列表 */
getDeviveLedger() {
listLedger(this.queryParams).then(response => {
this.ledgerList = response.rows;
getDeviceLedgerList({}).then(response => {
this.ledgerList = response.data;
});
},
/** 查询设备参数信息列表 */
@ -374,8 +377,9 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
const paramCode = row.paramCode || this.ids;
const deviceParamIds = row.deviceParamId || this.ids;
this.$modal.confirm('是否确认删除设备参数信息编号为"' + deviceParamIds + '"的数据项?').then(function() {
this.$modal.confirm('是否确认删除设备参数编号为"' + paramCode + '"的数据项?').then(function() {
return delParam(deviceParamIds);
}).then(() => {
this.getList();

@ -220,7 +220,7 @@
<script>
import { listPurchase, getPurchase, delPurchase, addPurchase, updatePurchase } from "@/api/dms/purchase";
import { listLedger } from '@/api/dms/ledger'
import {getDeviceLedgerList, listLedger} from '@/api/dms/ledger'
export default {
name: "Purchase",
@ -267,6 +267,9 @@ export default {
deviceId: [
{ required: true, message: "设备ID,关联dms_base_device_ledger的device_id不能为空", trigger: "blur" }
],
workOrder: [
{ required: true, message: "计划编号不能为空", trigger: "blur" }
],
}
};
},
@ -277,8 +280,8 @@ export default {
methods: {
/** 查询设备台账信息列表 */
getDeviveLedger() {
listLedger(this.queryParams).then(response => {
this.ledgerList = response.rows;
getDeviceLedgerList({}).then(response => {
this.ledgerList = response.data;
});
},
/** 查询设备采购信息列表 */
@ -373,9 +376,10 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
const devicePurchaseIds = row.devicePurchaseId || this.ids;
this.$modal.confirm('是否确认删除设备采购信息编号为"' + devicePurchaseIds + '"的数据项?').then(function() {
return delPurchase(devicePurchaseIds);
const workOrder = row.workOrder || this.ids;
const devicePurchaseId = row.devicePurchaseId || this.ids;
this.$modal.confirm('是否确认删除设备采购计划编号为"' + workOrder + '"的数据项?').then(function() {
return delPurchase(devicePurchaseId);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");

@ -294,7 +294,7 @@ export default {
//
rules: {
deviceId: [
{ required: true, message: "设备ID关联dms_base_device_ledger的device_id不能为空", trigger: "blur" }
{ required: true, message: "设备ID不能为空", trigger: "blur" }
],
isFlag: [
{ required: true, message: "是否标识1-是2-否不能为空", trigger: "blur" }
@ -410,6 +410,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const recordShutDownIds = row.recordShutDownId || this.ids;
this.$modal.confirm('是否确认删除停机记录编号为"' + recordShutDownIds + '"的数据项?').then(function() {
return delShutDown(recordShutDownIds);
}).then(() => {

@ -227,7 +227,7 @@
<script>
import { listShutReason, getShutReason, delShutReason, addShutReason, updateShutReason } from "@/api/dms/shutReason";
import { listDevicetype } from '@/api/dms/devicetype'
import { listLedger } from '@/api/dms/ledger'
import {getDeviceLedgerList, listLedger} from '@/api/dms/ledger'
import { listShutType } from '@/api/dms/shutType'
export default {
@ -273,6 +273,12 @@ export default {
isFlag: [
{ required: true, message: "是否标识1-是0-否不能为空", trigger: "blur" }
],
deviceId: [
{ required: true, message: "设备类型ID不能为空", trigger: "blur" }
],
reasonCode: [
{ required: true, message: "部位名称不能为空", trigger: "blur" }
],
}
};
},
@ -291,10 +297,9 @@ export default {
},
//
getDevice(){
listLedger().then(response => {
// console.log(response)
this.ledgerList = response.rows;
})
getDeviceLedgerList({}).then(response => {
this.ledgerList = response.data;
});
},
//
getDeviceType(){
@ -389,7 +394,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const shutReasonIds = row.shutReasonId || this.ids;
this.$modal.confirm('是否确认删除停机原因信息编号为"' + shutReasonIds + '"的数据项?').then(function() {
const reasonCode = row.reasonCode || this.ids;
this.$modal.confirm('是否确认删除停机原因信息编号为"' + reasonCode + '"的数据项?').then(function() {
return delShutReason(shutReasonIds);
}).then(() => {
this.getList();

@ -180,6 +180,9 @@ export default {
isFlag: [
{ required: true, message: "是否标识1-是0-否不能为空", trigger: "blur" }
],
typeCode: [
{ required: true, message: "停机类型编号不能为空", trigger: "blur" }
],
}
};
},

@ -204,7 +204,7 @@
<script>
import { listSpecialDeviceParam, getSpecialDeviceParam, delSpecialDeviceParam, addSpecialDeviceParam, updateSpecialDeviceParam } from "@/api/dms/specialDeviceParam";
import { listLedger } from '@/api/dms/ledger'
import {getDeviceLedgerList, listLedger} from '@/api/dms/ledger'
export default {
name: "SpecialDeviceParam",
@ -251,7 +251,7 @@ export default {
paramName: [
{ required: true, message: "参数名称不能为空", trigger: "blur" }
],
isFlag: [
paramCode: [
{ required: true, message: "是否标识1-是2-否不能为空", trigger: "blur" }
],
}
@ -264,8 +264,8 @@ export default {
methods: {
/** 查询设备台账信息列表 */
getDeviveLedger() {
listLedger(this.queryParams).then(response => {
this.ledgerList = response.rows;
getDeviceLedgerList({}).then(response => {
this.ledgerList = response.data;
});
},
/** 查询特种设备参数信息列表 */
@ -354,9 +354,9 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
const specialdeviceParamIds = row.specialdeviceParamId || this.ids;
this.$modal.confirm('是否确认删除特种设备参数信息编号为"' + specialdeviceParamIds + '"的数据项?').then(function() {
return delSpecialDeviceParam(specialdeviceParamIds);
const paramCode = row.paramCode || this.ids;
this.$modal.confirm('是否确认删除特种设备参数编号为"' + paramCode + '"的数据项?').then(function() {
return delSpecialDeviceParam(paramCode);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");

@ -238,6 +238,9 @@ export default {
maintProtocol: [
{ required: true, message: "保养标准不能为空", trigger: "blur" }
],
maintStandardCode: [
{ required: true, message: "标准编号不能为空", trigger: "blur" }
],
// isFlag: [
// { required: true, message: "1-2-", trigger: "blur" }
// ],
@ -344,7 +347,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const maintStandardIds = row.maintStandardId || this.ids;
this.$modal.confirm('是否确认删除保养标准信息编号为"' + maintStandardIds + '"的数据项?').then(function() {
const maintStandardCode = row.maintStandardCode || this.ids;
this.$modal.confirm('是否确认删除保养标准信息编号为"' + maintStandardCode + '"的数据项?').then(function() {
return delStandard(maintStandardIds);
}).then(() => {
this.getList();

@ -111,7 +111,19 @@
</template>
</el-table-column>
<el-table-column label="部位编号" align="center" prop="maintStationCode" />
<el-table-column label="保养标准" align="center" prop="protocolCode" />
<!-- <el-table-column label="保养标准" align="center" prop="protocolCode" />-->
<el-table-column label="标准编号" align="center" prop="protocolCode" />
<!-- //v-for="(item, index)-->
<!-- <el-table-column label="保养标准" align="center">
<template v-slot:default="scope">
<template v-for="(item, index) in standardList">
<span :key="index"
v-if="scope.row.protocolCode === item.maintStandardCode">
{{ item.maintProtocol }}
</span>
</template>
</template>
</el-table-column>-->
<!-- <el-table-column label="保养标准" align="center" prop="protocolCode" >-->
<!-- <template slot-scope="scope">-->
<!-- <span-->
@ -124,6 +136,7 @@
<!-- </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="是否标识1-是2-否" align="center" prop="isFlag" />-->
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -177,7 +190,8 @@
<!-- <el-input v-model="form.protocolCode" placeholder="请输入保养标准" />-->
<!-- </el-form-item>-->
<el-form-item label="保养标准" prop="protocolCode" >
<el-select v-model="form.protocolCode" placeholder="请输入设备类型">
<el-select v-model="form.protocolCode" placeholder="请输入保养标准"
reserve-keyword>
<el-option
v-for="item in standardList"
:key="item.maintStandardCode"
@ -204,7 +218,7 @@
<script>
import { listStation, getStation, delStation, addStation, updateStation } from "@/api/dms/station";
import { listDevicetype } from '@/api/dms/devicetype'
import { listStandard } from '@/api/dms/standard'
import {getMaintStandardlist} from '@/api/dms/standard'
export default {
name: "Station",
@ -249,6 +263,7 @@ export default {
deviceTypeId: [
{ required: true, message: "设备类型ID不能为空", trigger: "blur" }
],
// isFlag: [
// { required: true, message: "1-2-", trigger: "blur" }
// ],
@ -258,14 +273,13 @@ export default {
created() {
this.getList();
this.getDeviceTypeList();
this.getStandard();
this.getStandards();
},
methods: {
/** 查询保养标准信息列表 */
getStandard() {
listStandard(this.queryParams).then(response => {
this.standardList = response.rows;
console.log(this.standardList)
getStandards() {
getMaintStandardlist({}).then(response => {
this.standardList = response.data;
});
},
/** 查询设备类型信息列表 */
@ -364,7 +378,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const maintStationIds = row.maintStationId || this.ids;
this.$modal.confirm('是否确认删除保养部位信息编号为"' + maintStationIds + '"的数据项?').then(function() {
const maintStationCode = row.maintStationCode || this.ids;
this.$modal.confirm('是否确认删除保养部位信息编号为"' + maintStationCode + '"的数据项?').then(function() {
return delStation(maintStationIds);
}).then(() => {
this.getList();

@ -111,11 +111,12 @@
<el-table-column label="供应商电话" align="center" prop="suplierTel" />
<el-table-column label="供应商地址" align="center" prop="suplierAddress" />
<!-- <el-table-column label="供应商状态" align="center" prop="suplierStatus" />-->
<!-- <el-table-column label="供应商状态" align="center" prop="suplierStatus">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.suplier_status" :value="scope.row.suplierStatus"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="供应商状态" align="center" prop="suplierStatus">
<template slot-scope="scope">
<!-- //pdict.type.supplier_status-->
<dict-tag :options="dict.type.supplier_status" :value="scope.row.suplierStatus"/>
</template>
</el-table-column>
<!-- <el-table-column label="是否标识1-是2-否" align="center" prop="isFlag" />-->
<!-- <el-table-column label="标识" align="center" prop="isFlag">-->
<!-- <template slot-scope="scope">-->
@ -181,15 +182,15 @@
<!-- >{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="供应商状态" prop="isFlag">-->
<!-- <el-radio-group v-model="form.suplierStatus">-->
<!-- <el-radio-->
<!-- v-for="dict in dict.type.suplier_status"-->
<!-- :key="dict.value"-->
<!-- :label="parseInt(dict.value)"-->
<!-- >{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<el-form-item label="供应商状态" prop="suplierStatus">
<el-radio-group v-model="form.suplierStatus">
<el-radio
v-for="dict in dict.type.supplier_status"
:key="dict.value"
:label="parseInt(dict.value)"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
@ -207,7 +208,7 @@ import { listSuplier, getSuplier, delSuplier, addSuplier, updateSuplier } from "
export default {
name: "Suplier",
dicts: ['is_flag','suplier_status'],
dicts: ['is_flag','supplier_status'],
data() {
return {
//
@ -348,8 +349,9 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
const supplierIds = row.supplierId || this.ids;
this.$modal.confirm('是否确认删除设备供应商信息编号为"' + supplierIds + '"的数据项?').then(function() {
const suplierCode = row.suplierCode || this.ids;
const supplierIds = row.supplierIds || this.ids;
this.$modal.confirm('是否确认删除设备供应商编号为"' + suplierCode + '"的数据项?').then(function() {
return delSuplier(supplierIds);
}).then(() => {
this.getList();

Loading…
Cancel
Save