代码问题修改

This commit is contained in:
dingjie 2023-12-13 10:49:57 +08:00
parent 287a30e3f5
commit 79f5ae3888
16 changed files with 49 additions and 39 deletions

View File

@ -1,6 +1,5 @@
package com.bonus.sgzb.auth.service;
import com.bonus.sgzb.system.service.ISysSmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.bonus.sgzb.common.core.constant.CacheConstants;

View File

@ -64,4 +64,7 @@ public interface MaTypeMapper
int updatePropSetByTypeId(MaPropSet propSet);
MaType selectTypeByTypeId(long typeId);
List<MaType> selectMaTypeTree();
}

View File

@ -151,7 +151,7 @@ public class MaTypeServiceImpl implements ITypeService {
@Override
public List<TreeSelect> getMaTypeList(String typeName) {
List<MaType> maTypes = maTypeMapper.selectMaTypeList(typeName);
List<MaType> maTypes = maTypeMapper.selectMaTypeTree();
//如果没有查询到那么返回空
return buildDeptTreeSelect(maTypes);
}

View File

@ -280,4 +280,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectMaTypeVo"/>
where type_id = #{typeId}
</select>
<select id="selectMaTypeTree" resultMap="MaTypeResult">
select m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id, m.manage_type,
m.lease_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
m.holding_time, m.warn_num, m.del_flag, m.create_by, m.create_time,
m.remark, m.company_id
from ma_type m
WHERE level != 4
</select>
</mapper>

View File

@ -1,10 +1,10 @@
package bonus.sgzb.material.controller;
package com.bonus.sgzb.material.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import bonus.sgzb.material.domain.PlanBorrowInfo;
import bonus.sgzb.material.service.IPlanBorrowInfoService;
import com.bonus.sgzb.material.domain.PlanBorrowInfo;
import com.bonus.sgzb.material.service.IPlanBorrowInfoService;
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -31,7 +31,7 @@ import com.bonus.sgzb.common.core.web.page.TableDataInfo;
*/
@Api
@RestController
@RequestMapping("/info")
@RequestMapping("/planBorrowInfo")
public class PlanBorrowInfoController extends BaseController
{
@Autowired

View File

@ -1,10 +1,10 @@
package bonus.sgzb.material.controller;
package com.bonus.sgzb.material.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import bonus.sgzb.material.domain.PlanNeedInfo;
import bonus.sgzb.material.service.IPlanNeedInfoService;
import com.bonus.sgzb.material.domain.PlanNeedInfo;
import com.bonus.sgzb.material.service.IPlanNeedInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@ -18,7 +18,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.bonus.sgzb.common.log.annotation.Log;
import com.bonus.sgzb.common.log.enums.BusinessType;
import com.bonus.sgzb.common.security.annotation.RequiresPermissions;
import com.bonus.sgzb.common.core.web.controller.BaseController;
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
@ -32,7 +31,7 @@ import com.bonus.sgzb.common.core.web.page.TableDataInfo;
*/
@Api
@RestController
@RequestMapping("/info")
@RequestMapping("/planNeedInfo")
public class PlanNeedInfoController extends BaseController
{
@Autowired

View File

@ -1,4 +1,4 @@
package bonus.sgzb.material.domain;
package com.bonus.sgzb.material.domain;
import com.bonus.sgzb.common.core.annotation.Excel;
import com.bonus.sgzb.common.core.web.domain.BaseEntity;

View File

@ -1,4 +1,4 @@
package bonus.sgzb.material.domain;
package com.bonus.sgzb.material.domain;
import com.bonus.sgzb.common.core.annotation.Excel;
import com.bonus.sgzb.common.core.web.domain.BaseEntity;

View File

@ -1,7 +1,7 @@
package bonus.sgzb.material.mapper;
package com.bonus.sgzb.material.mapper;
import bonus.sgzb.material.domain.PlanBorrowInfo;
import com.bonus.sgzb.material.domain.PlanBorrowInfo;
import java.util.List;

View File

@ -1,6 +1,6 @@
package bonus.sgzb.material.mapper;
package com.bonus.sgzb.material.mapper;
import bonus.sgzb.material.domain.PlanNeedInfo;
import com.bonus.sgzb.material.domain.PlanNeedInfo;
import java.util.List;

View File

@ -1,7 +1,7 @@
package bonus.sgzb.material.service;
package com.bonus.sgzb.material.service;
import bonus.sgzb.material.domain.PlanBorrowInfo;
import com.bonus.sgzb.material.domain.PlanBorrowInfo;
import java.util.List;

View File

@ -1,7 +1,7 @@
package bonus.sgzb.material.service;
package com.bonus.sgzb.material.service;
import bonus.sgzb.material.domain.PlanNeedInfo;
import com.bonus.sgzb.material.domain.PlanNeedInfo;
import java.util.List;

View File

@ -1,10 +1,10 @@
package bonus.sgzb.material.service.impl;
package com.bonus.sgzb.material.service.impl;
import java.util.List;
import bonus.sgzb.material.domain.PlanBorrowInfo;
import bonus.sgzb.material.mapper.PlanBorrowInfoMapper;
import bonus.sgzb.material.service.IPlanBorrowInfoService;
import com.bonus.sgzb.material.domain.PlanBorrowInfo;
import com.bonus.sgzb.material.mapper.PlanBorrowInfoMapper;
import com.bonus.sgzb.material.service.IPlanBorrowInfoService;
import com.bonus.sgzb.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

View File

@ -1,10 +1,10 @@
package bonus.sgzb.material.service.impl;
package com.bonus.sgzb.material.service.impl;
import java.util.List;
import bonus.sgzb.material.domain.PlanNeedInfo;
import bonus.sgzb.material.mapper.PlanNeedInfoMapper;
import bonus.sgzb.material.service.IPlanNeedInfoService;
import com.bonus.sgzb.material.domain.PlanNeedInfo;
import com.bonus.sgzb.material.mapper.PlanNeedInfoMapper;
import com.bonus.sgzb.material.service.IPlanNeedInfoService;
import com.bonus.sgzb.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="bonus.sgzb.material.mapper.PlanBorrowInfoMapper">
<mapper namespace="com.bonus.sgzb.material.mapper.PlanBorrowInfoMapper">
<resultMap type="bonus.sgzb.material.domain.PlanBorrowInfo" id="PlanBorrowInfoResult">
<resultMap type="com.bonus.sgzb.material.domain.PlanBorrowInfo" id="PlanBorrowInfoResult">
<result property="borrowId" column="borrow_id" />
<result property="needUnitId" column="need_unit_id" />
<result property="borrowUnitId" column="borrow_unit_id" />
@ -21,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select borrow_id, need_unit_id, borrow_unit_id, code, create_by, create_time, update_by, update_time, remark, company_id from plan_borrow_info
</sql>
<select id="selectPlanBorrowInfoList" parameterType="bonus.sgzb.material.domain.PlanBorrowInfo" resultMap="PlanBorrowInfoResult">
<select id="selectPlanBorrowInfoList" parameterType="com.bonus.sgzb.material.domain.PlanBorrowInfo" resultMap="PlanBorrowInfoResult">
<include refid="selectPlanBorrowInfoVo"/>
<where>
<if test="needUnitId != null "> and need_unit_id = #{needUnitId}</if>
@ -36,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where borrow_id = #{borrowId}
</select>
<insert id="insertPlanBorrowInfo" parameterType="bonus.sgzb.material.domain.PlanBorrowInfo" useGeneratedKeys="true" keyProperty="borrowId">
<insert id="insertPlanBorrowInfo" parameterType="com.bonus.sgzb.material.domain.PlanBorrowInfo" useGeneratedKeys="true" keyProperty="borrowId">
insert into plan_borrow_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="needUnitId != null">need_unit_id,</if>
@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<update id="updatePlanBorrowInfo" parameterType="bonus.sgzb.material.domain.PlanBorrowInfo">
<update id="updatePlanBorrowInfo" parameterType="com.bonus.sgzb.material.domain.PlanBorrowInfo">
update plan_borrow_info
<trim prefix="SET" suffixOverrides=",">
<if test="needUnitId != null">need_unit_id = #{needUnitId},</if>

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="bonus.sgzb.material.mapper.PlanNeedInfoMapper">
<mapper namespace="com.bonus.sgzb.material.mapper.PlanNeedInfoMapper">
<resultMap type="bonus.sgzb.material.domain.PlanNeedInfo" id="PlanNeedInfoResult">
<resultMap type="com.bonus.sgzb.material.domain.PlanNeedInfo" id="PlanNeedInfoResult">
<result property="planId" column="plan_id" />
<result property="unitId" column="unit_id" />
<result property="code" column="code" />
@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select plan_id, unit_id, code, create_by, create_time, update_by, update_time, remark, company_id from plan_need_info
</sql>
<select id="selectPlanNeedInfoList" parameterType="bonus.sgzb.material.domain.PlanNeedInfo" resultMap="PlanNeedInfoResult">
<select id="selectPlanNeedInfoList" parameterType="com.bonus.sgzb.material.domain.PlanNeedInfo" resultMap="PlanNeedInfoResult">
<include refid="selectPlanNeedInfoVo"/>
<where>
<if test="unitId != null "> and unit_id = #{unitId}</if>
@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where plan_id = #{planId}
</select>
<insert id="insertPlanNeedInfo" parameterType="bonus.sgzb.material.domain.PlanNeedInfo" useGeneratedKeys="true" keyProperty="planId">
<insert id="insertPlanNeedInfo" parameterType="com.bonus.sgzb.material.domain.PlanNeedInfo" useGeneratedKeys="true" keyProperty="planId">
insert into plan_need_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="unitId != null">unit_id,</if>
@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<update id="updatePlanNeedInfo" parameterType="bonus.sgzb.material.domain.PlanNeedInfo">
<update id="updatePlanNeedInfo" parameterType="com.bonus.sgzb.material.domain.PlanNeedInfo">
update plan_need_info
<trim prefix="SET" suffixOverrides=",">
<if test="unitId != null">unit_id = #{unitId},</if>