yangman
2023-07-05 3f55d897a99de7befb7c9264053d312543b5634f
修改扭矩配置管理3
已修改5个文件
58 ■■■■■ 文件已修改
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcTorqueConfigController.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/entity/MdcTorqueConfig.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/MdcTorqueConfigMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcTorqueConfigMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/IMdcTorqueConfigService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcTorqueConfigController.java
@@ -37,7 +37,6 @@
    /**
     * 根据id查询
     *
     * @param id
     * @return
     */
@@ -52,7 +51,6 @@
    /**
     * 新增
     *
     * @param mdcTorqueConfig
     * @return
     */
@@ -66,7 +64,6 @@
    /**
     * 修改
     *
     * @param mdcTorqueConfig
     * @return
     */
@@ -80,7 +77,6 @@
    /**
     * 根据id删除扭矩配置
     *
     * @param id
     * @return
     */
@@ -94,7 +90,6 @@
    /**
     * 批量删除
     *
     * @param ids
     * @return
     */
@@ -109,7 +104,6 @@
    /**
     * 导出excel
     *
     * @param request
     * @param mdcTorqueConfig
     * @return
@@ -121,7 +115,6 @@
    /**
     * 导入excel
     *
     * @param request
     * @param response
     * @return
@@ -133,7 +126,6 @@
    /**
     * 根据扭矩值生成主轴运行曲线
     *
     * @param torqueValue
     * @return
     */
@@ -155,19 +147,19 @@
     * @return
     */
    @AutoLog(value = "扭矩配置管理-分页查询")
    @ApiOperation(value = "扭矩配置管理-分页查询",notes = "扭矩配置管理-分页查询")
    @ApiOperation(value = "扭矩配置管理-分页查询", notes = "扭矩配置管理-分页查询")
    @GetMapping("/pageList")
    public Result pageList(MdcTorqueConfig mdcTorqueConfig,
                                  @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                                  @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                  HttpServletRequest req) {
        if (mdcTorqueConfig==null){
                           @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                           @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                           HttpServletRequest req) {
        if (mdcTorqueConfig == null) {
            return Result.error("请传递有效参数");
        }
        LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal();
        String userId= user.getId();
        Page page=new Page(pageNo,pageSize);
        IPage<MdcTorqueConfig> mdcTorqueConfigIPage= mdcTorqueConfigService.pageList(userId,page,req,mdcTorqueConfig);
        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        String userId = user.getId();
        Page page = new Page(pageNo, pageSize);
        IPage<MdcTorqueConfig> mdcTorqueConfigIPage = mdcTorqueConfigService.pageList(userId, page, req, mdcTorqueConfig);
        return Result.ok(mdcTorqueConfigIPage);
    }
}
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/entity/MdcTorqueConfig.java
@@ -40,43 +40,43 @@
    /**
     * 设备编号
     */
    @Excel(name = "设备编号",width = 15)
    @Excel(name = "设备编号", width = 15)
    @ApiModelProperty("设备编号")
    private String equipmentId;
    /**
     * 设备名称
     */
    @Excel(name = "设备名称",width = 15)
    @Excel(name = "设备名称", width = 15)
    @ApiModelProperty("设备名称")
    private String equipmentName;
    /**
     * 日期
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "日期")
    private Date date;
    private Date torqueDate;
    /**
     * 扭矩值
     */
    @Excel(name = "扭矩值",width = 15)
    @Excel(name = "扭矩值", width = 15)
    @ApiModelProperty("扭矩值")
    private float torqueValue;
    /**
     * 备注
     */
    @Excel(name = "备注",width = 15)
    @Excel(name = "备注", width = 15)
    @ApiModelProperty("备注")
    private String notes;
    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMY+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
@@ -84,14 +84,14 @@
    /**
     * 创建人
     */
    @Excel(name = "创建人",width = 15)
    @Excel(name = "创建人", width = 15)
    @ApiModelProperty("创建人")
    private String createBy;
    /**
     * 更新时间
     */
    @JsonFormat(timezone = "GMY+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("更新时间")
    private Date updateTime;
@@ -99,7 +99,7 @@
    /**
     * 更新人
     */
    @Excel(name = "更新人",width = 15)
    @Excel(name = "更新人", width = 15)
    @ApiModelProperty("更新人")
    private String updateBy;
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/MdcTorqueConfigMapper.java
@@ -21,7 +21,7 @@
     * @param torqueValue
     * @return
     */
    List<MdcTorqueConfig> findSpindleRunningCurve(@Param("torqueValue") float torqueValue,@Param("equipmentId") String equipmentId);
    List<MdcTorqueConfig> findSpindleRunningCurve(@Param("torqueValue") float torqueValue, @Param("equipmentId") String equipmentId);
    /**
@@ -30,5 +30,5 @@
     * @param mdcTorqueConfig
     * @return
     */
    IPage<MdcTorqueConfig> pageList(IPage<MdcTorqueConfig> pageData,@Param("mdcTorqueConfig") MdcTorqueConfig mdcTorqueConfig);
    IPage<MdcTorqueConfig> pageList(IPage<MdcTorqueConfig> pageData, @Param("mdcTorqueConfig") MdcTorqueConfig mdcTorqueConfig);
}
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcTorqueConfigMapper.xml
@@ -5,6 +5,7 @@
    <select id="findSpindleRunningCurve" resultType="org.jeecg.modules.mdc.entity.MdcTorqueConfig">
        select mtc.* from mdc_torque_config mtc where mtc.torque_value=#{torqueValue} and mtc.equipment_id=#{equipmentId}
    </select>
    <!--根据车间层级查询扭矩配置列表-->
    <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcTorqueConfig">
        select mtc.* from mdc_torque_config mtc,mdc_equipment me where mtc.equipment_id=me.equipment_id
        <if test="mdcTorqueConfig.equipmentName !=null and mdcTorqueConfig.equipmentName !='' ">
@@ -15,7 +16,8 @@
        </if>
        <if test="mdcTorqueConfig.mdcSectionIds !=null || mdcTorqueConfig.mdcSectionIds.size() > 0 ">
            and mtc.equipment_id in
            <foreach collection="mdcTorqueConfig.mdcSectionIds" item="id" index="index" open="(" close=")" separator=",">
            <foreach collection="mdcTorqueConfig.mdcSectionIds" item="id" index="index" open="(" close=")"
                     separator=",">
                #{id}
            </foreach>
        </if>
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/IMdcTorqueConfigService.java
@@ -55,7 +55,7 @@
     * @param torqueValue
     * @return
     */
    List<MdcTorqueConfig> findSpindleRunningCurve(float torqueValue,String equipmentId);
    List<MdcTorqueConfig> findSpindleRunningCurve(float torqueValue, String equipmentId);
    /**
@@ -66,5 +66,5 @@
     * @param mdcTorqueConfig
     * @return
     */
    IPage<MdcTorqueConfig> pageList(String userId,Page page,HttpServletRequest req,MdcTorqueConfig mdcTorqueConfig);
    IPage<MdcTorqueConfig> pageList(String userId, Page page, HttpServletRequest req, MdcTorqueConfig mdcTorqueConfig);
}