班站对标管理下的班站评价项管理,运检中心管理,运检站管理,班站评价部门管理,功能开发
This commit is contained in:
parent
5f23a9e7b1
commit
33829e9633
|
|
@ -0,0 +1,112 @@
|
|||
package com.bonus.system.basic.controller;
|
||||
|
||||
import com.bonus.common.annotation.Log;
|
||||
import com.bonus.common.core.controller.BaseController;
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.common.enums.BusinessType;
|
||||
import com.bonus.system.basic.domain.BanEvalItem;
|
||||
import com.bonus.system.basic.service.BanEvalItemService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 班站评价项信息
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("basic/pro/banEvalItem")
|
||||
public class BanEvalItemController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private BanEvalItemService banEvalItemService;
|
||||
|
||||
/**
|
||||
* 获取班站评价项列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banEvalItem:list')")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(BanEvalItem o)
|
||||
{
|
||||
List<BanEvalItem> bean = banEvalItemService.selectEvalItemList(o);
|
||||
return success(bean);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班站评价项列表的下拉选
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banEvalItem:list')")
|
||||
@GetMapping("/getSelectList")
|
||||
public AjaxResult getSelectList(BanEvalItem o)
|
||||
{
|
||||
List<BanEvalItem> bean = banEvalItemService.getSelectList(o);
|
||||
return success(bean);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据班站评价项编号获取详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banEvalItem:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id)
|
||||
{
|
||||
return success(banEvalItemService.selectEvalItemById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增班站评价项
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banEvalItem:add')")
|
||||
@Log(title = "班站评价项管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody BanEvalItem o)
|
||||
{
|
||||
if (!banEvalItemService.checkEvalItemNameUnique(o))
|
||||
{
|
||||
return error("新增班站评价项'" + o.getEvalName() + "'失败,班站评价项名称已存在");
|
||||
}
|
||||
o.setCreateUser(getUserId());
|
||||
return toAjax(banEvalItemService.insertEvalItem(o));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改班站评价项
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banEvalItem:edit')")
|
||||
@Log(title = "班站评价项管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody BanEvalItem o)
|
||||
{
|
||||
Long id = o.getId();
|
||||
if (!banEvalItemService.checkEvalItemNameUnique(o))
|
||||
{
|
||||
return error("修改班站评价项'" + o.getEvalName() + "'失败,班站评价项名称已存在");
|
||||
}
|
||||
else if (o.getParentId().equals(id))
|
||||
{
|
||||
return error("修改班站评价项'" + o.getEvalName() + "'失败,上级班站评价项不能是自己");
|
||||
}
|
||||
o.setUpdateUser(getUserId());
|
||||
return toAjax(banEvalItemService.updateEvalItem(o));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除班站评价项
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banEvalItem:remove')")
|
||||
@Log(title = "班站评价项管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult remove(@PathVariable Long id)
|
||||
{
|
||||
if (banEvalItemService.hasChildByEvalItemId(id))
|
||||
{
|
||||
return warn("存在下级班站评价项,不允许删除");
|
||||
}
|
||||
return toAjax(banEvalItemService.deleteEvalItemById(id));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
package com.bonus.system.basic.controller;
|
||||
|
||||
import com.bonus.common.annotation.Log;
|
||||
import com.bonus.common.core.controller.BaseController;
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.common.core.page.TableDataInfo;
|
||||
import com.bonus.common.enums.BusinessType;
|
||||
import com.bonus.system.basic.domain.BanTransCenter;
|
||||
import com.bonus.system.basic.service.BanTransCenterService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目事业部管理
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("basic/pro/banTransCenter")
|
||||
public class BanTransCenterController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private BanTransCenterService proUintService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banTransCenter:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BanTransCenter o)
|
||||
{
|
||||
startPage();
|
||||
List<BanTransCenter> list = proUintService.selectBanTransCenterList(o);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询详细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banTransCenter:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id)
|
||||
{
|
||||
return success(proUintService.selectBanTransCenterById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banTransCenter:add')")
|
||||
@Log(title = "项目事业部管理-新增", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody BanTransCenter o)
|
||||
{
|
||||
if (!proUintService.checkBanTransCenterUnique(o))
|
||||
{
|
||||
return error("新增项目事业部管理'" + o.getCenterName() + "'失败,已存在");
|
||||
}
|
||||
if(!proUintService.checkCenterSort(o)){
|
||||
return error("新增项目事业部管理排序'" + o.getCenterSort() + "'失败,已存在");
|
||||
}
|
||||
o.setCreateUser(getUserId());
|
||||
return toAjax(proUintService.insertBanTransCenter(o));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banTransCenter:edit')")
|
||||
@Log(title = "项目事业部管理-修改", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody BanTransCenter o)
|
||||
{
|
||||
if (!proUintService.checkBanTransCenterUnique(o))
|
||||
{
|
||||
return error("修改项目事业部管理'" + o.getCenterName() + "'失败,已存在");
|
||||
}
|
||||
if(!proUintService.checkCenterSort(o)){
|
||||
return error("修改项目事业部管理排序'" + o.getCenterSort() + "'失败,已存在");
|
||||
}
|
||||
o.setUpdateUser(getUserId());
|
||||
return toAjax(proUintService.updateBanTransCenter(o));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banTransCenter:remove')")
|
||||
@Log(title = "项目事业部管理-删除", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult remove(@PathVariable Long id)
|
||||
{
|
||||
proUintService.deleteBanTransCenterById(id);
|
||||
return success();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
package com.bonus.system.basic.controller;
|
||||
|
||||
import com.bonus.common.annotation.Log;
|
||||
import com.bonus.common.core.controller.BaseController;
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.common.core.page.TableDataInfo;
|
||||
import com.bonus.common.enums.BusinessType;
|
||||
import com.bonus.system.basic.domain.BanTransStation;
|
||||
import com.bonus.system.basic.service.BanTransStationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 运检站管理
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("basic/pro/banTransStation")
|
||||
public class BanTransStationController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private BanTransStationService banTransStationService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banTransStation:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BanTransStation o)
|
||||
{
|
||||
startPage();
|
||||
List<BanTransStation> list = banTransStationService.selectBanTransStationList(o);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取运检站管理列表的下拉选
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banTransStation:list')")
|
||||
@GetMapping("/getSelectList")
|
||||
public AjaxResult getSelectList(BanTransStation o)
|
||||
{
|
||||
List<BanTransStation> bean = banTransStationService.getSelectList(o);
|
||||
return success(bean);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询详细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banTransStation:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id)
|
||||
{
|
||||
return success(banTransStationService.selectBanTransStationById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banTransStation:add')")
|
||||
@Log(title = "运检站管理-新增", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody BanTransStation o)
|
||||
{
|
||||
if (!banTransStationService.checkBanTransStationUnique(o))
|
||||
{
|
||||
return error("新增运检站管理'" + o.getStationName() + "'失败,已存在");
|
||||
}
|
||||
o.setCreateUser(getUserId());
|
||||
return toAjax(banTransStationService.insertBanTransStation(o));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banTransStation:edit')")
|
||||
@Log(title = "运检站管理-修改", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody BanTransStation o)
|
||||
{
|
||||
if (!banTransStationService.checkBanTransStationUnique(o))
|
||||
{
|
||||
return error("修改运检站管理'" + o.getStationName() + "'失败,已存在");
|
||||
}
|
||||
o.setUpdateUser(getUserId());
|
||||
return toAjax(banTransStationService.updateBanTransStation(o));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banTransStation:remove')")
|
||||
@Log(title = "运检站管理-删除", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult remove(@PathVariable Long id)
|
||||
{
|
||||
if(!banTransStationService.checkBanTransCenter(id)){
|
||||
return error("删除运检站管理失败,已存在运检站信息");
|
||||
}
|
||||
banTransStationService.deleteBanTransStationById(id);
|
||||
return success();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
package com.bonus.system.basic.controller;
|
||||
|
||||
import com.bonus.common.annotation.Log;
|
||||
import com.bonus.common.core.controller.BaseController;
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.common.core.page.TableDataInfo;
|
||||
import com.bonus.common.enums.BusinessType;
|
||||
import com.bonus.system.basic.domain.BanUnit;
|
||||
import com.bonus.system.basic.service.BanUnitService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目事业部管理
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("basic/pro/banUnit")
|
||||
public class BanUnitController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private BanUnitService banUnitService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banUnit:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BanUnit o)
|
||||
{
|
||||
startPage();
|
||||
List<BanUnit> list = banUnitService.selectBanUnitList(o);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询详细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banUnit:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id)
|
||||
{
|
||||
return success(banUnitService.selectBanUnitById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banUnit:add')")
|
||||
@Log(title = "项目事业部管理-新增", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody BanUnit o)
|
||||
{
|
||||
if (!banUnitService.checkBanUnitUnique(o))
|
||||
{
|
||||
return error("新增项目事业部管理'" + o.getName() + "'失败,已存在");
|
||||
}
|
||||
if(!banUnitService.checkSort(o)){
|
||||
return error("新增项目事业部管理排序'" + o.getSort() + "'失败,已存在");
|
||||
}
|
||||
o.setCreateUser(getUserId());
|
||||
return toAjax(banUnitService.insertBanUnit(o));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banUnit:edit')")
|
||||
@Log(title = "项目事业部管理-修改", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody BanUnit o)
|
||||
{
|
||||
if (!banUnitService.checkBanUnitUnique(o))
|
||||
{
|
||||
return error("修改项目事业部管理'" + o.getName() + "'失败,已存在");
|
||||
}
|
||||
if(!banUnitService.checkSort(o)){
|
||||
return error("修改项目事业部管理排序'" + o.getSort() + "'失败,已存在");
|
||||
}
|
||||
o.setUpdateUser(getUserId());
|
||||
return toAjax(banUnitService.updateBanUnit(o));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basic:pro:banUnit:remove')")
|
||||
@Log(title = "项目事业部管理-删除", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult remove(@PathVariable Long id)
|
||||
{
|
||||
if(!banUnitService.checkPro(id)){
|
||||
return error("删除项目事业部管理失败,已存在项目信息");
|
||||
}
|
||||
banUnitService.deleteBanUnitById(id);
|
||||
return success();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package com.bonus.system.basic.dao;
|
||||
|
||||
import com.bonus.system.basic.domain.BanEvalItem;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 班站评价项 数据层
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
|
||||
@Mapper
|
||||
public interface BanEvalItemMapper
|
||||
{
|
||||
/**
|
||||
* 查询班站评价项数据
|
||||
*
|
||||
* @param o 班站评价项信息
|
||||
* @return 班站评价项信息集合
|
||||
*/
|
||||
public List<BanEvalItem> selectBanEvalItemList(BanEvalItem o);
|
||||
|
||||
/**
|
||||
* 根据班站评价项ID查询信息
|
||||
*
|
||||
* @param id 班站评价项ID
|
||||
* @return 班站评价项信息
|
||||
*/
|
||||
public BanEvalItem selectBanEvalItemById(Long id);
|
||||
|
||||
/**
|
||||
* 是否存在子节点
|
||||
*
|
||||
* @param id 班站评价项ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int hasChildByBanEvalItemId(Long id);
|
||||
|
||||
/**
|
||||
* 校验班站评价项名称是否唯一
|
||||
*
|
||||
* @param evalName 班站评价项名称
|
||||
* @param parentId 父班站评价项ID
|
||||
* @return 结果
|
||||
*/
|
||||
public BanEvalItem checkBanEvalItemNameUnique(@Param("evalName") String evalName, @Param("parentId") Long parentId);
|
||||
|
||||
/**
|
||||
* 新增班站评价项信息
|
||||
*
|
||||
* @param o 班站评价项信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBanEvalItem(BanEvalItem o);
|
||||
|
||||
/**
|
||||
* 修改班站评价项信息
|
||||
*
|
||||
* @param o 班站评价项信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBanEvalItem(BanEvalItem o);
|
||||
|
||||
/**
|
||||
* 删除班站评价项管理信息
|
||||
*
|
||||
* @param id 班站评价项ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBanEvalItemById(Long id);
|
||||
|
||||
/**
|
||||
* 获取班站评价项列表的下拉选
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
List<BanEvalItem> getSelectList(BanEvalItem o);
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.bonus.system.basic.dao;
|
||||
|
||||
import com.bonus.system.basic.domain.BanTransCenter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 运检中心 数据层
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
public interface BanTransCenterMapper
|
||||
{
|
||||
/**
|
||||
* 根据条件分页查询
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 集合信息
|
||||
*/
|
||||
public List<BanTransCenter> selectBanTransCenterList(BanTransCenter o);
|
||||
|
||||
/**
|
||||
* 根据ID查询信息
|
||||
*
|
||||
* @param id ID
|
||||
* @return
|
||||
*/
|
||||
public BanTransCenter selectBanTransCenterById(Long id);
|
||||
|
||||
/**
|
||||
* 通过ID删除信息
|
||||
*
|
||||
* @param id ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBanTransCenterById(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 新增信息
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBanTransCenter(BanTransCenter o);
|
||||
|
||||
/**
|
||||
* 修改信息
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBanTransCenter(BanTransCenter o);
|
||||
|
||||
/**
|
||||
* 校验称是否唯一
|
||||
*
|
||||
* @param centerName
|
||||
* @return 结果
|
||||
*/
|
||||
public BanTransCenter checkBanTransCenterUnique(String centerName);
|
||||
|
||||
/**
|
||||
* 校验运检中心排序是否唯一
|
||||
* @param centerSort
|
||||
* @return
|
||||
*/
|
||||
BanTransCenter checkCenterSort(Integer centerSort);
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.bonus.system.basic.dao;
|
||||
|
||||
import com.bonus.system.basic.domain.BanTransStation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 运检站管理 数据层
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
public interface BanTransStationMapper
|
||||
{
|
||||
/**
|
||||
* 根据条件分页查询
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 集合信息
|
||||
*/
|
||||
public List<BanTransStation> selectBanTransStationList(BanTransStation o);
|
||||
|
||||
/**
|
||||
* 根据ID查询信息
|
||||
*
|
||||
* @param id ID
|
||||
* @return
|
||||
*/
|
||||
public BanTransStation selectBanTransStationById(Long id);
|
||||
|
||||
/**
|
||||
* 通过ID删除信息
|
||||
*
|
||||
* @param id ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBanTransStationById(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 新增信息
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBanTransStation(BanTransStation o);
|
||||
|
||||
/**
|
||||
* 修改信息
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBanTransStation(BanTransStation o);
|
||||
|
||||
/**
|
||||
* 校验称是否唯一
|
||||
*
|
||||
* @param unitName
|
||||
* @return 结果
|
||||
*/
|
||||
public BanTransStation checkBanTransStationUnique(String unitName);
|
||||
|
||||
/**
|
||||
* 校验是否存在运检站管理
|
||||
*
|
||||
* @param id
|
||||
* @return 结果
|
||||
*/
|
||||
BanTransStation checkBanTransCenter(Long id);
|
||||
|
||||
/**
|
||||
* 获取下拉列表
|
||||
*
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
List<BanTransStation> getSelectList(BanTransStation o);
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package com.bonus.system.basic.dao;
|
||||
|
||||
import com.bonus.system.basic.domain.BanUnit;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 班站评价部门 数据层
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
public interface BanUnitMapper
|
||||
{
|
||||
/**
|
||||
* 根据条件分页查询
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 集合信息
|
||||
*/
|
||||
public List<BanUnit> selectBanUnitList(BanUnit o);
|
||||
|
||||
/**
|
||||
* 根据ID查询信息
|
||||
*
|
||||
* @param id ID
|
||||
* @return
|
||||
*/
|
||||
public BanUnit selectBanUnitById(Long id);
|
||||
|
||||
/**
|
||||
* 通过ID删除信息
|
||||
*
|
||||
* @param id ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBanUnitById(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 新增信息
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBanUnit(BanUnit o);
|
||||
|
||||
/**
|
||||
* 修改信息
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBanUnit(BanUnit o);
|
||||
|
||||
/**
|
||||
* 校验称是否唯一
|
||||
*
|
||||
* @param name
|
||||
* @return 结果
|
||||
*/
|
||||
public BanUnit checkBanUnitUnique(String name);
|
||||
|
||||
/**
|
||||
* 校验是否存在班站评价部门
|
||||
*
|
||||
* @param id
|
||||
* @return 结果
|
||||
*/
|
||||
BanUnit checkPro(Long id);
|
||||
|
||||
/**
|
||||
* 校验部门排序是否唯一
|
||||
* @param sort
|
||||
* @return
|
||||
*/
|
||||
BanUnit checkSort(Integer sort);
|
||||
}
|
||||
|
|
@ -70,8 +70,8 @@ public interface ProUintMapper
|
|||
|
||||
/**
|
||||
* 校验部门排序是否唯一
|
||||
* @param deptSort
|
||||
* @param sort
|
||||
* @return
|
||||
*/
|
||||
ProUint checkDeptSort(Integer deptSort);
|
||||
ProUint checkSort(Integer sort);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
package com.bonus.system.basic.domain;
|
||||
|
||||
import com.bonus.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 班站评价项 tb_ban_eval_item
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
@Data
|
||||
public class BanEvalItem extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
/** 创建者 */
|
||||
private Long createUser;
|
||||
/** 更新者 */
|
||||
private Long updateUser;
|
||||
|
||||
/** 父部门ID */
|
||||
private Long parentId;
|
||||
|
||||
/** 分值 */
|
||||
private BigDecimal score;
|
||||
|
||||
/** 名称 */
|
||||
private String evalName;
|
||||
|
||||
/** 节点等级 */
|
||||
private Integer evalLeve;
|
||||
|
||||
/** 删除标志(0代表存在 1代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.bonus.system.basic.domain;
|
||||
|
||||
import com.bonus.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 运检中心表 tb_ban_trans_center
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
@Data
|
||||
public class BanTransCenter extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
/** 创建者 */
|
||||
private Long createUser;
|
||||
/** 更新者 */
|
||||
private Long updateUser;
|
||||
|
||||
/** 运检中心名称 */
|
||||
private String centerName;
|
||||
|
||||
/** 排序 */
|
||||
private Integer centerSort;
|
||||
|
||||
/** 删除标志(0代表存在 1代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.bonus.system.basic.domain;
|
||||
|
||||
import com.bonus.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 运检站管理 tb_ban_trans_station
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
@Data
|
||||
public class BanTransStation extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
/** 所属运检中心 */
|
||||
private Long centerId;
|
||||
/** 创建者 */
|
||||
private Long createUser;
|
||||
/** 更新者 */
|
||||
private Long updateUser;
|
||||
|
||||
/** 运检站名称 */
|
||||
private String stationName;
|
||||
/** 所属运检中心名称 */
|
||||
private String centerName;
|
||||
|
||||
/** 删除标志(0代表存在 1代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.bonus.system.basic.domain;
|
||||
|
||||
import com.bonus.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 班站评价部门 tb_ban_unit
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
@Data
|
||||
public class BanUnit extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
/** 创建者 */
|
||||
private Long createUser;
|
||||
/** 更新者 */
|
||||
private Long updateUser;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 排序 */
|
||||
private Integer sort;
|
||||
|
||||
/** 删除标志(0代表存在 1代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.bonus.system.basic.service;
|
||||
|
||||
import com.bonus.system.basic.domain.BanEvalItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 班站评价项 服务层
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
public interface BanEvalItemService
|
||||
{
|
||||
/**
|
||||
* 查询班站评价项数据
|
||||
*
|
||||
* @param o 班站评价信息
|
||||
* @return 班站评价信息集合
|
||||
*/
|
||||
public List<BanEvalItem> selectEvalItemList(BanEvalItem o);
|
||||
|
||||
|
||||
/**
|
||||
* 根据班站评价ID查询信息
|
||||
*
|
||||
* @param id 班站评价ID
|
||||
* @return 班站评价信息
|
||||
*/
|
||||
public BanEvalItem selectEvalItemById(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 是否存在班站评价子节点
|
||||
*
|
||||
* @param id 班站评价ID
|
||||
* @return 结果
|
||||
*/
|
||||
public boolean hasChildByEvalItemId(Long id);
|
||||
|
||||
/**
|
||||
* 校验班站评价名称是否唯一
|
||||
*
|
||||
* @param o 班站评价信息
|
||||
* @return 结果
|
||||
*/
|
||||
public boolean checkEvalItemNameUnique(BanEvalItem o);
|
||||
|
||||
/**
|
||||
* 新增保存班站评价信息
|
||||
*
|
||||
* @param o 班站评价信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEvalItem(BanEvalItem o);
|
||||
|
||||
/**
|
||||
* 修改保存班站评价信息
|
||||
*
|
||||
* @param o 班站评价信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEvalItem(BanEvalItem o);
|
||||
|
||||
/**
|
||||
* 删除班站评价管理信息
|
||||
*
|
||||
* @param id 班站评价ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEvalItemById(Long id);
|
||||
|
||||
/**
|
||||
* 获取班站评价项列表的下拉选
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
List<BanEvalItem> getSelectList(BanEvalItem o);
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
package com.bonus.system.basic.service;
|
||||
|
||||
import com.bonus.system.basic.domain.BanTransCenter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 运检中心 业务层
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
public interface BanTransCenterService
|
||||
{
|
||||
/**
|
||||
* 根据条件分页查询
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 集合信息
|
||||
*/
|
||||
public List<BanTransCenter> selectBanTransCenterList(BanTransCenter o);
|
||||
|
||||
/**
|
||||
* 根据ID查询信息
|
||||
*
|
||||
* @param id ID
|
||||
* @return
|
||||
*/
|
||||
public BanTransCenter selectBanTransCenterById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除信息
|
||||
*
|
||||
* @param id 需要删除的ID
|
||||
*/
|
||||
public void deleteBanTransCenterById(Long id);
|
||||
|
||||
/**
|
||||
* 新增保存信息
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBanTransCenter(BanTransCenter o);
|
||||
|
||||
/**
|
||||
* 修改保存信息
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBanTransCenter(BanTransCenter o);
|
||||
|
||||
/**
|
||||
* 校验称是否唯一
|
||||
*
|
||||
* @param o
|
||||
* @return 结果
|
||||
*/
|
||||
public boolean checkBanTransCenterUnique(BanTransCenter o);
|
||||
|
||||
/**
|
||||
* 校验部门排序是否唯一
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
public boolean checkCenterSort(BanTransCenter o);
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package com.bonus.system.basic.service;
|
||||
|
||||
import com.bonus.system.basic.domain.BanTransStation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 运检站管理 业务层
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
public interface BanTransStationService
|
||||
{
|
||||
/**
|
||||
* 根据条件分页查询
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 集合信息
|
||||
*/
|
||||
public List<BanTransStation> selectBanTransStationList(BanTransStation o);
|
||||
|
||||
/**
|
||||
* 根据ID查询信息
|
||||
*
|
||||
* @param id ID
|
||||
* @return
|
||||
*/
|
||||
public BanTransStation selectBanTransStationById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除信息
|
||||
*
|
||||
* @param id 需要删除的ID
|
||||
*/
|
||||
public void deleteBanTransStationById(Long id);
|
||||
|
||||
/**
|
||||
* 新增保存信息
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBanTransStation(BanTransStation o);
|
||||
|
||||
/**
|
||||
* 修改保存信息
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBanTransStation(BanTransStation o);
|
||||
|
||||
/**
|
||||
* 校验称是否唯一
|
||||
*
|
||||
* @param o
|
||||
* @return 结果
|
||||
*/
|
||||
public boolean checkBanTransStationUnique(BanTransStation o);
|
||||
|
||||
/**
|
||||
* 校验是否存在项目信息
|
||||
*/
|
||||
public boolean checkBanTransCenter(Long id);
|
||||
|
||||
/**
|
||||
* 获取下拉列表
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
public List<BanTransStation> getSelectList(BanTransStation o);
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package com.bonus.system.basic.service;
|
||||
|
||||
import com.bonus.system.basic.domain.BanUnit;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 班站评价部门 业务层
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
public interface BanUnitService
|
||||
{
|
||||
/**
|
||||
* 根据条件分页查询
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 集合信息
|
||||
*/
|
||||
public List<BanUnit> selectBanUnitList(BanUnit o);
|
||||
|
||||
/**
|
||||
* 根据ID查询信息
|
||||
*
|
||||
* @param id ID
|
||||
* @return
|
||||
*/
|
||||
public BanUnit selectBanUnitById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除信息
|
||||
*
|
||||
* @param id 需要删除的ID
|
||||
*/
|
||||
public void deleteBanUnitById(Long id);
|
||||
|
||||
/**
|
||||
* 新增保存信息
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBanUnit(BanUnit o);
|
||||
|
||||
/**
|
||||
* 修改保存信息
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBanUnit(BanUnit o);
|
||||
|
||||
/**
|
||||
* 校验称是否唯一
|
||||
*
|
||||
* @param o
|
||||
* @return 结果
|
||||
*/
|
||||
public boolean checkBanUnitUnique(BanUnit o);
|
||||
|
||||
/**
|
||||
* 校验是否存在班站评价部门
|
||||
*/
|
||||
public boolean checkPro(Long id);
|
||||
|
||||
/**
|
||||
* 校验部门排序是否唯一
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
public boolean checkSort(BanUnit o);
|
||||
}
|
||||
|
|
@ -6,8 +6,8 @@ import com.bonus.system.basic.domain.EvaluativeItems;
|
|||
|
||||
/**
|
||||
* 项目评价管理 服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
public interface EvaluativeItemsService
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,159 @@
|
|||
package com.bonus.system.basic.service.impl;
|
||||
|
||||
import com.bonus.common.annotation.DataScope;
|
||||
import com.bonus.common.constant.UserConstants;
|
||||
import com.bonus.common.utils.StringUtils;
|
||||
import com.bonus.system.basic.dao.BanEvalItemMapper;
|
||||
import com.bonus.system.basic.domain.BanEvalItem;
|
||||
import com.bonus.system.basic.service.BanEvalItemService;
|
||||
import com.bonus.system.mapper.SysRoleMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 班站评价项管理 服务实现
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
@Service
|
||||
public class BanEvalItemServiceImpl implements BanEvalItemService
|
||||
{
|
||||
@Autowired
|
||||
private BanEvalItemMapper banEvalItemMapper;
|
||||
|
||||
/**
|
||||
* 查询班站评价项管理数据
|
||||
*
|
||||
* @param dept 班站评价项信息
|
||||
* @return 班站评价项信息集合
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "d")
|
||||
public List<BanEvalItem> selectEvalItemList(BanEvalItem dept)
|
||||
{
|
||||
return banEvalItemMapper.selectBanEvalItemList(dept);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据班站评价项ID查询信息
|
||||
*
|
||||
* @param id 班站评价项ID
|
||||
* @return 班站评价项信息
|
||||
*/
|
||||
@Override
|
||||
public BanEvalItem selectEvalItemById(Long id)
|
||||
{
|
||||
return banEvalItemMapper.selectBanEvalItemById(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 是否存在子节点
|
||||
*
|
||||
* @param id 班站评价项ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean hasChildByEvalItemId(Long id)
|
||||
{
|
||||
int result = banEvalItemMapper.hasChildByBanEvalItemId(id);
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验班站评价项名称是否唯一
|
||||
*
|
||||
* @param dept 班站评价项信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean checkEvalItemNameUnique(BanEvalItem dept)
|
||||
{
|
||||
Long id = StringUtils.isNull(dept.getId()) ? -1L : dept.getId();
|
||||
BanEvalItem info = banEvalItemMapper.checkBanEvalItemNameUnique(dept.getEvalName(), dept.getParentId());
|
||||
if (StringUtils.isNotNull(info) && info.getId().longValue() != id.longValue())
|
||||
{
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存班站评价项信息
|
||||
*
|
||||
* @param dept 班站评价项信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEvalItem(BanEvalItem dept)
|
||||
{
|
||||
return banEvalItemMapper.insertBanEvalItem(dept);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存班站评价项信息
|
||||
*
|
||||
* @param dept 班站评价项信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEvalItem(BanEvalItem dept)
|
||||
{
|
||||
BanEvalItem newParentDept = banEvalItemMapper.selectBanEvalItemById(dept.getParentId());
|
||||
BanEvalItem oldDept = banEvalItemMapper.selectBanEvalItemById(dept.getId());
|
||||
int result = banEvalItemMapper.updateBanEvalItem(dept);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除班站评价项管理信息
|
||||
*
|
||||
* @param id 班站评价项ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEvalItemById(Long id)
|
||||
{
|
||||
return banEvalItemMapper.deleteBanEvalItemById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班站评价项项列表的下拉选
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<BanEvalItem> getSelectList(BanEvalItem o) {
|
||||
return banEvalItemMapper.getSelectList( o);
|
||||
}
|
||||
|
||||
/**
|
||||
* 得到子节点列表
|
||||
*/
|
||||
private List<BanEvalItem> getChildList(List<BanEvalItem> list, BanEvalItem t)
|
||||
{
|
||||
List<BanEvalItem> tlist = new ArrayList<BanEvalItem>();
|
||||
Iterator<BanEvalItem> it = list.iterator();
|
||||
while (it.hasNext())
|
||||
{
|
||||
BanEvalItem n = (BanEvalItem) it.next();
|
||||
if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getId().longValue())
|
||||
{
|
||||
tlist.add(n);
|
||||
}
|
||||
}
|
||||
return tlist;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否有子节点
|
||||
*/
|
||||
private boolean hasChild(List<BanEvalItem> list, BanEvalItem t)
|
||||
{
|
||||
return getChildList(list, t).size() > 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
package com.bonus.system.basic.service.impl;
|
||||
|
||||
import com.bonus.common.constant.UserConstants;
|
||||
import com.bonus.common.utils.StringUtils;
|
||||
import com.bonus.system.basic.dao.BanTransCenterMapper;
|
||||
import com.bonus.system.basic.domain.BanTransCenter;
|
||||
import com.bonus.system.basic.service.BanTransCenterService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目事业部管理 业务层处理
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
@Service
|
||||
public class BanTransCenterServiceImpl implements BanTransCenterService
|
||||
{
|
||||
@Autowired
|
||||
private BanTransCenterMapper proUintMapper;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询类型
|
||||
*
|
||||
* @param dictType 类型信息
|
||||
* @return 类型集合信息
|
||||
*/
|
||||
@Override
|
||||
public List<BanTransCenter> selectBanTransCenterList(BanTransCenter dictType)
|
||||
{
|
||||
return proUintMapper.selectBanTransCenterList(dictType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据类型ID查询信息
|
||||
*
|
||||
* @param dictId 类型ID
|
||||
* @return 类型
|
||||
*/
|
||||
@Override
|
||||
public BanTransCenter selectBanTransCenterById(Long dictId)
|
||||
{
|
||||
return proUintMapper.selectBanTransCenterById(dictId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除类型信息
|
||||
*
|
||||
* @param id 需要删除的ID
|
||||
*/
|
||||
@Override
|
||||
public void deleteBanTransCenterById(Long id)
|
||||
{
|
||||
proUintMapper.deleteBanTransCenterById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存类型信息
|
||||
*
|
||||
* @param o 类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBanTransCenter(BanTransCenter o)
|
||||
{
|
||||
int row = proUintMapper.insertBanTransCenter(o);
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存类型信息
|
||||
*
|
||||
* @param o 类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateBanTransCenter(BanTransCenter o)
|
||||
{
|
||||
int row = proUintMapper.updateBanTransCenter(o);
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验类型称是否唯一
|
||||
*
|
||||
* @param o 类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean checkBanTransCenterUnique(BanTransCenter o)
|
||||
{
|
||||
Long id = StringUtils.isNull(o.getId()) ? -1L : o.getId();
|
||||
BanTransCenter unitName = proUintMapper.checkBanTransCenterUnique(o.getCenterName());
|
||||
if (StringUtils.isNotNull(unitName) && unitName.getId().longValue() != id.longValue())
|
||||
{
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验部门排序是否唯一
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public boolean checkCenterSort(BanTransCenter o) {
|
||||
Long id = StringUtils.isNull(o.getId()) ? -1L : o.getId();
|
||||
BanTransCenter bean = proUintMapper.checkCenterSort(o.getCenterSort());
|
||||
if (StringUtils.isNotNull(bean) && bean.getId().longValue() != id.longValue())
|
||||
{
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
package com.bonus.system.basic.service.impl;
|
||||
|
||||
import com.bonus.common.constant.UserConstants;
|
||||
import com.bonus.common.utils.StringUtils;
|
||||
import com.bonus.system.basic.dao.BanTransStationMapper;
|
||||
import com.bonus.system.basic.domain.BanTransStation;
|
||||
import com.bonus.system.basic.service.BanTransStationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 运检站管理 业务层处理
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
@Service
|
||||
public class BanTransStationServiceImpl implements BanTransStationService
|
||||
{
|
||||
@Autowired
|
||||
private BanTransStationMapper banTransStationMapper;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询类型
|
||||
*
|
||||
* @param dictType 类型信息
|
||||
* @return 类型集合信息
|
||||
*/
|
||||
@Override
|
||||
public List<BanTransStation> selectBanTransStationList(BanTransStation dictType)
|
||||
{
|
||||
return banTransStationMapper.selectBanTransStationList(dictType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据类型ID查询信息
|
||||
*
|
||||
* @param dictId 类型ID
|
||||
* @return 类型
|
||||
*/
|
||||
@Override
|
||||
public BanTransStation selectBanTransStationById(Long dictId)
|
||||
{
|
||||
return banTransStationMapper.selectBanTransStationById(dictId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除类型信息
|
||||
*
|
||||
* @param id 需要删除的ID
|
||||
*/
|
||||
@Override
|
||||
public void deleteBanTransStationById(Long id)
|
||||
{
|
||||
banTransStationMapper.deleteBanTransStationById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增运检站管理信息
|
||||
*
|
||||
* @param o 运检站管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBanTransStation(BanTransStation o)
|
||||
{
|
||||
int row = banTransStationMapper.insertBanTransStation(o);
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改运检站管理信息
|
||||
*
|
||||
* @param o 运检站管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateBanTransStation(BanTransStation o)
|
||||
{
|
||||
int row = banTransStationMapper.updateBanTransStation(o);
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 运检站管理称是否唯一
|
||||
*
|
||||
* @param o 运检站管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean checkBanTransStationUnique(BanTransStation o)
|
||||
{
|
||||
Long id = StringUtils.isNull(o.getId()) ? -1L : o.getId();
|
||||
BanTransStation unitName = banTransStationMapper.checkBanTransStationUnique(o.getStationName());
|
||||
if (StringUtils.isNotNull(unitName) && unitName.getId().longValue() != id.longValue())
|
||||
{
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 校验是否存在运检站管理
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public boolean checkBanTransCenter(Long id)
|
||||
{
|
||||
BanTransStation o = banTransStationMapper.checkBanTransCenter(id);
|
||||
if (StringUtils.isNotNull(o))
|
||||
{
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取下拉列表
|
||||
*/
|
||||
@Override
|
||||
public List<BanTransStation> getSelectList(BanTransStation o) {
|
||||
return banTransStationMapper.getSelectList(o);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
package com.bonus.system.basic.service.impl;
|
||||
|
||||
import com.bonus.common.constant.UserConstants;
|
||||
import com.bonus.common.utils.StringUtils;
|
||||
import com.bonus.system.basic.dao.BanUnitMapper;
|
||||
import com.bonus.system.basic.domain.BanUnit;
|
||||
import com.bonus.system.basic.service.BanUnitService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 班站评价部门 业务层处理
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
@Service
|
||||
public class BanUnitServiceImpl implements BanUnitService
|
||||
{
|
||||
@Autowired
|
||||
private BanUnitMapper banUnitMapper;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询
|
||||
*
|
||||
* @param dictType 信息
|
||||
* @return 集合信息
|
||||
*/
|
||||
@Override
|
||||
public List<BanUnit> selectBanUnitList(BanUnit dictType)
|
||||
{
|
||||
return banUnitMapper.selectBanUnitList(dictType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询信息
|
||||
*
|
||||
* @param dictId ID
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public BanUnit selectBanUnitById(Long dictId)
|
||||
{
|
||||
return banUnitMapper.selectBanUnitById(dictId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除信息
|
||||
*
|
||||
* @param id 需要删除的ID
|
||||
*/
|
||||
@Override
|
||||
public void deleteBanUnitById(Long id)
|
||||
{
|
||||
banUnitMapper.deleteBanUnitById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存信息
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBanUnit(BanUnit o)
|
||||
{
|
||||
int row = banUnitMapper.insertBanUnit(o);
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存信息
|
||||
*
|
||||
* @param o 信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateBanUnit(BanUnit o)
|
||||
{
|
||||
int row = banUnitMapper.updateBanUnit(o);
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验称是否唯一
|
||||
*
|
||||
* @param o
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean checkBanUnitUnique(BanUnit o)
|
||||
{
|
||||
Long id = StringUtils.isNull(o.getId()) ? -1L : o.getId();
|
||||
BanUnit unitName = banUnitMapper.checkBanUnitUnique(o.getName());
|
||||
if (StringUtils.isNotNull(unitName) && unitName.getId().longValue() != id.longValue())
|
||||
{
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 校验是否存在班站评价部门
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public boolean checkPro(Long id)
|
||||
{
|
||||
BanUnit o = banUnitMapper.checkPro(id);
|
||||
if (StringUtils.isNotNull(o))
|
||||
{
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验部门排序是否唯一
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public boolean checkSort(BanUnit o) {
|
||||
Long id = StringUtils.isNull(o.getId()) ? -1L : o.getId();
|
||||
BanUnit bean = banUnitMapper.checkSort(o.getSort());
|
||||
if (StringUtils.isNotNull(bean) && bean.getId().longValue() != id.longValue())
|
||||
{
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ import com.bonus.system.mapper.SysRoleMapper;
|
|||
/**
|
||||
* 项目评价管理 服务实现
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author lsun
|
||||
*/
|
||||
@Service
|
||||
public class EvaluativeItemsServiceImpl implements EvaluativeItemsService
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ public class ProUintServiceImpl implements ProUintService
|
|||
@Override
|
||||
public boolean checkDeptSort(ProUint o) {
|
||||
Long id = StringUtils.isNull(o.getId()) ? -1L : o.getId();
|
||||
ProUint bean = proUintMapper.checkDeptSort(o.getDeptSort());
|
||||
ProUint bean = proUintMapper.checkSort(o.getDeptSort());
|
||||
if (StringUtils.isNotNull(bean) && bean.getId().longValue() != id.longValue())
|
||||
{
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.system.basic.dao.BanEvalItemMapper">
|
||||
|
||||
<sql id="selectBanEvalItem">
|
||||
SELECT id,eval_name as evalName, parent_id as parentId,
|
||||
score, leve,
|
||||
create_time as createTime, create_user as createBy, update_time as updateTime,update_user as updateBy
|
||||
FROM tb_project_eval_item
|
||||
</sql>
|
||||
|
||||
<insert id="insertBanEvalItem">
|
||||
insert into tb_project_eval_item(
|
||||
<if test="evalName != null and evalName != '' ">eval_name,</if>
|
||||
<if test="parentId != null ">parent_id,</if>
|
||||
<if test="score != null and score != ''">score,</if>
|
||||
<if test="leve != null and leve != ''">leve,</if>
|
||||
<if test="createUser != null">create_user,</if>
|
||||
create_time,del_flag
|
||||
)values(
|
||||
<if test="evalName != null and evalName != ''">#{evalName},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="score != null and score != ''">#{score},</if>
|
||||
<if test="leve != null and leve != ''">#{leve},</if>
|
||||
<if test="createUser != null ">#{createUser},</if>
|
||||
sysdate(),'0'
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateBanEvalItem">
|
||||
update tb_project_eval_item
|
||||
<set>
|
||||
<if test="evalName != null and evalName != ''">eval_name = #{evalName},</if>
|
||||
<if test="parentId != null ">parent_id = #{parentId},</if>
|
||||
<if test="score != null and score != ''">score = #{score},</if>
|
||||
<if test="leve != null and leve != ''">leve = #{leve},</if>
|
||||
<if test="updateUser != null ">update_user = #{updateUser},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteBanEvalItemById">
|
||||
update tb_project_eval_item set del_flag = '1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectBanEvalItemList" resultType="com.bonus.system.basic.domain.BanEvalItem">
|
||||
<include refid="selectBanEvalItem"/>
|
||||
WHERE del_flag = '0'
|
||||
<if test="evalName != null and evalName != ''">
|
||||
and eval_name like concat('%',#{evalName},'%')
|
||||
</if>
|
||||
ORDER BY id desc
|
||||
</select>
|
||||
<select id="selectBanEvalItemById" resultType="com.bonus.system.basic.domain.BanEvalItem">
|
||||
<include refid="selectBanEvalItem"/>
|
||||
WHERE del_flag = '0'
|
||||
AND id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="hasChildByBanEvalItemId" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*)
|
||||
FROM tb_project_eval_item
|
||||
WHERE del_flag = '0' AND parent_id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="checkBanEvalItemNameUnique" resultType="com.bonus.system.basic.domain.BanEvalItem">
|
||||
<include refid="selectBanEvalItem"/>
|
||||
where eval_name=#{evalName} and parent_id = #{parentId} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<select id="getSelectList" resultType="com.bonus.system.basic.domain.BanEvalItem">
|
||||
SELECT id, eval_name AS evalName
|
||||
FROM tb_project_eval_item
|
||||
WHERE del_flag ='0' AND parent_id = '0'
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.system.basic.dao.BanTransCenterMapper">
|
||||
|
||||
<sql id="selectBanTransCenterLVo">
|
||||
SELECT id,
|
||||
center_name as centerName,
|
||||
center_sort as centerSort,
|
||||
create_time as createTime,
|
||||
create_user as createUser,
|
||||
update_time as updateTime,
|
||||
update_user as updateUser,
|
||||
del_flag as delFlag
|
||||
FROM tb_ban_trans_center
|
||||
</sql>
|
||||
<insert id="insertBanTransCenter">
|
||||
insert into tb_ban_trans_center(
|
||||
<if test="centerName != null and centerName != ''">center_name,</if>
|
||||
<if test="centerSort != null">center_sort,</if>
|
||||
<if test="createUser != null">create_user,</if>
|
||||
create_time,del_flag
|
||||
)values(
|
||||
<if test="centerName != null and centerName != ''">#{centerName},</if>
|
||||
<if test="centerSort != null">#{centerSort},</if>
|
||||
<if test="createUser != null">#{createUser},</if>
|
||||
sysdate(),'0'
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateBanTransCenter">
|
||||
update tb_ban_trans_center
|
||||
<set>
|
||||
<if test="centerName != null and centerName != ''">center_name = #{centerName},</if>
|
||||
<if test="centerSort != null">center_sort = #{centerSort},</if>
|
||||
<if test="updateUser != null">update_user = #{updateUser},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteBanTransCenterById">
|
||||
update tb_ban_trans_center set del_flag = '1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectBanTransCenterList" resultType="com.bonus.system.basic.domain.BanTransCenter">
|
||||
<include refid="selectBanTransCenterLVo"/>
|
||||
where del_flag = '0'
|
||||
<if test="centerName != null and centerName != ''">
|
||||
AND center_name like concat('%', #{centerName}, '%')
|
||||
</if>
|
||||
ORDER BY center_sort desc
|
||||
</select>
|
||||
|
||||
<select id="selectBanTransCenterById" resultType="com.bonus.system.basic.domain.BanTransCenter">
|
||||
<include refid="selectBanTransCenterLVo"/>
|
||||
where del_flag = '0' and id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="checkBanTransCenterUnique" resultType="com.bonus.system.basic.domain.BanTransCenter">
|
||||
<include refid="selectBanTransCenterLVo"/>
|
||||
where del_flag = '0' and center_name = #{centerName}
|
||||
</select>
|
||||
|
||||
<select id="checkCenterSort" resultType="com.bonus.system.basic.domain.BanTransCenter">
|
||||
<include refid="selectBanTransCenterLVo"/>
|
||||
where del_flag = '0' and center_sort = #{centerSort}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.system.basic.dao.BanTransStationMapper">
|
||||
|
||||
<sql id="selectBanTransStationLVo">
|
||||
SELECT tbts.id,
|
||||
tbts.create_time as createTime,
|
||||
tbts.create_user as createUser,
|
||||
tbts.update_time as updateTime,
|
||||
tbts.update_user as updateUser,
|
||||
tbts.del_falg as delFlag,
|
||||
tbts.station_name as stationName,
|
||||
tbtc.id as unitId,
|
||||
tbtc.center_name as centerName,
|
||||
tbtc.center_sort as centerSort
|
||||
FROM tb_ban_trans_station tbts
|
||||
LEFT JOIN tb_ban_trans_center tbtc ON tbtc.id = tbts.center_id
|
||||
</sql>
|
||||
<insert id="insertBanTransStation">
|
||||
insert into tb_ban_trans_station(
|
||||
<if test="stationName != null and stationName != ''">station_name,</if>
|
||||
<if test="centerId != null">center_id,</if>
|
||||
<if test="createUser != null">create_user,</if>
|
||||
create_time,del_falg
|
||||
)values(
|
||||
<if test="stationName != null and stationName != ''">#{stationName},</if>
|
||||
<if test="centerId != null">#{centerId},</if>
|
||||
<if test="createUser != null">#{createUser},</if>
|
||||
sysdate(),'0'
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateBanTransStation">
|
||||
update tb_ban_trans_station
|
||||
<set>
|
||||
<if test="stationName != null and stationName != ''">station_name = #{stationName},</if>
|
||||
<if test="centerId != null">center_id = #{centerId},</if>
|
||||
<if test="updateUser != null">update_user = #{updateUser},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteBanTransStationById">
|
||||
update tb_ban_trans_station set del_falg = '1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectBanTransStationList" resultType="com.bonus.system.basic.domain.BanTransStation">
|
||||
<include refid="selectBanTransStationLVo"/>
|
||||
where tbts.del_falg = '0'
|
||||
<if test="stationName != null and stationName != ''">
|
||||
AND tbts.station_name like concat('%', #{stationName}, '%')
|
||||
</if>
|
||||
ORDER BY tbts.id desc
|
||||
</select>
|
||||
|
||||
<select id="selectBanTransStationById" resultType="com.bonus.system.basic.domain.BanTransStation">
|
||||
<include refid="selectBanTransStationLVo"/>
|
||||
where tbts.del_falg = '0' and tbts.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="checkBanTransStationUnique" resultType="com.bonus.system.basic.domain.BanTransStation">
|
||||
<include refid="selectBanTransStationLVo"/>
|
||||
where tbts.del_falg = '0' and tbts.station_name = #{stationName}
|
||||
</select>
|
||||
|
||||
<select id="checkBanTransCenter" resultType="com.bonus.system.basic.domain.BanTransStation">
|
||||
SELECT * FROM tb_ban_trans_station
|
||||
WHERE del_falg = '0' AND unit_id = #{id} limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkDeptSort" resultType="com.bonus.system.basic.domain.BanTransStation">
|
||||
<include refid="selectBanTransStationLVo"/>
|
||||
where del_falg = '0' and dept_sort = #{deptSort}
|
||||
</select>
|
||||
|
||||
<select id="getSelectList" resultType="com.bonus.system.basic.domain.BanTransStation">
|
||||
SELECT id as unitId , unit_name AS unitName
|
||||
FROM tb_ban_trans_center
|
||||
WHERE del_falg ='0'
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.system.basic.dao.BanUnitMapper">
|
||||
|
||||
<sql id="selectBanUnitLVo">
|
||||
SELECT id,
|
||||
name ,
|
||||
sort ,
|
||||
create_time as createTime,
|
||||
create_user as createUser,
|
||||
update_user as updateUser,
|
||||
update_time as updateTime,
|
||||
del_flag as delFlag
|
||||
FROM tb_ban_unit
|
||||
</sql>
|
||||
<insert id="insertBanUnit">
|
||||
insert into tb_ban_unit(
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="sort != null">sort,</if>
|
||||
<if test="createUser != null">create_user,</if>
|
||||
create_time,del_flag
|
||||
)values(
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="sort != null">#{sort},</if>
|
||||
<if test="createUser != null">#{createUser},</if>
|
||||
sysdate(),'0'
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateBanUnit">
|
||||
update tb_ban_unit
|
||||
<set>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="sort != null">sort = #{sort},</if>
|
||||
<if test="updateUser != null">update_user = #{updateUser},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteBanUnitById">
|
||||
update tb_ban_unit set del_flag = '1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectBanUnitList" resultType="com.bonus.system.basic.domain.BanUnit">
|
||||
<include refid="selectBanUnitLVo"/>
|
||||
where del_flag = '0'
|
||||
<if test="name != null and name != ''">
|
||||
AND name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
ORDER BY sort desc
|
||||
</select>
|
||||
|
||||
<select id="selectBanUnitById" resultType="com.bonus.system.basic.domain.BanUnit">
|
||||
<include refid="selectBanUnitLVo"/>
|
||||
where del_flag = '0' and id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="checkBanUnitUnique" resultType="com.bonus.system.basic.domain.BanUnit">
|
||||
<include refid="selectBanUnitLVo"/>
|
||||
where del_flag = '0' and name = #{name}
|
||||
</select>
|
||||
|
||||
<select id="checkPro" resultType="com.bonus.system.basic.domain.BanUnit">
|
||||
SELECT * FROM tb_project
|
||||
WHERE del_flag = '0' AND unit_id = #{id} limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkDeptSort" resultType="com.bonus.system.basic.domain.BanUnit">
|
||||
<include refid="selectBanUnitLVo"/>
|
||||
where del_flag = '0' and sort = #{sort}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE del_flag = '0' AND unit_id = #{id} limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkDeptSort" resultType="com.bonus.system.basic.domain.ProUint">
|
||||
<select id="checkSort" resultType="com.bonus.system.basic.domain.ProUint">
|
||||
<include refid="selectProUintLVo"/>
|
||||
where del_flag = '0' and dept_sort = #{deptSort}
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue