工程管理
This commit is contained in:
parent
4ad579e2ac
commit
6f0ee62c9f
|
|
@ -7,6 +7,7 @@ public enum HttpCodeEnum {
|
|||
FAIL(400, "操作失败,请联系管理员"),
|
||||
// 登录
|
||||
NEED_LOGIN(401, "需要登录后操作"),
|
||||
TO_PARAM_NULL(1007, "参数为空"),
|
||||
NO_OPERATOR_AUTH(403, "无权限操作"),
|
||||
SYSTEM_ERROR(500, "出现错误"),
|
||||
USERNAME_EXIST(501, "用户名已存在"),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.bonus.material.basic.service.impl;
|
||||
|
||||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||
import com.bonus.common.biz.enums.HttpCodeEnum;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
|
|
@ -55,6 +54,9 @@ public class BmAssetAttributesServiceImpl implements BmAssetAttributesService {
|
|||
*/
|
||||
@Override
|
||||
public AjaxResult insert(BmAssetAttributes bmAssetAttributes) {
|
||||
if (bmAssetAttributes == null) {
|
||||
return AjaxResult.error(HttpCodeEnum.TO_PARAM_NULL.getCode(), HttpCodeEnum.TO_PARAM_NULL.getMsg());
|
||||
}
|
||||
//先判断物资类型名称是否存在
|
||||
List<BmAssetAttributes> attributesList = bmAssetAttributesDao.selectBmAssetAttributesByAssetCode(bmAssetAttributes);
|
||||
if (attributesList.size() > 1) {
|
||||
|
|
@ -82,6 +84,9 @@ public class BmAssetAttributesServiceImpl implements BmAssetAttributesService {
|
|||
*/
|
||||
@Override
|
||||
public AjaxResult update(BmAssetAttributes bmAssetAttributes) {
|
||||
if (bmAssetAttributes == null || bmAssetAttributes.getId() == null) {
|
||||
return AjaxResult.error(HttpCodeEnum.TO_PARAM_NULL.getCode(), HttpCodeEnum.TO_PARAM_NULL.getMsg());
|
||||
}
|
||||
//先判断物资类型名称是否存在
|
||||
List<BmAssetAttributes> attributesList = bmAssetAttributesDao.selectBmAssetAttributesByAssetCode(bmAssetAttributes);
|
||||
if (attributesList.size() > 1) {
|
||||
|
|
|
|||
|
|
@ -125,6 +125,9 @@ public class BmProjectServiceImpl implements IBmProjectService
|
|||
@Override
|
||||
public AjaxResult insertBmProject(BmProject bmProject)
|
||||
{
|
||||
if (bmProject == null) {
|
||||
return AjaxResult.error(HttpCodeEnum.TO_PARAM_NULL.getCode(), HttpCodeEnum.TO_PARAM_NULL.getMsg());
|
||||
}
|
||||
//首先根据工程或名称去表中查询,看是否重复
|
||||
List<BmProject> projectList = bmProjectMapper.selectBmProjectByProName(bmProject);
|
||||
if (CollectionUtils.isNotEmpty(projectList)) {
|
||||
|
|
@ -163,6 +166,9 @@ public class BmProjectServiceImpl implements IBmProjectService
|
|||
@Override
|
||||
public AjaxResult updateBmProject(BmProject bmProject)
|
||||
{
|
||||
if (bmProject == null || bmProject.getProId() == null) {
|
||||
return AjaxResult.error(HttpCodeEnum.TO_PARAM_NULL.getCode(), HttpCodeEnum.TO_PARAM_NULL.getMsg());
|
||||
}
|
||||
//首先根据工程名称去表中查询,看是否重复
|
||||
List<BmProject> projectList = bmProjectMapper.selectBmProjectByProName(bmProject);
|
||||
if (projectList.size() > 1) {
|
||||
|
|
|
|||
|
|
@ -60,13 +60,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
bp.contract_part,
|
||||
bp.pro_center
|
||||
from bm_project bp
|
||||
left join sys_dept sd on sd.dept_id = bp.imp_unit
|
||||
left join sys_dept sd on sd.dept_id = bp.imp_unit and sd.del_flag = 0
|
||||
</sql>
|
||||
|
||||
<select id="selectBmProjectList" parameterType="com.bonus.material.basic.domain.BmProject" resultMap="BmProjectResult">
|
||||
<include refid="selectBmProjectVo"/>
|
||||
<where>
|
||||
del_flag = 0
|
||||
bp.del_flag = 0
|
||||
<if test="proName != null and proName != ''"> and pro_name like concat('%', #{proName}, '%')</if>
|
||||
<if test="externalId != null and externalId != ''"> and external_id = #{externalId}</if>
|
||||
<if test="externalInfo != null and externalInfo != ''"> and external_info = #{externalInfo}</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue