智慧梁场修改

This commit is contained in:
guo 2023-12-07 14:18:14 +08:00
parent b1e911bff3
commit 63c1a71a9f
11 changed files with 211 additions and 129 deletions

View File

@ -354,4 +354,38 @@ public class ParamEnum {
this.desc = desc; 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;
}
}
} }

View File

@ -449,7 +449,7 @@ public class ProjectController {
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String") @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String")
}) })
@GetMapping("/getProjectExtendInfo") @GetMapping("/getProjectExtendInfo")
public Result<Project> getProjectExtendInfo(@ApiIgnore @RequestBody Map<String, Object> map) { public Result<Project> getProjectExtendInfo(@ApiIgnore @RequestParam Map<String, Object> map) {
return Result.success(projectService.getProjectExtendInfo(map)); return Result.success(projectService.getProjectExtendInfo(map));
} }

View File

@ -1,44 +1,31 @@
package com.zhgd.xmgl.modules.smartbeamfield.controller; 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.entity.vo.MakeBeamRecordVo;
import com.zhgd.xmgl.modules.smartbeamfield.service.ISmartBeamFieldMakeBeamPedestalService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import java.util.HashMap; import io.swagger.annotations.ApiOperation;
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 lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.MapUtils;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView; import springfox.documentation.annotations.ApiIgnore;
import com.alibaba.fastjson.JSON;
import javax.swing.text.html.Option;
import java.util.HashMap;
import java.util.List;
import java.util.Optional;
/** /**
* @Title: Controller * @Title: Controller
* @Description: 智慧梁场-制梁台座 * @Description: 智慧梁场-制梁台座
* @author pds * @author pds
* @date 2023-12-05 * @date 2023-12-05
* @version V1.0 * @version V1.0
*/ */
@RestController @RestController
@ -46,29 +33,31 @@ import com.alibaba.fastjson.JSON;
@Slf4j @Slf4j
@Api(tags = "智慧梁场-制梁台座相关Api") @Api(tags = "智慧梁场-制梁台座相关Api")
public class SmartBeamFieldMakeBeamPedestalController { public class SmartBeamFieldMakeBeamPedestalController {
@Autowired @Autowired
private ISmartBeamFieldMakeBeamPedestalService smartBeamFieldMakeBeamPedestalService; private ISmartBeamFieldMakeBeamPedestalService smartBeamFieldMakeBeamPedestalService;
/** /**
* 分页列表查询 * 分页列表查询
* @return *
*/ * @return
@ApiOperation(value = "分页列表查询智慧梁场-制梁台座信息", notes = "分页列表查询智慧梁场-制梁台座信息", httpMethod="GET") */
@ApiImplicitParams({ @ApiOperation(value = "分页列表查询智慧梁场-制梁台座信息", notes = "分页列表查询智慧梁场-制梁台座信息", httpMethod = "GET")
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", 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_begin", value = "创建时间开始", paramType = "query", required = false, dataType = "String"),
@ApiImplicitParam(name = "createDate_end", value = "创建时间结束", paramType = "query", required = false, dataType = "String"), @ApiImplicitParam(name = "createDate_end", value = "创建时间结束", paramType = "query", required = false, dataType = "String"),
}) })
@GetMapping(value = "/page") @GetMapping(value = "/page")
public Result<IPage<SmartBeamFieldMakeBeamPedestal>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) { public Result<IPage<SmartBeamFieldMakeBeamPedestal>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(smartBeamFieldMakeBeamPedestalService.queryPageList(paramMap)); return Result.success(smartBeamFieldMakeBeamPedestalService.queryPageList(paramMap));
} }
/** /**
* 列表查询 * 列表查询
* @return *
*/ * @return
*/
@ApiOperation(value = "列表查询智慧梁场-制梁台座信息", notes = "列表查询智慧梁场-制梁台座信息", httpMethod = "GET") @ApiOperation(value = "列表查询智慧梁场-制梁台座信息", notes = "列表查询智慧梁场-制梁台座信息", httpMethod = "GET")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "createDate_begin", value = "创建时间开始", paramType = "query", required = false, dataType = "String"), @ApiImplicitParam(name = "createDate_begin", value = "创建时间开始", paramType = "query", required = false, dataType = "String"),
@ -76,81 +65,86 @@ public class SmartBeamFieldMakeBeamPedestalController {
}) })
@GetMapping(value = "/list") @GetMapping(value = "/list")
public Result<List<SmartBeamFieldMakeBeamPedestal>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) { public Result<List<SmartBeamFieldMakeBeamPedestal>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(smartBeamFieldMakeBeamPedestalService.queryList(paramMap)); return Result.success(smartBeamFieldMakeBeamPedestalService.queryList(paramMap));
} }
/** /**
* 添加 * 添加
* @param smartBeamFieldMakeBeamPedestal *
* @return * @param smartBeamFieldMakeBeamPedestal
*/ * @return
@ApiOperation(value = "添加智慧梁场-制梁台座信息", notes = "添加智慧梁场-制梁台座信息" , httpMethod="POST") */
@PostMapping(value = "/add") @ApiOperation(value = "添加智慧梁场-制梁台座信息", notes = "添加智慧梁场-制梁台座信息", httpMethod = "POST")
public Result<SmartBeamFieldMakeBeamPedestal> add(@RequestBody SmartBeamFieldMakeBeamPedestal smartBeamFieldMakeBeamPedestal) { @PostMapping(value = "/add")
smartBeamFieldMakeBeamPedestalService.add(smartBeamFieldMakeBeamPedestal); public Result<SmartBeamFieldMakeBeamPedestal> add(@RequestBody SmartBeamFieldMakeBeamPedestal smartBeamFieldMakeBeamPedestal) {
return Result.ok(); smartBeamFieldMakeBeamPedestalService.add(smartBeamFieldMakeBeamPedestal);
} return Result.ok();
}
/** /**
* 编辑 * 编辑
* @param smartBeamFieldMakeBeamPedestal *
* @return * @param smartBeamFieldMakeBeamPedestal
*/ * @return
@ApiOperation(value = "编辑智慧梁场-制梁台座信息", notes = "编辑智慧梁场-制梁台座信息" , httpMethod="POST") */
@PostMapping(value = "/edit") @ApiOperation(value = "编辑智慧梁场-制梁台座信息", notes = "编辑智慧梁场-制梁台座信息", httpMethod = "POST")
public Result<SmartBeamFieldMakeBeamPedestal> edit(@RequestBody SmartBeamFieldMakeBeamPedestal smartBeamFieldMakeBeamPedestal) { @PostMapping(value = "/edit")
smartBeamFieldMakeBeamPedestalService.edit(smartBeamFieldMakeBeamPedestal); public Result<SmartBeamFieldMakeBeamPedestal> edit(@RequestBody SmartBeamFieldMakeBeamPedestal smartBeamFieldMakeBeamPedestal) {
return Result.ok(); smartBeamFieldMakeBeamPedestalService.edit(smartBeamFieldMakeBeamPedestal);
} return Result.ok();
}
/** /**
* 通过id删除 * 通过id删除
* @return *
*/ * @return
@ApiOperation(value = "删除智慧梁场-制梁台座信息", notes = "删除智慧梁场-制梁台座信息" , httpMethod="POST") */
@ApiImplicitParam(name = "id", value = "智慧梁场-制梁台座ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}") @ApiOperation(value = "删除智慧梁场-制梁台座信息", notes = "删除智慧梁场-制梁台座信息", httpMethod = "POST")
@PostMapping(value = "/delete") @ApiImplicitParam(name = "id", value = "智慧梁场-制梁台座ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
public Result<SmartBeamFieldMakeBeamPedestal> delete(@ApiIgnore @RequestBody HashMap<String ,Object> map) { @PostMapping(value = "/delete")
String id = MapUtils.getString(map, "id"); public Result<SmartBeamFieldMakeBeamPedestal> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
Result<SmartBeamFieldMakeBeamPedestal> result = new Result<SmartBeamFieldMakeBeamPedestal>(); String id = MapUtils.getString(map, "id");
SmartBeamFieldMakeBeamPedestal smartBeamFieldMakeBeamPedestal = smartBeamFieldMakeBeamPedestalService.getById(id); Result<SmartBeamFieldMakeBeamPedestal> result = new Result<SmartBeamFieldMakeBeamPedestal>();
if(smartBeamFieldMakeBeamPedestal==null) { SmartBeamFieldMakeBeamPedestal smartBeamFieldMakeBeamPedestal = smartBeamFieldMakeBeamPedestalService.getById(id);
result.error500("未找到对应实体"); if (smartBeamFieldMakeBeamPedestal == null) {
}else { result.error500("未找到对应实体");
} else {
boolean ok = smartBeamFieldMakeBeamPedestalService.delete(id); boolean ok = smartBeamFieldMakeBeamPedestalService.delete(id);
if(ok) { if (ok) {
result.success("删除成功!"); result.success("删除成功!");
} }
} }
return result; return result;
} }
/** /**
* 通过id查询 * 通过id查询
* @param id *
* @return * @param id
*/ * @return
@ApiOperation(value = "通过id查询智慧梁场-制梁台座信息", notes = "通过id查询智慧梁场-制梁台座信息" , httpMethod="GET") */
@ApiImplicitParam(name = "id", value = "智慧梁场-制梁台座ID", paramType = "query", required = true, dataType = "Integer") @ApiOperation(value = "通过id查询智慧梁场-制梁台座信息", notes = "通过id查询智慧梁场-制梁台座信息", httpMethod = "GET")
@GetMapping(value = "/queryById") @ApiImplicitParam(name = "id", value = "智慧梁场-制梁台座ID", paramType = "query", required = true, dataType = "Integer")
public Result<SmartBeamFieldMakeBeamPedestal> queryById(@RequestParam(name="id",required=true) String id) { @GetMapping(value = "/queryById")
Result<SmartBeamFieldMakeBeamPedestal> result = new Result<SmartBeamFieldMakeBeamPedestal>(); public Result<SmartBeamFieldMakeBeamPedestal> queryById(@RequestParam(name = "id", required = true) String id) {
SmartBeamFieldMakeBeamPedestal smartBeamFieldMakeBeamPedestal = smartBeamFieldMakeBeamPedestalService.getById(id); Result<SmartBeamFieldMakeBeamPedestal> result = new Result<SmartBeamFieldMakeBeamPedestal>();
if (smartBeamFieldMakeBeamPedestal == null) { SmartBeamFieldMakeBeamPedestal smartBeamFieldMakeBeamPedestal = smartBeamFieldMakeBeamPedestalService.queryById(id);
result.error500("未找到对应实体"); if (smartBeamFieldMakeBeamPedestal == null) {
} else { result.error500("未找到对应实体");
result.setResult(smartBeamFieldMakeBeamPedestal); } else {
result.setSuccess(true); result.setResult(smartBeamFieldMakeBeamPedestal);
} result.setSuccess(true);
return result; }
} return result;
}
@ApiOperation(value = "查询正在和历史梁生产记录", notes = "查询正在和历史梁生产记录", httpMethod = "GET") @ApiOperation(value = "查询正在和历史梁生产记录", notes = "查询正在和历史梁生产记录", httpMethod = "GET")
@ApiImplicitParam(name = "smartBeamFieldMakeBeamPedestalId", value = "智慧梁场-制梁台座ID", paramType = "query", required = true, dataType = "Integer") @ApiImplicitParam(name = "smartBeamFieldMakeBeamPedestalId", value = "智慧梁场-制梁台座ID", paramType = "query", required = true, dataType = "Integer")
@GetMapping(value = "/getMakeBeamRecordList") @GetMapping(value = "/getMakeBeamRecordList")
public Result<MakeBeamRecordVo> getMakeBeamRecordList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) { public Result<MakeBeamRecordVo> getMakeBeamRecordList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(smartBeamFieldMakeBeamPedestalService.getMakeBeamRecordList(paramMap)); return Result.success(smartBeamFieldMakeBeamPedestalService.getMakeBeamRecordList(paramMap));
} }
}
}

View File

@ -74,6 +74,9 @@ public class SmartBeamFieldMakeBeamPedestal implements Serializable {
@ApiModelProperty(value = "更新时间 yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "更新时间 yyyy-MM-dd HH:mm:ss")
private java.util.Date updateDate; private java.util.Date updateDate;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value = "台座类型名称(绑扎台座,制梁台座)")
private java.lang.String pedestalTypeName;
@TableField(exist = false)
@ApiModelProperty(value = "台座工序(多个)名称") @ApiModelProperty(value = "台座工序(多个)名称")
private String pedestalProcess; private String pedestalProcess;
@TableField(exist = false) @TableField(exist = false)

View File

@ -67,4 +67,7 @@ public class SmartBeamFieldSaveBeamPedestal implements Serializable {
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value = "二维码页面的url") @ApiModelProperty(value = "二维码页面的url")
private java.lang.String qrCodeUrl; private java.lang.String qrCodeUrl;
@TableField(exist = false)
@ApiModelProperty(value = "是否梁绑定两次")
private java.lang.Boolean bindByBeamTwice;
} }

View File

@ -1,9 +1,14 @@
package com.zhgd.xmgl.modules.smartbeamfield.mapper; 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 com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldBeam;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldSaveBeamPedestal; import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldSaveBeamPedestal;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -18,4 +23,8 @@ import java.util.List;
public interface SmartBeamFieldSaveBeamPedestalMapper extends BaseMapper<SmartBeamFieldSaveBeamPedestal> { public interface SmartBeamFieldSaveBeamPedestalMapper extends BaseMapper<SmartBeamFieldSaveBeamPedestal> {
List<SmartBeamFieldBeam> getSaveBeamRecordList(HashMap<String, Object> paramMap); List<SmartBeamFieldBeam> getSaveBeamRecordList(HashMap<String, Object> paramMap);
IPage<SmartBeamFieldSaveBeamPedestal> queryList(Page<SmartBeamFieldSaveBeamPedestal> page, @Param(Constants.WRAPPER) QueryWrapper<SmartBeamFieldSaveBeamPedestal> queryWrapper);
List<SmartBeamFieldSaveBeamPedestal> queryList(@Param(Constants.WRAPPER) QueryWrapper<SmartBeamFieldSaveBeamPedestal> queryWrapper);
} }

View File

@ -10,4 +10,14 @@
join smart_beam_field_bridge_section sbfbs on sbfbtsbp.smart_beam_field_beam_id = sbfbs.id join smart_beam_field_bridge_section sbfbs on sbfbtsbp.smart_beam_field_beam_id = sbfbs.id
where sbfsbp.id = #{smartBeamFieldSaveBeamPedestalId} where sbfsbp.id = #{smartBeamFieldSaveBeamPedestalId}
</select> </select>
<select id="queryList" resultType="com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldSaveBeamPedestal">
select sbfsbp.*,if(count(sbfsbp.id) =2 ,1 ,0) bindByBeamTwice
from smart_beam_field_save_beam_pedestal sbfsbp
left join smart_beam_field_beam_to_save_beam_pedestal sbfbtsbp on sbfsbp.id =
sbfbtsbp.smart_beam_field_save_beam_pedestal_id
${ew.customSqlSegment}
group by sbfsbp.id
order by sbfsbp.id desc
</select>
</mapper> </mapper>

View File

@ -27,4 +27,6 @@ public interface ISmartBeamFieldMakeBeamPedestalService extends IService<SmartBe
MakeBeamRecordVo getMakeBeamRecordList(HashMap<String, Object> paramMap); MakeBeamRecordVo getMakeBeamRecordList(HashMap<String, Object> paramMap);
boolean delete(String id); boolean delete(String id);
SmartBeamFieldMakeBeamPedestal queryById(String id);
} }

View File

@ -13,6 +13,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhgd.jeecg.common.execption.OpenAlertException; import com.zhgd.jeecg.common.execption.OpenAlertException;
import com.zhgd.jeecg.common.system.query.QueryGenerator; 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.*;
import com.zhgd.xmgl.modules.smartbeamfield.entity.vo.MakeBeamRecordVo; import com.zhgd.xmgl.modules.smartbeamfield.entity.vo.MakeBeamRecordVo;
import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldBeamToProcessMapper; 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.mapper.SmartBeamFieldProductionLineToMakeBeamPedestalMapper;
import com.zhgd.xmgl.modules.smartbeamfield.service.ISmartBeamFieldMakeBeamPedestalService; import com.zhgd.xmgl.modules.smartbeamfield.service.ISmartBeamFieldMakeBeamPedestalService;
import com.zhgd.xmgl.util.PageUtil; import com.zhgd.xmgl.util.PageUtil;
import com.zhgd.xmgl.util.RefUtil;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@ -74,6 +74,10 @@ public class SmartBeamFieldMakeBeamPedestalServiceImpl extends ServiceImpl<Smart
} }
private List<SmartBeamFieldMakeBeamPedestal> dealList(List<SmartBeamFieldMakeBeamPedestal> list) { private List<SmartBeamFieldMakeBeamPedestal> dealList(List<SmartBeamFieldMakeBeamPedestal> list) {
for (SmartBeamFieldMakeBeamPedestal pedestal : list) {
pedestal.setPedestalTypeName(ParamEnum.getStr(ParamEnum.SmartBeamFieldMakeBeamPedestalPedestalTypeEnum.values(), pedestal.getPedestalType()));
}
return list; return list;
} }
@ -215,4 +219,11 @@ public class SmartBeamFieldMakeBeamPedestalServiceImpl extends ServiceImpl<Smart
.eq(SmartBeamFieldProductionLineToMakeBeamPedestal::getSmartBeamFieldMakeBeamPedestalId, id)); .eq(SmartBeamFieldProductionLineToMakeBeamPedestal::getSmartBeamFieldMakeBeamPedestalId, id));
return true; return true;
} }
@Override
public SmartBeamFieldMakeBeamPedestal queryById(String id) {
SmartBeamFieldMakeBeamPedestal smartBeamFieldMakeBeamPedestal = baseMapper.selectById(id);
smartBeamFieldMakeBeamPedestal.setPedestalTypeName(ParamEnum.getStr(ParamEnum.SmartBeamFieldMakeBeamPedestalPedestalTypeEnum.values(), smartBeamFieldMakeBeamPedestal.getPedestalType()));
return smartBeamFieldMakeBeamPedestal;
}
} }

View File

@ -67,19 +67,19 @@ public class SmartBeamFieldProductionLineServiceImpl extends ServiceImpl<SmartBe
} }
@Override @Override
public void add(SmartBeamFieldProductionLine smartBeamFieldProduZctionLine) { public void add(SmartBeamFieldProductionLine smartBeamFieldProductionLine) {
smartBeamFieldProduZctionLine.setId(null); smartBeamFieldProductionLine.setId(null);
baseMapper.insert(smartBeamFieldProduZctionLine); baseMapper.insert(smartBeamFieldProductionLine);
List<SmartBeamFieldProductionLineToMakeBeamPedestal> productionLineMakeBeamPedestalList = smartBeamFieldProduZctionLine.getProductionLineMakeBeamPedestalList(); List<SmartBeamFieldProductionLineToMakeBeamPedestal> productionLineMakeBeamPedestalList = smartBeamFieldProductionLine.getProductionLineMakeBeamPedestalList();
if (CollUtil.isNotEmpty(productionLineMakeBeamPedestalList)) { if (CollUtil.isNotEmpty(productionLineMakeBeamPedestalList)) {
for (SmartBeamFieldProductionLineToMakeBeamPedestal smartBeamFieldProductionLineToMakeBeamPedestal : productionLineMakeBeamPedestalList) { for (SmartBeamFieldProductionLineToMakeBeamPedestal pedestal : productionLineMakeBeamPedestalList) {
smartBeamFieldProductionLineToMakeBeamPedestal.setId(null); pedestal.setId(null);
smartBeamFieldProductionLineToMakeBeamPedestal.setSmartBeamFieldProductionLineId(smartBeamFieldProduZctionLine.getId()); pedestal.setSmartBeamFieldProductionLineId(smartBeamFieldProductionLine.getId());
if (smartBeamFieldProductionLineToMakeBeamPedestal.getSmartBeamFieldMakeBeamPedestalId() == null) { if (pedestal.getSmartBeamFieldMakeBeamPedestalId() == null) {
throw new OpenAlertException("productionLineMakeBeamPedestalList[i].smartBeamFieldMakeBeamPedestalId智慧梁场-制梁台座id不能为空"); throw new OpenAlertException("productionLineMakeBeamPedestalList[i].smartBeamFieldMakeBeamPedestalId智慧梁场-制梁台座id不能为空");
} }
smartBeamFieldProductionLineToMakeBeamPedestal.setProjectSn(smartBeamFieldProduZctionLine.getProjectSn()); pedestal.setProjectSn(smartBeamFieldProductionLine.getProjectSn());
smartBeamFieldProductionLineToMakeBeamPedestalMapper.insert(smartBeamFieldProductionLineToMakeBeamPedestal); smartBeamFieldProductionLineToMakeBeamPedestalMapper.insert(pedestal);
} }
} }
} }
@ -87,6 +87,23 @@ public class SmartBeamFieldProductionLineServiceImpl extends ServiceImpl<SmartBe
@Override @Override
public void edit(SmartBeamFieldProductionLine smartBeamFieldProductionLine) { public void edit(SmartBeamFieldProductionLine smartBeamFieldProductionLine) {
baseMapper.updateById(smartBeamFieldProductionLine); baseMapper.updateById(smartBeamFieldProductionLine);
//更改排序
List<SmartBeamFieldProductionLineToMakeBeamPedestal> 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<SmartBeamFieldProductionLineToMakeBeamPedestal>()
.eq(SmartBeamFieldProductionLineToMakeBeamPedestal::getSmartBeamFieldProductionLineId, smartBeamFieldProductionLine.getId())
.eq(SmartBeamFieldProductionLineToMakeBeamPedestal::getSmartBeamFieldMakeBeamPedestalId, pedestal.getSmartBeamFieldMakeBeamPedestalId())
);
}
}
} }
@Override @Override

