From 93f07b531eb2ec90514255e72f7bf56f2b708e7c Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Fri, 13 Dec 2024 13:12:19 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E6=8E=A5=E5=8D=95=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/lease/service/impl/MaLeaseInfoServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/lease/service/impl/MaLeaseInfoServiceImpl.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/lease/service/impl/MaLeaseInfoServiceImpl.java index da7a9f3..aa44033 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/lease/service/impl/MaLeaseInfoServiceImpl.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/lease/service/impl/MaLeaseInfoServiceImpl.java @@ -10,6 +10,7 @@ import com.bonus.common.biz.enums.LeaseInfoEnum; import com.bonus.common.core.exception.ServiceException; import com.bonus.common.core.utils.DateUtils; import com.bonus.common.core.utils.StringUtils; +import com.bonus.common.core.utils.encryption.Sm4Utils; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.common.security.utils.SecurityUtils; import com.bonus.material.device.mapper.BmFileInfoMapper; @@ -178,6 +179,7 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService { // 2. 查询租赁信息 MaLeaseVo maLeaseVo = leaseInfoMapper.selectByName(maLeaseInfo); + maLeaseVo.setOrderPhone(Sm4Utils.decrypt(maLeaseVo.getOrderPhone())); List leaseDetailsList = leaseInfoMapper.selectDetailsById(maLeaseInfo); // 3. 处理租赁详情信息 @@ -272,6 +274,7 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService { //查询列表中数据,如果需求截止日期超过当前,则修改状态为已过期 for (MaLeaseVo maLeaseVo : list) { Date endTime = maLeaseVo.getEndTime(); + maLeaseVo.setOrderPhone(Sm4Utils.decrypt(maLeaseVo.getOrderPhone())); if (maLeaseVo.getLeaseStatus().equals(LeaseInfoEnum.LEASE_PENDING_ORDER.getStatus()) && endTime != null && endTime.before(new Date())) { //根据id修改状态为已过期 From 19ff2c9619756152b4534f1b742db6e5832d03f1 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Mon, 16 Dec 2024 11:00:02 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E6=94=B6=E8=B4=A7=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BmCompanyAddressController.java | 119 ++++++++++++++++++ .../basic/domain/BmCompanyAddress.java | 51 ++++++++ .../basic/mapper/BmCompanyAddressMapper.java | 60 +++++++++ .../service/IBmCompanyAddressService.java | 60 +++++++++ .../impl/BmCompanyAddressServiceImpl.java | 98 +++++++++++++++ .../material/lease/domain/MaLeaseInfo.java | 6 +- .../material/basic/BmCompanyAddressMapper.xml | 83 ++++++++++++ 7 files changed, 474 insertions(+), 3 deletions(-) create mode 100644 bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/controller/BmCompanyAddressController.java create mode 100644 bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/domain/BmCompanyAddress.java create mode 100644 bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/mapper/BmCompanyAddressMapper.java create mode 100644 bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/service/IBmCompanyAddressService.java create mode 100644 bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/service/impl/BmCompanyAddressServiceImpl.java create mode 100644 bonus-modules/bonus-material-mall/src/main/resources/mapper/material/basic/BmCompanyAddressMapper.xml diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/controller/BmCompanyAddressController.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/controller/BmCompanyAddressController.java new file mode 100644 index 0000000..14a3f41 --- /dev/null +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/controller/BmCompanyAddressController.java @@ -0,0 +1,119 @@ +package com.bonus.material.basic.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import com.bonus.common.log.enums.OperaType; +import com.bonus.material.common.annotation.PreventRepeatSubmit; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.bonus.common.log.annotation.SysLog; +import com.bonus.common.security.annotation.RequiresPermissions; +import com.bonus.material.basic.domain.BmCompanyAddress; +import com.bonus.material.basic.service.IBmCompanyAddressService; +import com.bonus.common.core.web.controller.BaseController; +import com.bonus.common.core.web.domain.AjaxResult; +import com.bonus.common.core.utils.poi.ExcelUtil; +import com.bonus.common.core.web.page.TableDataInfo; + +/** + * 企业信息Controller + * + * @author xsheng + * @date 2024-12-16 + */ +@Api(tags = "企业信息接口") +@RestController +@RequestMapping("/bm_company_address") +public class BmCompanyAddressController extends BaseController { + @Autowired + private IBmCompanyAddressService bmCompanyAddressService; + + /** + * 查询企业信息列表 + */ + @ApiOperation(value = "查询企业信息列表") + @RequiresPermissions("basic:address:list") + @GetMapping("/list") + public TableDataInfo list(BmCompanyAddress bmCompanyAddress) { + startPage(); + List list = bmCompanyAddressService.selectBmCompanyAddressList(bmCompanyAddress); + return getDataTable(list); + } + + /** + * 导出企业信息列表 + */ + @ApiOperation(value = "导出企业信息列表") + @PreventRepeatSubmit + @RequiresPermissions("basic:address:export") + @SysLog(title = "企业信息", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出企业信息") + @PostMapping("/export") + public void export(HttpServletResponse response, BmCompanyAddress bmCompanyAddress) { + List list = bmCompanyAddressService.selectBmCompanyAddressList(bmCompanyAddress); + ExcelUtil util = new ExcelUtil(BmCompanyAddress.class); + util.exportExcel(response, list, "企业信息数据"); + } + + /** + * 获取企业信息详细信息 + */ + @ApiOperation(value = "获取企业信息详细信息") + @RequiresPermissions("basic:address:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(bmCompanyAddressService.selectBmCompanyAddressById(id)); + } + + /** + * 新增企业信息 + */ + @ApiOperation(value = "新增企业信息") + @PreventRepeatSubmit + @RequiresPermissions("basic:address:add") + @SysLog(title = "企业信息", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增企业信息") + @PostMapping + public AjaxResult add(@RequestBody BmCompanyAddress bmCompanyAddress) { + try { + return toAjax(bmCompanyAddressService.insertBmCompanyAddress(bmCompanyAddress)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 修改企业信息 + */ + @ApiOperation(value = "修改企业信息") + @PreventRepeatSubmit + @RequiresPermissions("basic:address:edit") + @SysLog(title = "企业信息", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改企业信息") + @PostMapping("/edit") + public AjaxResult edit(@RequestBody BmCompanyAddress bmCompanyAddress) { + try { + return toAjax(bmCompanyAddressService.updateBmCompanyAddress(bmCompanyAddress)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 删除企业信息 + */ + @ApiOperation(value = "删除企业信息") + @PreventRepeatSubmit + @RequiresPermissions("basic:address:remove") + @SysLog(title = "企业信息", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除企业信息") + @PostMapping("/del/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(bmCompanyAddressService.deleteBmCompanyAddressByIds(ids)); + } +} diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/domain/BmCompanyAddress.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/domain/BmCompanyAddress.java new file mode 100644 index 0000000..85fe1a4 --- /dev/null +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/domain/BmCompanyAddress.java @@ -0,0 +1,51 @@ +package com.bonus.material.basic.domain; + +import com.bonus.common.core.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.ToString; +import com.bonus.common.core.web.domain.BaseEntity; + +/** + * 企业信息对象 bm_company_address + * + * @author xsheng + * @date 2024-12-16 + */ + + +@Data +@ToString +public class BmCompanyAddress extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** id主键 */ + private Long id; + + /** dept_id */ + @Excel(name = "dept_id") + @ApiModelProperty(value = "dept_id") + private Long companyId; + + /** 需求所在省code */ + @Excel(name = "需求所在省code") + @ApiModelProperty(value = "需求所在省code") + private Long provinceCode; + + /** 需求所在市code */ + @Excel(name = "需求所在市code") + @ApiModelProperty(value = "需求所在市code") + private Long cityCode; + + /** 需求所在区code */ + @Excel(name = "需求所在区code") + @ApiModelProperty(value = "需求所在区code") + private Long areaCode; + + /** 企业名称 */ + @Excel(name = "企业名称") + @ApiModelProperty(value = "企业名称") + private String address; + + +} diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/mapper/BmCompanyAddressMapper.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/mapper/BmCompanyAddressMapper.java new file mode 100644 index 0000000..d8fb448 --- /dev/null +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/mapper/BmCompanyAddressMapper.java @@ -0,0 +1,60 @@ +package com.bonus.material.basic.mapper; + +import java.util.List; +import com.bonus.material.basic.domain.BmCompanyAddress; + +/** + * 企业信息Mapper接口 + * + * @author xsheng + * @date 2024-12-16 + */ +public interface BmCompanyAddressMapper { + /** + * 查询企业信息 + * + * @param id 企业信息主键 + * @return 企业信息 + */ + public BmCompanyAddress selectBmCompanyAddressById(Long id); + + /** + * 查询企业信息列表 + * + * @param bmCompanyAddress 企业信息 + * @return 企业信息集合 + */ + public List selectBmCompanyAddressList(BmCompanyAddress bmCompanyAddress); + + /** + * 新增企业信息 + * + * @param bmCompanyAddress 企业信息 + * @return 结果 + */ + public int insertBmCompanyAddress(BmCompanyAddress bmCompanyAddress); + + /** + * 修改企业信息 + * + * @param bmCompanyAddress 企业信息 + * @return 结果 + */ + public int updateBmCompanyAddress(BmCompanyAddress bmCompanyAddress); + + /** + * 删除企业信息 + * + * @param id 企业信息主键 + * @return 结果 + */ + public int deleteBmCompanyAddressById(Long id); + + /** + * 批量删除企业信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBmCompanyAddressByIds(Long[] ids); +} diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/service/IBmCompanyAddressService.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/service/IBmCompanyAddressService.java new file mode 100644 index 0000000..0aaabd4 --- /dev/null +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/service/IBmCompanyAddressService.java @@ -0,0 +1,60 @@ +package com.bonus.material.basic.service; + +import java.util.List; +import com.bonus.material.basic.domain.BmCompanyAddress; + +/** + * 企业信息Service接口 + * + * @author xsheng + * @date 2024-12-16 + */ +public interface IBmCompanyAddressService { + /** + * 查询企业信息 + * + * @param id 企业信息主键 + * @return 企业信息 + */ + public BmCompanyAddress selectBmCompanyAddressById(Long id); + + /** + * 查询企业信息列表 + * + * @param bmCompanyAddress 企业信息 + * @return 企业信息集合 + */ + public List selectBmCompanyAddressList(BmCompanyAddress bmCompanyAddress); + + /** + * 新增企业信息 + * + * @param bmCompanyAddress 企业信息 + * @return 结果 + */ + public int insertBmCompanyAddress(BmCompanyAddress bmCompanyAddress); + + /** + * 修改企业信息 + * + * @param bmCompanyAddress 企业信息 + * @return 结果 + */ + public int updateBmCompanyAddress(BmCompanyAddress bmCompanyAddress); + + /** + * 批量删除企业信息 + * + * @param ids 需要删除的企业信息主键集合 + * @return 结果 + */ + public int deleteBmCompanyAddressByIds(Long[] ids); + + /** + * 删除企业信息信息 + * + * @param id 企业信息主键 + * @return 结果 + */ + public int deleteBmCompanyAddressById(Long id); +} diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/service/impl/BmCompanyAddressServiceImpl.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/service/impl/BmCompanyAddressServiceImpl.java new file mode 100644 index 0000000..f4d1ba1 --- /dev/null +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/service/impl/BmCompanyAddressServiceImpl.java @@ -0,0 +1,98 @@ +package com.bonus.material.basic.service.impl; + +import java.util.List; +import com.bonus.common.core.exception.ServiceException; +import com.bonus.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.bonus.material.basic.mapper.BmCompanyAddressMapper; +import com.bonus.material.basic.domain.BmCompanyAddress; +import com.bonus.material.basic.service.IBmCompanyAddressService; + +/** + * 企业信息Service业务层处理 + * + * @author xsheng + * @date 2024-12-16 + */ +@Service +public class BmCompanyAddressServiceImpl implements IBmCompanyAddressService { + @Autowired + private BmCompanyAddressMapper bmCompanyAddressMapper; + + /** + * 查询企业信息 + * + * @param id 企业信息主键 + * @return 企业信息 + */ + @Override + public BmCompanyAddress selectBmCompanyAddressById(Long id) { + return bmCompanyAddressMapper.selectBmCompanyAddressById(id); + } + + /** + * 查询企业信息列表 + * + * @param bmCompanyAddress 企业信息 + * @return 企业信息 + */ + @Override + public List selectBmCompanyAddressList(BmCompanyAddress bmCompanyAddress) { + return bmCompanyAddressMapper.selectBmCompanyAddressList(bmCompanyAddress); + } + + /** + * 新增企业信息 + * + * @param bmCompanyAddress 企业信息 + * @return 结果 + */ + @Override + public int insertBmCompanyAddress(BmCompanyAddress bmCompanyAddress) { + bmCompanyAddress.setCreateTime(DateUtils.getNowDate()); + try { + return bmCompanyAddressMapper.insertBmCompanyAddress(bmCompanyAddress); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + /** + * 修改企业信息 + * + * @param bmCompanyAddress 企业信息 + * @return 结果 + */ + @Override + public int updateBmCompanyAddress(BmCompanyAddress bmCompanyAddress) { + bmCompanyAddress.setUpdateTime(DateUtils.getNowDate()); + try { + return bmCompanyAddressMapper.updateBmCompanyAddress(bmCompanyAddress); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + /** + * 批量删除企业信息 + * + * @param ids 需要删除的企业信息主键 + * @return 结果 + */ + @Override + public int deleteBmCompanyAddressByIds(Long[] ids) { + return bmCompanyAddressMapper.deleteBmCompanyAddressByIds(ids); + } + + /** + * 删除企业信息信息 + * + * @param id 企业信息主键 + * @return 结果 + */ + @Override + public int deleteBmCompanyAddressById(Long id) { + return bmCompanyAddressMapper.deleteBmCompanyAddressById(id); + } +} diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/lease/domain/MaLeaseInfo.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/lease/domain/MaLeaseInfo.java index 492bcbe..3d07095 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/lease/domain/MaLeaseInfo.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/lease/domain/MaLeaseInfo.java @@ -51,11 +51,11 @@ public class MaLeaseInfo extends BaseEntity implements Serializable { private Integer leaseStatus; @ApiModelProperty(value = "租赁开始时间") - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date leaseStartTime; @ApiModelProperty(value = "租赁结束时间") - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date leaseEndTime; /** @@ -75,7 +75,7 @@ public class MaLeaseInfo extends BaseEntity implements Serializable { /** * 需求截止日期(年月日) */ - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date endTime; /** diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/basic/BmCompanyAddressMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/basic/BmCompanyAddressMapper.xml new file mode 100644 index 0000000..b74d6cf --- /dev/null +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/basic/BmCompanyAddressMapper.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + select id, company_id, province_code, city_code, area_code, address, create_time, update_time from bm_company_address + + + + + + + + insert into bm_company_address + + company_id, + province_code, + city_code, + area_code, + address, + create_time, + update_time, + + + #{companyId}, + #{provinceCode}, + #{cityCode}, + #{areaCode}, + #{address}, + #{createTime}, + #{updateTime}, + + + + + update bm_company_address + + company_id = #{companyId}, + province_code = #{provinceCode}, + city_code = #{cityCode}, + area_code = #{areaCode}, + address = #{address}, + create_time = #{createTime}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from bm_company_address where id = #{id} + + + + delete from bm_company_address where id in + + #{id} + + + \ No newline at end of file From 8c037dd262b9f30397dba96eb8899ad68af5ec56 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Mon, 16 Dec 2024 11:01:41 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E6=94=B6=E8=B4=A7=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/basic/controller/BmCompanyAddressController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/controller/BmCompanyAddressController.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/controller/BmCompanyAddressController.java index 14a3f41..d764c5a 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/controller/BmCompanyAddressController.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/controller/BmCompanyAddressController.java @@ -3,6 +3,7 @@ package com.bonus.material.basic.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; import com.bonus.common.log.enums.OperaType; +import com.bonus.common.security.utils.SecurityUtils; import com.bonus.material.common.annotation.PreventRepeatSubmit; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -45,6 +46,7 @@ public class BmCompanyAddressController extends BaseController { @GetMapping("/list") public TableDataInfo list(BmCompanyAddress bmCompanyAddress) { startPage(); + bmCompanyAddress.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId()); List list = bmCompanyAddressService.selectBmCompanyAddressList(bmCompanyAddress); return getDataTable(list); } @@ -83,6 +85,7 @@ public class BmCompanyAddressController extends BaseController { @PostMapping public AjaxResult add(@RequestBody BmCompanyAddress bmCompanyAddress) { try { + bmCompanyAddress.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId()); return toAjax(bmCompanyAddressService.insertBmCompanyAddress(bmCompanyAddress)); } catch (Exception e) { return error("系统错误, " + e.getMessage()); @@ -99,6 +102,7 @@ public class BmCompanyAddressController extends BaseController { @PostMapping("/edit") public AjaxResult edit(@RequestBody BmCompanyAddress bmCompanyAddress) { try { + bmCompanyAddress.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId()); return toAjax(bmCompanyAddressService.updateBmCompanyAddress(bmCompanyAddress)); } catch (Exception e) { return error("系统错误, " + e.getMessage()); From dbd97f958520e61c159a4c861a9bf6043546dc6c Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Mon, 16 Dec 2024 11:32:14 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E6=94=B6=E8=B4=A7=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/controller/BmCompanyAddressController.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/controller/BmCompanyAddressController.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/controller/BmCompanyAddressController.java index d764c5a..6a41596 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/controller/BmCompanyAddressController.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/controller/BmCompanyAddressController.java @@ -42,7 +42,7 @@ public class BmCompanyAddressController extends BaseController { * 查询企业信息列表 */ @ApiOperation(value = "查询企业信息列表") - @RequiresPermissions("basic:address:list") + //@RequiresPermissions("basic:address:list") @GetMapping("/list") public TableDataInfo list(BmCompanyAddress bmCompanyAddress) { startPage(); @@ -56,7 +56,7 @@ public class BmCompanyAddressController extends BaseController { */ @ApiOperation(value = "导出企业信息列表") @PreventRepeatSubmit - @RequiresPermissions("basic:address:export") + //@RequiresPermissions("basic:address:export") @SysLog(title = "企业信息", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出企业信息") @PostMapping("/export") public void export(HttpServletResponse response, BmCompanyAddress bmCompanyAddress) { @@ -69,7 +69,7 @@ public class BmCompanyAddressController extends BaseController { * 获取企业信息详细信息 */ @ApiOperation(value = "获取企业信息详细信息") - @RequiresPermissions("basic:address:query") + //@RequiresPermissions("basic:address:query") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(bmCompanyAddressService.selectBmCompanyAddressById(id)); @@ -80,7 +80,7 @@ public class BmCompanyAddressController extends BaseController { */ @ApiOperation(value = "新增企业信息") @PreventRepeatSubmit - @RequiresPermissions("basic:address:add") + //@RequiresPermissions("basic:address:add") @SysLog(title = "企业信息", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增企业信息") @PostMapping public AjaxResult add(@RequestBody BmCompanyAddress bmCompanyAddress) { @@ -97,7 +97,7 @@ public class BmCompanyAddressController extends BaseController { */ @ApiOperation(value = "修改企业信息") @PreventRepeatSubmit - @RequiresPermissions("basic:address:edit") + //@RequiresPermissions("basic:address:edit") @SysLog(title = "企业信息", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改企业信息") @PostMapping("/edit") public AjaxResult edit(@RequestBody BmCompanyAddress bmCompanyAddress) { @@ -114,7 +114,7 @@ public class BmCompanyAddressController extends BaseController { */ @ApiOperation(value = "删除企业信息") @PreventRepeatSubmit - @RequiresPermissions("basic:address:remove") + //@RequiresPermissions("basic:address:remove") @SysLog(title = "企业信息", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除企业信息") @PostMapping("/del/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { From 9da4995579a6a17983a82821d5f501dacf3b158f Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Mon, 16 Dec 2024 12:10:34 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E6=94=B6=E8=B4=A7=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BmCompanyAddressController.java | 2 +- .../basic/domain/BmCompanyAddress.java | 15 +++++++++++++++ .../material/basic/BmCompanyAddressMapper.xml | 19 ++++++++++++------- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/controller/BmCompanyAddressController.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/controller/BmCompanyAddressController.java index 6a41596..b5e02d4 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/controller/BmCompanyAddressController.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/controller/BmCompanyAddressController.java @@ -96,7 +96,7 @@ public class BmCompanyAddressController extends BaseController { * 修改企业信息 */ @ApiOperation(value = "修改企业信息") - @PreventRepeatSubmit + //@PreventRepeatSubmit //@RequiresPermissions("basic:address:edit") @SysLog(title = "企业信息", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改企业信息") @PostMapping("/edit") diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/domain/BmCompanyAddress.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/domain/BmCompanyAddress.java index 85fe1a4..bd87fb9 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/domain/BmCompanyAddress.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/domain/BmCompanyAddress.java @@ -32,16 +32,31 @@ public class BmCompanyAddress extends BaseEntity { @ApiModelProperty(value = "需求所在省code") private Long provinceCode; + /** 需求所在省名称 */ + @Excel(name = "需求所在省名称") + @ApiModelProperty(value = "需求所在省名称") + private Long provinceName; + /** 需求所在市code */ @Excel(name = "需求所在市code") @ApiModelProperty(value = "需求所在市code") private Long cityCode; + /** 需求所在市名称 */ + @Excel(name = "需求所在市名称") + @ApiModelProperty(value = "需求所在市名称") + private Long cityName; + /** 需求所在区code */ @Excel(name = "需求所在区code") @ApiModelProperty(value = "需求所在区code") private Long areaCode; + /** 需求所在区名称 */ + @Excel(name = "需求所在区名称") + @ApiModelProperty(value = "需求所在区名称") + private Long areaName; + /** 企业名称 */ @Excel(name = "企业名称") @ApiModelProperty(value = "企业名称") diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/basic/BmCompanyAddressMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/basic/BmCompanyAddressMapper.xml index b74d6cf..0817419 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/basic/BmCompanyAddressMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/basic/BmCompanyAddressMapper.xml @@ -15,23 +15,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, company_id, province_code, city_code, area_code, address, create_time, update_time from bm_company_address + select bca.id, bca.company_id, bca.province_code, bca.city_code, bca.area_code, bca.address, bca.create_time, bca.update_time, + b.name as area_name, b1.name as province_name, b2.name as city_name + from bm_company_address bca + LEFT JOIN base_address b ON b.code = bca.area_code + LEFT JOIN base_address b1 on bca.province_code = b1.code + LEFT JOIN base_address b2 on bca.city_code = b2.code From e604590cbdad65e8f8f1eb91a99edb729c0e615b Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Mon, 16 Dec 2024 12:16:11 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E6=94=B6=E8=B4=A7=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/material/basic/BmCompanyAddressMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/basic/BmCompanyAddressMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/basic/BmCompanyAddressMapper.xml index 0817419..4a7ac26 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/basic/BmCompanyAddressMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/basic/BmCompanyAddressMapper.xml @@ -16,7 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select bca.id, bca.company_id, bca.province_code, bca.city_code, bca.area_code, bca.address, bca.create_time, bca.update_time, - b.name as area_name, b1.name as province_name, b2.name as city_name + b.name as areaName, b1.name as provinceName, b2.name as cityName from bm_company_address bca LEFT JOIN base_address b ON b.code = bca.area_code LEFT JOIN base_address b1 on bca.province_code = b1.code From 7bdeb3953033912f20b4639d105b640269193782 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Mon, 16 Dec 2024 12:19:23 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E6=94=B6=E8=B4=A7=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bonus/material/basic/domain/BmCompanyAddress.java | 6 +++--- .../mapper/material/basic/BmCompanyAddressMapper.xml | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/domain/BmCompanyAddress.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/domain/BmCompanyAddress.java index bd87fb9..c50056c 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/domain/BmCompanyAddress.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/basic/domain/BmCompanyAddress.java @@ -35,7 +35,7 @@ public class BmCompanyAddress extends BaseEntity { /** 需求所在省名称 */ @Excel(name = "需求所在省名称") @ApiModelProperty(value = "需求所在省名称") - private Long provinceName; + private String provinceName; /** 需求所在市code */ @Excel(name = "需求所在市code") @@ -45,7 +45,7 @@ public class BmCompanyAddress extends BaseEntity { /** 需求所在市名称 */ @Excel(name = "需求所在市名称") @ApiModelProperty(value = "需求所在市名称") - private Long cityName; + private String cityName; /** 需求所在区code */ @Excel(name = "需求所在区code") @@ -55,7 +55,7 @@ public class BmCompanyAddress extends BaseEntity { /** 需求所在区名称 */ @Excel(name = "需求所在区名称") @ApiModelProperty(value = "需求所在区名称") - private Long areaName; + private String areaName; /** 企业名称 */ @Excel(name = "企业名称") diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/basic/BmCompanyAddressMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/basic/BmCompanyAddressMapper.xml index 4a7ac26..1f8e962 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/basic/BmCompanyAddressMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/basic/BmCompanyAddressMapper.xml @@ -7,8 +7,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + @@ -16,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select bca.id, bca.company_id, bca.province_code, bca.city_code, bca.area_code, bca.address, bca.create_time, bca.update_time, - b.name as areaName, b1.name as provinceName, b2.name as cityName + b.name as area_name, b1.name as province_name, b2.name as city_name from bm_company_address bca LEFT JOIN base_address b ON b.code = bca.area_code LEFT JOIN base_address b1 on bca.province_code = b1.code From d574a6b142ddc4682dd788a694697ba554fb77bb Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Mon, 16 Dec 2024 12:44:27 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=94=AF=E4=B8=80?= =?UTF-8?q?=E6=A0=87=E8=AF=86=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/bonus/material/device/domain/DevInfo.java | 5 +++++ .../resources/mapper/material/device/DevInfoMapper.xml | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/DevInfo.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/DevInfo.java index 2cee947..31fbc28 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/DevInfo.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/DevInfo.java @@ -47,6 +47,11 @@ public class DevInfo extends BaseEntity { @ApiModelProperty(value = "设备编码") private String code; + /** 设备唯一标识符,用户输入,比如车架号 */ + @Excel(name = "设备唯一标识符") + @ApiModelProperty(value = "设备唯一标识符") + private String identifyCode; + @ApiModelProperty(value = "装备名称") @NotBlank private String deviceName; diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml index 945eff8..95582e3 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml @@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -43,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select ma_id, device_name, device_weight, device_count, code, type_id, ma_status, lease_scope, location, province_id, city_id, area_id, brand, model_name, production_date, working_hours, serial_number, + select ma_id, device_name, device_weight, device_count, code, identify_code, type_id, ma_status, lease_scope, location, province_id, city_id, area_id, brand, model_name, production_date, working_hours, serial_number, pic_url, js_month_price, js_day_price, description, gps_code, own_co, create_time, creator, update_time, person, person_phone, update_by, specification, deposit, is_operator, is_active, update_time, update_by from ma_dev_info @@ -53,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT d.ma_id as maId, d.code as code, + d.identify_code as identifyCode, d.device_name as deviceName, d.device_weight as deviceWeight, d.device_count as deviceCount, @@ -170,6 +172,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT d.ma_id as maId, d.code as code, + d.identify_code as identifyCode, d.device_name as deviceName, d.device_count as deviceCount, d.device_weight as deviceWeight, @@ -215,6 +218,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT d.ma_id as maId, d.code as code, + identify_code as identifyCode, d.device_name as deviceName, d.device_weight as deviceWeight, d.device_count as deviceCount, @@ -273,6 +277,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" device_weight, device_count, code, + identify_code, type_id, ma_status, lease_scope, @@ -600,6 +605,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" device_weight, device_count, code, + identify_code, type_id, ma_status, lease_scope, From b64f24c2f24cde7aac5e5fc1f6253aeceda818ce Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Mon, 16 Dec 2024 13:08:52 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E5=85=AC=E5=8F=B8=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E4=B8=8A=E6=9E=B6=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bonus/common/biz/domain/BmCompanyInfo.java | 2 ++ .../bonus/material/device/mapper/DevInfoMapper.java | 2 ++ .../device/service/impl/DevInfoServiceImpl.java | 13 ++++++++++++- .../mapper/material/device/DevInfoMapper.xml | 6 ++++++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/BmCompanyInfo.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/BmCompanyInfo.java index e3ca8bd..ed246ec 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/BmCompanyInfo.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/BmCompanyInfo.java @@ -239,5 +239,7 @@ public class BmCompanyInfo implements Serializable { //用户名 private String userName; + //上架数 + private Integer maCount; } \ No newline at end of file diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/mapper/DevInfoMapper.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/mapper/DevInfoMapper.java index 28b7b51..693d8f6 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/mapper/DevInfoMapper.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/mapper/DevInfoMapper.java @@ -142,6 +142,8 @@ public interface DevInfoMapper { */ List selectCompanyList(BmCompanyInfo obj); + List getMaCountByCompany(BmCompanyInfo obj); + int updateUpDown(@Param("maIds") List maIds, @Param("maStatus") Object maStatus); /** diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/DevInfoServiceImpl.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/DevInfoServiceImpl.java index 63a193e..73ee4b9 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/DevInfoServiceImpl.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/DevInfoServiceImpl.java @@ -625,7 +625,18 @@ public class DevInfoServiceImpl implements DevInfoService { */ @Override public List selectCompanyList(BmCompanyInfo obj) { - return devInfoMapper.selectCompanyList(obj); + List companyInfos = devInfoMapper.selectCompanyList(obj); + List companyMaCountList = devInfoMapper.getMaCountByCompany(obj); + if (!CollectionUtils.isEmpty(companyInfos) && !CollectionUtils.isEmpty(companyMaCountList)) { + for (BmCompanyInfo bmInfo : companyInfos) { + for (BmCompanyInfo maCountList : companyMaCountList) { + if (bmInfo.getCompanyId().equals(maCountList.getCompanyId())) { + bmInfo.setMaCount(maCountList.getMaCount()); + } + } + } + } + return companyInfos; } /** diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml index 95582e3..0a4bf94 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml @@ -585,6 +585,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + +