分公司管理
This commit is contained in:
parent
ee8f45afa1
commit
dc2fa76fa1
|
|
@ -55,11 +55,14 @@ public class BmProjectController extends BaseController {
|
||||||
@PreventRepeatSubmit
|
@PreventRepeatSubmit
|
||||||
// @RequiresPermissions("basic:project:export")
|
// @RequiresPermissions("basic:project:export")
|
||||||
@SysLog(title = "项目管理", businessType = OperaType.EXPORT, logType = 1,module = "项目管理->导出项目列表")
|
@SysLog(title = "项目管理", businessType = OperaType.EXPORT, logType = 1,module = "项目管理->导出项目列表")
|
||||||
@GetMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, BmProject bmProject) {
|
public void export(HttpServletResponse response, BmProject bmProject) {
|
||||||
List<BmProject> list = bmProjectService.selectBmProjectList(bmProject);
|
List<BmProject> list = bmProjectService.selectBmProjectList(bmProject);
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
list.get(i).setSerialNumber(i + 1);
|
||||||
|
}
|
||||||
ExcelUtil<BmProject> util = new ExcelUtil<BmProject>(BmProject.class);
|
ExcelUtil<BmProject> util = new ExcelUtil<BmProject>(BmProject.class);
|
||||||
util.exportExcel(response, list, "工程项目管理数据");
|
util.exportExcel(response, list, "项目管理数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ public class BranchCompanyController extends BaseController {
|
||||||
@ApiOperation(value = "删除分公司")
|
@ApiOperation(value = "删除分公司")
|
||||||
// @PreventRepeatSubmit
|
// @PreventRepeatSubmit
|
||||||
@RequiresPermissions("basic:branchCompany:del")
|
@RequiresPermissions("basic:branchCompany:del")
|
||||||
@SysLog(title = "分公司管理", businessType = OperaType.UPDATE, logType = 1,module = "分公司管理->删除分公司")
|
@SysLog(title = "分公司管理", businessType = OperaType.DELETE, logType = 1,module = "分公司管理->删除分公司")
|
||||||
@PostMapping("delBranchCompany")
|
@PostMapping("delBranchCompany")
|
||||||
public AjaxResult delBranchCompany(@RequestBody BranchCompanyVo vo) {
|
public AjaxResult delBranchCompany(@RequestBody BranchCompanyVo vo) {
|
||||||
return service.delBranchCompany(vo);
|
return service.delBranchCompany(vo);
|
||||||
|
|
@ -76,7 +76,7 @@ public class BranchCompanyController extends BaseController {
|
||||||
|
|
||||||
@ApiOperation(value = "修改分公司状态")
|
@ApiOperation(value = "修改分公司状态")
|
||||||
// @PreventRepeatSubmit
|
// @PreventRepeatSubmit
|
||||||
@RequiresPermissions("basic:branchCompany:editStatus")
|
// @RequiresPermissions("basic:branchCompany:editStatus")
|
||||||
@SysLog(title = "分公司管理", businessType = OperaType.UPDATE, logType = 1,module = "分公司管理->修改分公司状态")
|
@SysLog(title = "分公司管理", businessType = OperaType.UPDATE, logType = 1,module = "分公司管理->修改分公司状态")
|
||||||
@PostMapping("editBranchCompanyStatus")
|
@PostMapping("editBranchCompanyStatus")
|
||||||
public AjaxResult editBranchCompanyStatus(@RequestBody BranchCompanyVo vo) {
|
public AjaxResult editBranchCompanyStatus(@RequestBody BranchCompanyVo vo) {
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,9 @@ import javax.validation.constraints.Pattern;
|
||||||
public class BmProject extends BaseEntity {
|
public class BmProject extends BaseEntity {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Excel(name = "序号")
|
||||||
|
private int serialNumber;
|
||||||
|
|
||||||
/**关键字*/
|
/**关键字*/
|
||||||
private String keyWord;
|
private String keyWord;
|
||||||
|
|
||||||
|
|
@ -38,6 +41,7 @@ public class BmProject extends BaseEntity {
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "分公司名称")
|
@ApiModelProperty(value = "分公司名称")
|
||||||
|
@Excel(name = "分公司名称")
|
||||||
private String companyName;
|
private String companyName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,7 @@ public class BranchCompanyServiceImpl implements IBranchCompanyService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AjaxResult editBranchCompanyStatus(BranchCompanyVo vo) {
|
public AjaxResult editBranchCompanyStatus(BranchCompanyVo vo) {
|
||||||
try {
|
try {
|
||||||
// 校验必填数据
|
// 校验必填数据
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="params.abbrName != null and params.abbrName != ''">abbr_name,</if>
|
<if test="params.abbrName != null and params.abbrName != ''">abbr_name,</if>
|
||||||
<if test="params.useStatus != null and params.useStatus != ''">use_status,</if>
|
<if test="params.useStatus != null and params.useStatus != ''">use_status,</if>
|
||||||
<if test="params.remark != null and params.remark!=''">remark,</if>
|
<if test="params.remark != null and params.remark!=''">remark,</if>
|
||||||
|
<if test="params.createUserId != null">create_user_id,</if>
|
||||||
|
<if test="params.updateUserId != null">update_user_id,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="params.companyName != null and params.companyName != ''">#{params.companyName},</if>
|
<if test="params.companyName != null and params.companyName != ''">#{params.companyName},</if>
|
||||||
<if test="params.abbrName != null and params.abbrName != ''">#{params.abbrName},</if>
|
<if test="params.abbrName != null and params.abbrName != ''">#{params.abbrName},</if>
|
||||||
<if test="params.useStatus != null and params.useStatus != ''">#{params.useStatus},</if>
|
<if test="params.useStatus != null and params.useStatus != ''">#{params.useStatus},</if>
|
||||||
<if test="params.remark != null and params.remark!=''">#{params.remark},</if>
|
<if test="params.remark != null and params.remark!=''">#{params.remark},</if>
|
||||||
|
<if test="params.createUserId != null">#{params.createUserId},</if>
|
||||||
|
<if test="params.updateUserId != null">#{params.updateUserId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</if>
|
</if>
|
||||||
<if test="type == 2">
|
<if test="type == 2">
|
||||||
|
|
@ -27,13 +31,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
abbr_name = #{params.abbrName},
|
abbr_name = #{params.abbrName},
|
||||||
use_status = #{params.useStatus},
|
use_status = #{params.useStatus},
|
||||||
remark = #{params.remark},
|
remark = #{params.remark},
|
||||||
|
update_user_id = #{params.updateUserId},
|
||||||
</trim>
|
</trim>
|
||||||
WHERE id = #{params.id}
|
WHERE id = #{params.id}
|
||||||
</if>
|
</if>
|
||||||
<if test="type == 3">
|
<if test="type == 3">
|
||||||
UPDATE tb_branch_company SET is_active = '0' WHERE id = #{params.id}
|
UPDATE tb_branch_company SET is_active = '0' WHERE id = #{params.id}
|
||||||
</if>
|
</if>
|
||||||
<if test="type == 3">
|
<if test="type == 4">
|
||||||
UPDATE tb_branch_company SET use_status = #{params.useStatus} WHERE id = #{params.id}
|
UPDATE tb_branch_company SET use_status = #{params.useStatus} WHERE id = #{params.id}
|
||||||
</if>
|
</if>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue