分公司管理

This commit is contained in:
cwchen 2025-04-18 15:44:28 +08:00
parent ee8f45afa1
commit dc2fa76fa1
5 changed files with 18 additions and 5 deletions

View File

@ -55,11 +55,14 @@ public class BmProjectController extends BaseController {
@PreventRepeatSubmit
// @RequiresPermissions("basic:project:export")
@SysLog(title = "项目管理", businessType = OperaType.EXPORT, logType = 1,module = "项目管理->导出项目列表")
@GetMapping("/export")
@PostMapping("/export")
public void export(HttpServletResponse response, BmProject 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);
util.exportExcel(response, list, "工程项目管理数据");
util.exportExcel(response, list, "项目管理数据");
}
/**

View File

@ -68,7 +68,7 @@ public class BranchCompanyController extends BaseController {
@ApiOperation(value = "删除分公司")
// @PreventRepeatSubmit
@RequiresPermissions("basic:branchCompany:del")
@SysLog(title = "分公司管理", businessType = OperaType.UPDATE, logType = 1,module = "分公司管理->删除分公司")
@SysLog(title = "分公司管理", businessType = OperaType.DELETE, logType = 1,module = "分公司管理->删除分公司")
@PostMapping("delBranchCompany")
public AjaxResult delBranchCompany(@RequestBody BranchCompanyVo vo) {
return service.delBranchCompany(vo);
@ -76,7 +76,7 @@ public class BranchCompanyController extends BaseController {
@ApiOperation(value = "修改分公司状态")
// @PreventRepeatSubmit
@RequiresPermissions("basic:branchCompany:editStatus")
// @RequiresPermissions("basic:branchCompany:editStatus")
@SysLog(title = "分公司管理", businessType = OperaType.UPDATE, logType = 1,module = "分公司管理->修改分公司状态")
@PostMapping("editBranchCompanyStatus")
public AjaxResult editBranchCompanyStatus(@RequestBody BranchCompanyVo vo) {

View File

@ -28,6 +28,9 @@ import javax.validation.constraints.Pattern;
public class BmProject extends BaseEntity {
private static final long serialVersionUID = 1L;
@Excel(name = "序号")
private int serialNumber;
/**关键字*/
private String keyWord;
@ -38,6 +41,7 @@ public class BmProject extends BaseEntity {
private Long projectId;
@ApiModelProperty(value = "分公司名称")
@Excel(name = "分公司名称")
private String companyName;
/**

View File

@ -106,6 +106,7 @@ public class BranchCompanyServiceImpl implements IBranchCompanyService {
}
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult editBranchCompanyStatus(BranchCompanyVo vo) {
try {
// 校验必填数据

View File

@ -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.useStatus != null and params.useStatus != ''">use_status,</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 prefix="values (" suffix=")" suffixOverrides=",">
<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.useStatus != null and params.useStatus != ''">#{params.useStatus},</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>
</if>
<if test="type == 2">
@ -27,13 +31,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
abbr_name = #{params.abbrName},
use_status = #{params.useStatus},
remark = #{params.remark},
update_user_id = #{params.updateUserId},
</trim>
WHERE id = #{params.id}
</if>
<if test="type == 3">
UPDATE tb_branch_company SET is_active = '0' WHERE id = #{params.id}
</if>
<if test="type == 3">
<if test="type == 4">
UPDATE tb_branch_company SET use_status = #{params.useStatus} WHERE id = #{params.id}
</if>
</insert>