View File

@ -55,7 +55,7 @@ public class SmartBeamFieldSaveBeamPedestalServiceImpl extends ServiceImpl<Smart
public IPage<SmartBeamFieldSaveBeamPedestal> queryPageList(HashMap<String, Object> paramMap) { public IPage<SmartBeamFieldSaveBeamPedestal> queryPageList(HashMap<String, Object> paramMap) {
QueryWrapper<SmartBeamFieldSaveBeamPedestal> queryWrapper = getQueryWrapper(paramMap); QueryWrapper<SmartBeamFieldSaveBeamPedestal> queryWrapper = getQueryWrapper(paramMap);
Page<SmartBeamFieldSaveBeamPedestal> page = PageUtil.getPage(paramMap); Page<SmartBeamFieldSaveBeamPedestal> page = PageUtil.getPage(paramMap);
IPage<SmartBeamFieldSaveBeamPedestal> pageList = this.page(page, queryWrapper); IPage<SmartBeamFieldSaveBeamPedestal> pageList = baseMapper.queryList(page, queryWrapper);
pageList.setRecords(dealList(pageList.getRecords())); pageList.setRecords(dealList(pageList.getRecords()));
return pageList; return pageList;
} }
@ -63,13 +63,12 @@ public class SmartBeamFieldSaveBeamPedestalServiceImpl extends ServiceImpl<Smart
@Override @Override
public List<SmartBeamFieldSaveBeamPedestal> queryList(HashMap<String, Object> paramMap) { public List<SmartBeamFieldSaveBeamPedestal> queryList(HashMap<String, Object> paramMap) {
QueryWrapper<SmartBeamFieldSaveBeamPedestal> queryWrapper = getQueryWrapper(paramMap); QueryWrapper<SmartBeamFieldSaveBeamPedestal> queryWrapper = getQueryWrapper(paramMap);
return dealList(this.list(queryWrapper)); return dealList(baseMapper.queryList(queryWrapper));
} }
private QueryWrapper<SmartBeamFieldSaveBeamPedestal> getQueryWrapper(HashMap<String, Object> paramMap) { private QueryWrapper<SmartBeamFieldSaveBeamPedestal> getQueryWrapper(HashMap<String, Object> paramMap) {
String alias = ""; String alias = "sbfsbp.";
QueryWrapper<SmartBeamFieldSaveBeamPedestal> queryWrapper = QueryGenerator.initPageQueryWrapper(SmartBeamFieldSaveBeamPedestal.class, paramMap, alias); QueryWrapper<SmartBeamFieldSaveBeamPedestal> queryWrapper = QueryGenerator.initPageQueryWrapper(SmartBeamFieldSaveBeamPedestal.class, paramMap, alias);
queryWrapper.orderByDesc(alias + RefUtil.fieldNameUlc(SmartBeamFieldSaveBeamPedestal::getId));
return queryWrapper; return queryWrapper;
} }