diff --git a/src/main/java/com/zhgd/xmgl/enums/ParamEnum.java b/src/main/java/com/zhgd/xmgl/enums/ParamEnum.java index 7a695e702..48af31e3b 100644 --- a/src/main/java/com/zhgd/xmgl/enums/ParamEnum.java +++ b/src/main/java/com/zhgd/xmgl/enums/ParamEnum.java @@ -354,4 +354,38 @@ public class ParamEnum { this.desc = desc; } } + + /** + * 台座类型名称(1绑扎台座,2制梁台座) + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SmartBeamFieldMakeBeamPedestalPedestalTypeEnum implements BaseEnum { + LASHING_PEDESTAL(1, "绑扎台座"), + BEAM_MAKING_PEDESTAL(2, "制梁台座"), + ; + + SmartBeamFieldMakeBeamPedestalPedestalTypeEnum(Integer value, String desc) { + this.value = value; + this.desc = desc; + } + + private Integer value; + private String desc; + + public Integer getValue() { + return value; + } + + public void setValue(Integer value) { + this.value = value; + } + + public String getDesc() { + return desc; + } + + public void setDesc(String desc) { + this.desc = desc; + } + } } diff --git a/src/main/java/com/zhgd/xmgl/modules/project/controller/ProjectController.java b/src/main/java/com/zhgd/xmgl/modules/project/controller/ProjectController.java index ce7c56963..f63a612a2 100644 --- a/src/main/java/com/zhgd/xmgl/modules/project/controller/ProjectController.java +++ b/src/main/java/com/zhgd/xmgl/modules/project/controller/ProjectController.java @@ -449,7 +449,7 @@ public class ProjectController { @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String") }) @GetMapping("/getProjectExtendInfo") - public Result getProjectExtendInfo(@ApiIgnore @RequestBody Map map) { + public Result getProjectExtendInfo(@ApiIgnore @RequestParam Map map) { return Result.success(projectService.getProjectExtendInfo(map)); } diff --git a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/controller/SmartBeamFieldMakeBeamPedestalController.java b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/controller/SmartBeamFieldMakeBeamPedestalController.java index 82c3d552b..959841235 100644 --- a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/controller/SmartBeamFieldMakeBeamPedestalController.java +++ b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/controller/SmartBeamFieldMakeBeamPedestalController.java @@ -1,44 +1,31 @@ package com.zhgd.xmgl.modules.smartbeamfield.controller; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldMakeBeamPedestal; import com.zhgd.xmgl.modules.smartbeamfield.entity.vo.MakeBeamRecordVo; +import com.zhgd.xmgl.modules.smartbeamfield.service.ISmartBeamFieldMakeBeamPedestalService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiImplicitParams; -import java.util.HashMap; -import springfox.documentation.annotations.ApiIgnore; - -import java.util.List; -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import com.zhgd.jeecg.common.api.vo.Result; -import com.zhgd.jeecg.common.system.query.QueryGenerator; -import com.zhgd.jeecg.common.util.oConvertUtils; -import org.apache.commons.collections.MapUtils; -import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldMakeBeamPedestal; -import com.zhgd.xmgl.modules.smartbeamfield.service.ISmartBeamFieldMakeBeamPedestalService; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; +import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; - -import org.jeecgframework.poi.excel.def.NormalExcelConstants; -import org.jeecgframework.poi.excel.entity.ExportParams; -import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; - +import org.apache.commons.collections.MapUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.ModelAndView; -import com.alibaba.fastjson.JSON; +import springfox.documentation.annotations.ApiIgnore; + +import javax.swing.text.html.Option; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; - /** +/** * @Title: Controller * @Description: 智慧梁场-制梁台座 * @author: pds - * @date: 2023-12-05 + * @date: 2023-12-05 * @version: V1.0 */ @RestController @@ -46,29 +33,31 @@ import com.alibaba.fastjson.JSON; @Slf4j @Api(tags = "智慧梁场-制梁台座相关Api") public class SmartBeamFieldMakeBeamPedestalController { - @Autowired - private ISmartBeamFieldMakeBeamPedestalService smartBeamFieldMakeBeamPedestalService; + @Autowired + private ISmartBeamFieldMakeBeamPedestalService smartBeamFieldMakeBeamPedestalService; - /** - * 分页列表查询 - * @return - */ - @ApiOperation(value = "分页列表查询智慧梁场-制梁台座信息", notes = "分页列表查询智慧梁场-制梁台座信息", httpMethod="GET") - @ApiImplicitParams({ + /** + * 分页列表查询 + * + * @return + */ + @ApiOperation(value = "分页列表查询智慧梁场-制梁台座信息", notes = "分页列表查询智慧梁场-制梁台座信息", httpMethod = "GET") + @ApiImplicitParams({ @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), @ApiImplicitParam(name = "createDate_begin", value = "创建时间开始", paramType = "query", required = false, dataType = "String"), @ApiImplicitParam(name = "createDate_end", value = "创建时间结束", paramType = "query", required = false, dataType = "String"), }) - @GetMapping(value = "/page") - public Result> queryPageList(@ApiIgnore @RequestParam HashMap paramMap) { - return Result.success(smartBeamFieldMakeBeamPedestalService.queryPageList(paramMap)); - } + @GetMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestParam HashMap paramMap) { + return Result.success(smartBeamFieldMakeBeamPedestalService.queryPageList(paramMap)); + } - /** - * 列表查询 - * @return - */ + /** + * 列表查询 + * + * @return + */ @ApiOperation(value = "列表查询智慧梁场-制梁台座信息", notes = "列表查询智慧梁场-制梁台座信息", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "createDate_begin", value = "创建时间开始", paramType = "query", required = false, dataType = "String"), @@ -76,81 +65,86 @@ public class SmartBeamFieldMakeBeamPedestalController { }) @GetMapping(value = "/list") public Result> queryList(@ApiIgnore @RequestParam HashMap paramMap) { - return Result.success(smartBeamFieldMakeBeamPedestalService.queryList(paramMap)); - } + return Result.success(smartBeamFieldMakeBeamPedestalService.queryList(paramMap)); + } - /** - * 添加 - * @param smartBeamFieldMakeBeamPedestal - * @return - */ - @ApiOperation(value = "添加智慧梁场-制梁台座信息", notes = "添加智慧梁场-制梁台座信息" , httpMethod="POST") - @PostMapping(value = "/add") - public Result add(@RequestBody SmartBeamFieldMakeBeamPedestal smartBeamFieldMakeBeamPedestal) { - smartBeamFieldMakeBeamPedestalService.add(smartBeamFieldMakeBeamPedestal); - return Result.ok(); - } + /** + * 添加 + * + * @param smartBeamFieldMakeBeamPedestal + * @return + */ + @ApiOperation(value = "添加智慧梁场-制梁台座信息", notes = "添加智慧梁场-制梁台座信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody SmartBeamFieldMakeBeamPedestal smartBeamFieldMakeBeamPedestal) { + smartBeamFieldMakeBeamPedestalService.add(smartBeamFieldMakeBeamPedestal); + return Result.ok(); + } - /** - * 编辑 - * @param smartBeamFieldMakeBeamPedestal - * @return - */ - @ApiOperation(value = "编辑智慧梁场-制梁台座信息", notes = "编辑智慧梁场-制梁台座信息" , httpMethod="POST") - @PostMapping(value = "/edit") - public Result edit(@RequestBody SmartBeamFieldMakeBeamPedestal smartBeamFieldMakeBeamPedestal) { - smartBeamFieldMakeBeamPedestalService.edit(smartBeamFieldMakeBeamPedestal); - return Result.ok(); - } + /** + * 编辑 + * + * @param smartBeamFieldMakeBeamPedestal + * @return + */ + @ApiOperation(value = "编辑智慧梁场-制梁台座信息", notes = "编辑智慧梁场-制梁台座信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody SmartBeamFieldMakeBeamPedestal smartBeamFieldMakeBeamPedestal) { + smartBeamFieldMakeBeamPedestalService.edit(smartBeamFieldMakeBeamPedestal); + return Result.ok(); + } - /** - * 通过id删除 - * @return - */ - @ApiOperation(value = "删除智慧梁场-制梁台座信息", notes = "删除智慧梁场-制梁台座信息" , httpMethod="POST") - @ApiImplicitParam(name = "id", value = "智慧梁场-制梁台座ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}") - @PostMapping(value = "/delete") - public Result delete(@ApiIgnore @RequestBody HashMap map) { - String id = MapUtils.getString(map, "id"); - Result result = new Result(); - SmartBeamFieldMakeBeamPedestal smartBeamFieldMakeBeamPedestal = smartBeamFieldMakeBeamPedestalService.getById(id); - if(smartBeamFieldMakeBeamPedestal==null) { - result.error500("未找到对应实体"); - }else { + /** + * 通过id删除 + * + * @return + */ + @ApiOperation(value = "删除智慧梁场-制梁台座信息", notes = "删除智慧梁场-制梁台座信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "智慧梁场-制梁台座ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}") + @PostMapping(value = "/delete") + public Result delete(@ApiIgnore @RequestBody HashMap map) { + String id = MapUtils.getString(map, "id"); + Result result = new Result(); + SmartBeamFieldMakeBeamPedestal smartBeamFieldMakeBeamPedestal = smartBeamFieldMakeBeamPedestalService.getById(id); + if (smartBeamFieldMakeBeamPedestal == null) { + result.error500("未找到对应实体"); + } else { boolean ok = smartBeamFieldMakeBeamPedestalService.delete(id); - if(ok) { - result.success("删除成功!"); - } - } + if (ok) { + result.success("删除成功!"); + } + } - return result; - } + return result; + } - /** - * 通过id查询 - * @param id - * @return - */ - @ApiOperation(value = "通过id查询智慧梁场-制梁台座信息", notes = "通过id查询智慧梁场-制梁台座信息" , httpMethod="GET") - @ApiImplicitParam(name = "id", value = "智慧梁场-制梁台座ID", paramType = "query", required = true, dataType = "Integer") - @GetMapping(value = "/queryById") - public Result queryById(@RequestParam(name="id",required=true) String id) { - Result result = new Result(); - SmartBeamFieldMakeBeamPedestal smartBeamFieldMakeBeamPedestal = smartBeamFieldMakeBeamPedestalService.getById(id); - if (smartBeamFieldMakeBeamPedestal == null) { - result.error500("未找到对应实体"); - } else { - result.setResult(smartBeamFieldMakeBeamPedestal); - result.setSuccess(true); - } - return result; - } + /** + * 通过id查询 + * + * @param id + * @return + */ + @ApiOperation(value = "通过id查询智慧梁场-制梁台座信息", notes = "通过id查询智慧梁场-制梁台座信息", httpMethod = "GET") + @ApiImplicitParam(name = "id", value = "智慧梁场-制梁台座ID", paramType = "query", required = true, dataType = "Integer") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name = "id", required = true) String id) { + Result result = new Result(); + SmartBeamFieldMakeBeamPedestal smartBeamFieldMakeBeamPedestal = smartBeamFieldMakeBeamPedestalService.queryById(id); + if (smartBeamFieldMakeBeamPedestal == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(smartBeamFieldMakeBeamPedestal); + result.setSuccess(true); + } + return result; + } - @ApiOperation(value = "查询正在和历史梁生产记录", notes = "查询正在和历史梁生产记录", httpMethod = "GET") - @ApiImplicitParam(name = "smartBeamFieldMakeBeamPedestalId", value = "智慧梁场-制梁台座ID", paramType = "query", required = true, dataType = "Integer") - @GetMapping(value = "/getMakeBeamRecordList") - public Result getMakeBeamRecordList(@ApiIgnore @RequestParam HashMap paramMap) { - return Result.success(smartBeamFieldMakeBeamPedestalService.getMakeBeamRecordList(paramMap)); - } + @ApiOperation(value = "查询正在和历史梁生产记录", notes = "查询正在和历史梁生产记录", httpMethod = "GET") + @ApiImplicitParam(name = "smartBeamFieldMakeBeamPedestalId", value = "智慧梁场-制梁台座ID", paramType = "query", required = true, dataType = "Integer") + @GetMapping(value = "/getMakeBeamRecordList") + public Result getMakeBeamRecordList(@ApiIgnore @RequestParam HashMap paramMap) { + return Result.success(smartBeamFieldMakeBeamPedestalService.getMakeBeamRecordList(paramMap)); + } - } + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/entity/SmartBeamFieldMakeBeamPedestal.java b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/entity/SmartBeamFieldMakeBeamPedestal.java index d62fcd2b0..06baa579c 100644 --- a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/entity/SmartBeamFieldMakeBeamPedestal.java +++ b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/entity/SmartBeamFieldMakeBeamPedestal.java @@ -74,6 +74,9 @@ public class SmartBeamFieldMakeBeamPedestal implements Serializable { @ApiModelProperty(value = "更新时间 yyyy-MM-dd HH:mm:ss") private java.util.Date updateDate; @TableField(exist = false) + @ApiModelProperty(value = "台座类型名称(绑扎台座,制梁台座)") + private java.lang.String pedestalTypeName; + @TableField(exist = false) @ApiModelProperty(value = "台座工序(多个)名称") private String pedestalProcess; @TableField(exist = false) diff --git a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/entity/SmartBeamFieldSaveBeamPedestal.java b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/entity/SmartBeamFieldSaveBeamPedestal.java index 143d2cafc..fb32851b5 100644 --- a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/entity/SmartBeamFieldSaveBeamPedestal.java +++ b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/entity/SmartBeamFieldSaveBeamPedestal.java @@ -67,4 +67,7 @@ public class SmartBeamFieldSaveBeamPedestal implements Serializable { @TableField(exist = false) @ApiModelProperty(value = "二维码页面的url") private java.lang.String qrCodeUrl; + @TableField(exist = false) + @ApiModelProperty(value = "是否梁绑定两次") + private java.lang.Boolean bindByBeamTwice; } diff --git a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/mapper/SmartBeamFieldSaveBeamPedestalMapper.java b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/mapper/SmartBeamFieldSaveBeamPedestalMapper.java index d8d3c977e..4ad71fec5 100644 --- a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/mapper/SmartBeamFieldSaveBeamPedestalMapper.java +++ b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/mapper/SmartBeamFieldSaveBeamPedestalMapper.java @@ -1,9 +1,14 @@ package com.zhgd.xmgl.modules.smartbeamfield.mapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldBeam; import org.apache.ibatis.annotations.Mapper; import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldSaveBeamPedestal; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; import java.util.HashMap; import java.util.List; @@ -18,4 +23,8 @@ import java.util.List; public interface SmartBeamFieldSaveBeamPedestalMapper extends BaseMapper { List getSaveBeamRecordList(HashMap paramMap); + + IPage queryList(Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); + + List queryList(@Param(Constants.WRAPPER) QueryWrapper queryWrapper); } diff --git a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/mapper/xml/SmartBeamFieldSaveBeamPedestalMapper.xml b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/mapper/xml/SmartBeamFieldSaveBeamPedestalMapper.xml index 294de3ce5..1fa4aad8c 100644 --- a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/mapper/xml/SmartBeamFieldSaveBeamPedestalMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/mapper/xml/SmartBeamFieldSaveBeamPedestalMapper.xml @@ -10,4 +10,14 @@ join smart_beam_field_bridge_section sbfbs on sbfbtsbp.smart_beam_field_beam_id = sbfbs.id where sbfsbp.id = #{smartBeamFieldSaveBeamPedestalId} + + diff --git a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/service/ISmartBeamFieldMakeBeamPedestalService.java b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/service/ISmartBeamFieldMakeBeamPedestalService.java index ec4ce8256..cba65551f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/service/ISmartBeamFieldMakeBeamPedestalService.java +++ b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/service/ISmartBeamFieldMakeBeamPedestalService.java @@ -27,4 +27,6 @@ public interface ISmartBeamFieldMakeBeamPedestalService extends IService paramMap); boolean delete(String id); + + SmartBeamFieldMakeBeamPedestal queryById(String id); } diff --git a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/service/impl/SmartBeamFieldMakeBeamPedestalServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/service/impl/SmartBeamFieldMakeBeamPedestalServiceImpl.java index a636cf997..0af09d492 100644 --- a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/service/impl/SmartBeamFieldMakeBeamPedestalServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/service/impl/SmartBeamFieldMakeBeamPedestalServiceImpl.java @@ -13,6 +13,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zhgd.jeecg.common.execption.OpenAlertException; import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.xmgl.enums.ParamEnum; import com.zhgd.xmgl.modules.smartbeamfield.entity.*; import com.zhgd.xmgl.modules.smartbeamfield.entity.vo.MakeBeamRecordVo; import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldBeamToProcessMapper; @@ -21,7 +22,6 @@ import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldMakeBeamPedesta import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldProductionLineToMakeBeamPedestalMapper; import com.zhgd.xmgl.modules.smartbeamfield.service.ISmartBeamFieldMakeBeamPedestalService; import com.zhgd.xmgl.util.PageUtil; -import com.zhgd.xmgl.util.RefUtil; import org.apache.commons.collections.MapUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -74,6 +74,10 @@ public class SmartBeamFieldMakeBeamPedestalServiceImpl extends ServiceImpl dealList(List list) { + for (SmartBeamFieldMakeBeamPedestal pedestal : list) { + pedestal.setPedestalTypeName(ParamEnum.getStr(ParamEnum.SmartBeamFieldMakeBeamPedestalPedestalTypeEnum.values(), pedestal.getPedestalType())); + + } return list; } @@ -215,4 +219,11 @@ public class SmartBeamFieldMakeBeamPedestalServiceImpl extends ServiceImpl productionLineMakeBeamPedestalList = smartBeamFieldProduZctionLine.getProductionLineMakeBeamPedestalList(); + public void add(SmartBeamFieldProductionLine smartBeamFieldProductionLine) { + smartBeamFieldProductionLine.setId(null); + baseMapper.insert(smartBeamFieldProductionLine); + List productionLineMakeBeamPedestalList = smartBeamFieldProductionLine.getProductionLineMakeBeamPedestalList(); if (CollUtil.isNotEmpty(productionLineMakeBeamPedestalList)) { - for (SmartBeamFieldProductionLineToMakeBeamPedestal smartBeamFieldProductionLineToMakeBeamPedestal : productionLineMakeBeamPedestalList) { - smartBeamFieldProductionLineToMakeBeamPedestal.setId(null); - smartBeamFieldProductionLineToMakeBeamPedestal.setSmartBeamFieldProductionLineId(smartBeamFieldProduZctionLine.getId()); - if (smartBeamFieldProductionLineToMakeBeamPedestal.getSmartBeamFieldMakeBeamPedestalId() == null) { + for (SmartBeamFieldProductionLineToMakeBeamPedestal pedestal : productionLineMakeBeamPedestalList) { + pedestal.setId(null); + pedestal.setSmartBeamFieldProductionLineId(smartBeamFieldProductionLine.getId()); + if (pedestal.getSmartBeamFieldMakeBeamPedestalId() == null) { throw new OpenAlertException("productionLineMakeBeamPedestalList[i].smartBeamFieldMakeBeamPedestalId(智慧梁场-制梁台座id)不能为空"); } - smartBeamFieldProductionLineToMakeBeamPedestal.setProjectSn(smartBeamFieldProduZctionLine.getProjectSn()); - smartBeamFieldProductionLineToMakeBeamPedestalMapper.insert(smartBeamFieldProductionLineToMakeBeamPedestal); + pedestal.setProjectSn(smartBeamFieldProductionLine.getProjectSn()); + smartBeamFieldProductionLineToMakeBeamPedestalMapper.insert(pedestal); } } } @@ -87,6 +87,23 @@ public class SmartBeamFieldProductionLineServiceImpl extends ServiceImpl productionLineMakeBeamPedestalList = smartBeamFieldProductionLine.getProductionLineMakeBeamPedestalList(); + if (CollUtil.isNotEmpty(productionLineMakeBeamPedestalList)) { + for (SmartBeamFieldProductionLineToMakeBeamPedestal pedestal : productionLineMakeBeamPedestalList) { + pedestal.setId(null); + pedestal.setSmartBeamFieldProductionLineId(smartBeamFieldProductionLine.getId()); + if (pedestal.getSmartBeamFieldMakeBeamPedestalId() == null) { + throw new OpenAlertException("productionLineMakeBeamPedestalList[i].smartBeamFieldMakeBeamPedestalId(智慧梁场-制梁台座id)不能为空"); + } + pedestal.setProjectSn(smartBeamFieldProductionLine.getProjectSn()); + smartBeamFieldProductionLineToMakeBeamPedestalMapper.update(pedestal, new LambdaQueryWrapper() + .eq(SmartBeamFieldProductionLineToMakeBeamPedestal::getSmartBeamFieldProductionLineId, smartBeamFieldProductionLine.getId()) + .eq(SmartBeamFieldProductionLineToMakeBeamPedestal::getSmartBeamFieldMakeBeamPedestalId, pedestal.getSmartBeamFieldMakeBeamPedestalId()) + ); + } + } } @Override diff --git a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/service/impl/SmartBeamFieldSaveBeamPedestalServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/service/impl/SmartBeamFieldSaveBeamPedestalServiceImpl.java index 0381d3d7e..b0da384e3 100644 --- a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/service/impl/SmartBeamFieldSaveBeamPedestalServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/service/impl/SmartBeamFieldSaveBeamPedestalServiceImpl.java @@ -55,7 +55,7 @@ public class SmartBeamFieldSaveBeamPedestalServiceImpl extends ServiceImpl queryPageList(HashMap paramMap) { QueryWrapper queryWrapper = getQueryWrapper(paramMap); Page page = PageUtil.getPage(paramMap); - IPage pageList = this.page(page, queryWrapper); + IPage pageList = baseMapper.queryList(page, queryWrapper); pageList.setRecords(dealList(pageList.getRecords())); return pageList; } @@ -63,13 +63,12 @@ public class SmartBeamFieldSaveBeamPedestalServiceImpl extends ServiceImpl queryList(HashMap paramMap) { QueryWrapper queryWrapper = getQueryWrapper(paramMap); - return dealList(this.list(queryWrapper)); + return dealList(baseMapper.queryList(queryWrapper)); } private QueryWrapper getQueryWrapper(HashMap paramMap) { - String alias = ""; + String alias = "sbfsbp."; QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(SmartBeamFieldSaveBeamPedestal.class, paramMap, alias); - queryWrapper.orderByDesc(alias + RefUtil.fieldNameUlc(SmartBeamFieldSaveBeamPedestal::getId)); return queryWrapper; }