Compare commits
4 Commits
45156dc7e2
...
e908818197
| Author | SHA1 | Date |
|---|---|---|
|
|
e908818197 | |
|
|
c4e57176ab | |
|
|
22529abd22 | |
|
|
44998696b3 |
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.sgzb.base.controller;
|
||||
|
||||
import com.bonus.sgzb.base.domain.MaPartType;
|
||||
import com.bonus.sgzb.base.domain.MapType;
|
||||
import com.bonus.sgzb.base.service.ExcelService;
|
||||
import com.bonus.sgzb.base.service.IPartTypeService;
|
||||
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
|
||||
|
|
@ -103,7 +104,7 @@ public class MaPartTypeController extends BaseController {
|
|||
// 保存文件
|
||||
file.transferTo(filePath.toFile());
|
||||
|
||||
Map<String, Map<String, List<String>>> stringMapMap = excelService.readExcelFile(filePath.toString());
|
||||
Map<String, Map<String, List<MapType>>> stringMapMap = excelService.readExcelFile(filePath.toString());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,47 @@
|
|||
package com.bonus.sgzb.base.domain;
|
||||
|
||||
import com.bonus.sgzb.common.core.annotation.Excel;
|
||||
import com.bonus.sgzb.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 配件类型管理ma_part_type(MaPartType)表实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-27 16:44:09
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class MapType extends BaseEntity {
|
||||
|
||||
//类型名称
|
||||
@Excel(name = "类型名称")
|
||||
private String paName;
|
||||
|
||||
//计量单位ID
|
||||
@Excel(name = "计量单位ID")
|
||||
private String unitId;
|
||||
|
||||
//原值
|
||||
@Excel(name = "原值")
|
||||
private String buyPrice;
|
||||
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
MapType mapType = (MapType) o;
|
||||
return Objects.equals(paName, mapType.paName) &&
|
||||
Objects.equals(unitId, mapType.unitId) &&
|
||||
Objects.equals(buyPrice, mapType.buyPrice);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(paName, unitId, buyPrice);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -4,16 +4,41 @@ import com.bonus.sgzb.base.domain.MaPartType;
|
|||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ExcelMapper {
|
||||
MaPartType selectMa(@Param("name") String name,@Param("id") long id);
|
||||
|
||||
void insertPaName(MaPartType maPartType);
|
||||
|
||||
String selectPaName(@Param("firstLevel") String firstLevel);
|
||||
|
||||
|
||||
int insertPaName(MaPartType firstLevel);
|
||||
|
||||
void insertPaTwoName(MaPartType maPartType);
|
||||
|
||||
void insertPaThreeName(MaPartType maPartType);
|
||||
//
|
||||
// String selectPaName(@Param("firstLevel") String firstLevel);
|
||||
//
|
||||
//
|
||||
// int insertPaName(MaPartType firstLevel);
|
||||
//
|
||||
// void insertPaTwoName(MaPartType maPartType);
|
||||
//
|
||||
// void insertPaThreeName(MaPartType maPartType);
|
||||
//
|
||||
// int selectThreeName(String secondLevel);
|
||||
//
|
||||
// int selectTwoName(String entry2);
|
||||
//
|
||||
// String selectPaNameAndpaId(String value, String o);
|
||||
//
|
||||
//
|
||||
// List selectListParentid(String firstLevel);
|
||||
//
|
||||
// String selectName(String parentId2);
|
||||
//
|
||||
//
|
||||
// void updateLevelStatus(String parentId);
|
||||
//
|
||||
// String selectStatus(String pId);
|
||||
//
|
||||
// MaPartType selectTwoPaName(@Param("secondLevel") String secondLevel,@Param("id") Long id);
|
||||
//
|
||||
// String selectThreePaName(@Param("value") String value,@Param("paId") Long paId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
package com.bonus.sgzb.base.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.sgzb.base.domain.MapType;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public interface ExcelService {
|
||||
Map<String, Map<String, List<String>>> readExcelFile(String filePath);
|
||||
Map<String, Map<String, List<MapType>>> readExcelFile(String filePath);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
package com.bonus.sgzb.base.service.impl;// ExcelServiceImpl.java
|
||||
import com.bonus.sgzb.base.domain.MaPartType;
|
||||
import com.bonus.sgzb.base.domain.MapType;
|
||||
import com.bonus.sgzb.base.mapper.ExcelMapper;
|
||||
import com.bonus.sgzb.base.service.ExcelService;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.apache.xmlbeans.impl.xb.xsdschema.Public;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -22,10 +22,10 @@ public class ExcelServiceImpl implements ExcelService {
|
|||
|
||||
|
||||
/*
|
||||
* 将读取的excel文件转为
|
||||
* */
|
||||
* 将读取的excel文件转为
|
||||
* */
|
||||
@Override
|
||||
public Map<String, Map<String, List<String>>> readExcelFile(String filePath) {
|
||||
public Map<String, Map<String, List<MapType>>> readExcelFile(String filePath) {
|
||||
|
||||
FileInputStream excelFile = null;
|
||||
Workbook workbook = null;
|
||||
|
|
@ -34,10 +34,8 @@ public class ExcelServiceImpl implements ExcelService {
|
|||
workbook = new XSSFWorkbook(excelFile);
|
||||
Sheet datatypeSheet = workbook.getSheetAt(0);
|
||||
Iterator<Row> iterator = datatypeSheet.iterator();
|
||||
String fourthLevel = "";
|
||||
String fifthLevel ="";
|
||||
Long id = null;
|
||||
Map<String, Map<String, List<String>>> level3Relation = new HashMap<>();
|
||||
|
||||
Map<String, Map<String, List<MapType>>> level3Relation = new HashMap<>();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
Row currentRow = iterator.next();
|
||||
|
|
@ -51,72 +49,46 @@ public class ExcelServiceImpl implements ExcelService {
|
|||
Cell thirdLevelCell = currentRow.getCell(3);
|
||||
Cell fourthLevelCell = currentRow.getCell(4);
|
||||
Cell fifthLevelCell = currentRow.getCell(5);
|
||||
|
||||
Cell sixthLevelCell = currentRow.getCell(6);
|
||||
if (sixthLevelCell != null){
|
||||
throw new RuntimeException("导入模板不正确");
|
||||
}
|
||||
|
||||
String firstLevel = getCellValueAsString(firstLevelCell);
|
||||
String secondLevel = getCellValueAsString(secondLevelCell);
|
||||
String thirdLevel = getCellValueAsString(thirdLevelCell);
|
||||
fourthLevel = getCellValueAsString(fourthLevelCell);
|
||||
fifthLevel = getCellValueAsString(fifthLevelCell);
|
||||
|
||||
level3Relation.computeIfAbsent(firstLevel, k -> new HashMap<>())
|
||||
.computeIfAbsent(secondLevel, k -> new ArrayList<>())
|
||||
.add(thirdLevel);
|
||||
}
|
||||
|
||||
// 遍历外层Map
|
||||
for (Map.Entry<String, Map<String, List<String>>> entry1 : level3Relation.entrySet()) {
|
||||
String firstLevel = entry1.getKey(); // 获取第一层级的键
|
||||
String parentId = excelMapper.selectPaName(firstLevel);
|
||||
|
||||
//产生返回值并且进行判断是否是pa_name列已经有的,并且返回对应的pa_id
|
||||
if(parentId == null || parentId == ""){
|
||||
MaPartType maPartType = new MaPartType();
|
||||
maPartType.setPaName(firstLevel);
|
||||
maPartType.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
excelMapper.insertPaName(maPartType);//如果第一层在数据库中查询不到则插入数据,并且读取到parent_id
|
||||
id = maPartType.getPaId();
|
||||
MapType thirdLevel = new MapType();
|
||||
thirdLevel.setPaName(getCellValueAsString(thirdLevelCell));
|
||||
thirdLevel.setUnitId(getCellValueAsString(fourthLevelCell));
|
||||
thirdLevel.setBuyPrice(getCellValueAsString(fifthLevelCell));
|
||||
|
||||
// 检查是否所有三个级别都是空白
|
||||
if (firstLevel.isEmpty() || secondLevel.isEmpty() || thirdLevel == null) {
|
||||
continue; // 跳过这一行
|
||||
}
|
||||
//
|
||||
|
||||
|
||||
|
||||
Map<String, List<String>> secondLevelMap = entry1.getValue(); // 获取对应于第一层级键的内层Map
|
||||
|
||||
// 遍历内层Map
|
||||
for (Map.Entry<String, List<String>> entry2 : secondLevelMap.entrySet()) {
|
||||
String secondLevel = entry2.getKey(); // 获取第二层级的键
|
||||
String parentIdTwo = excelMapper.selectPaName(secondLevel);
|
||||
|
||||
//产生返回值并且进行判断是否是pa_name列已经有的,并且返回对应的pa_id
|
||||
if(parentIdTwo == null || parentIdTwo == ""){
|
||||
MaPartType maPartType = new MaPartType();
|
||||
maPartType.setPaName(secondLevel);
|
||||
maPartType.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
maPartType.setParentId(id);
|
||||
excelMapper.insertPaTwoName(maPartType);//第二层在数据库中查询不到则插入数据,则插入时候设置关联关系
|
||||
id = maPartType.getPaId();
|
||||
// 检查是否已经存在相同的组合
|
||||
boolean isDuplicate = false;
|
||||
for (String key : level3Relation.keySet()) {
|
||||
Map<String, List<MapType>> secondLevelMap = level3Relation.get(key);
|
||||
for (String key2 : secondLevelMap.keySet()) {
|
||||
List<MapType> thirdLevelList = secondLevelMap.get(key2);
|
||||
if (key.equals(firstLevel) && key2.equals(secondLevel) && thirdLevelList.contains(thirdLevel)) {
|
||||
isDuplicate = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isDuplicate) break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//从数据库中查询
|
||||
String thirdLevel = entry2.getValue().get(0); // 获取对应于第二层级键的值,即第三层级的列表
|
||||
|
||||
|
||||
String parentThreeId = excelMapper.selectPaName(thirdLevel);
|
||||
if(parentThreeId == null || parentThreeId == ""){
|
||||
MaPartType maPartType = new MaPartType();
|
||||
maPartType.setPaName(thirdLevel);
|
||||
maPartType.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
maPartType.setUnitId(fourthLevel);
|
||||
maPartType.setBuyPrice(fifthLevel);
|
||||
maPartType.setParentId(id);
|
||||
excelMapper.insertPaThreeName(maPartType);//第二层在数据库中查询不到则插入数据,则插入时候设置关联关系
|
||||
}
|
||||
if (!isDuplicate) {
|
||||
// 如果不是重复项,则添加到映射中
|
||||
Map<String, List<MapType>> secondLevelMap = level3Relation.computeIfAbsent(firstLevel, k -> new HashMap<>());
|
||||
List<MapType> thirdLevelList = secondLevelMap.computeIfAbsent(secondLevel, k -> new ArrayList<>());
|
||||
thirdLevelList.add(thirdLevel);
|
||||
}
|
||||
}
|
||||
printLevel3Relation(level3Relation);
|
||||
|
||||
return level3Relation;
|
||||
} catch (IOException e) {
|
||||
|
|
@ -160,5 +132,83 @@ public class ExcelServiceImpl implements ExcelService {
|
|||
}
|
||||
|
||||
|
||||
private void printLevel3Relation(Map<String, Map<String, List<MapType>>> level3Relation) {
|
||||
for (Map.Entry<String, Map<String, List<MapType>>> firstLevel : level3Relation.entrySet()) {
|
||||
boolean outExist = true;
|
||||
System.out.println("level_1: " + firstLevel.getKey());
|
||||
//TODO, sql查询:是否有此名字 + parentId=0, select * from ma_part_type where name=? and parent_id=0;
|
||||
MaPartType maPartType_level1 = excelMapper.selectMa(firstLevel.getKey(),0);
|
||||
//TODO, 以上返回 maPartType_level1
|
||||
if (Objects.nonNull(maPartType_level1)) {
|
||||
loopInner(firstLevel, outExist,maPartType_level1.getPaId());
|
||||
} else {
|
||||
//TODO, insert firstLevel, get id
|
||||
MaPartType maPartType = new MaPartType();
|
||||
maPartType.setPaName(firstLevel.getKey());
|
||||
maPartType.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
maPartType.setParentId(0L);
|
||||
maPartType.setLevel("1");
|
||||
excelMapper.insertPaName(maPartType);//如果第一层在数据库中查询不到则插入数据,并且读取到parent_id
|
||||
outExist = outExist && false;
|
||||
loopInner(firstLevel, outExist, maPartType.getPaId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void loopInner(Map.Entry<String, Map<String, List<MapType>>> firstLevel, boolean outExist, long firstLevelId) {
|
||||
for (Map.Entry<String, List<MapType>> secondLevel : firstLevel.getValue().entrySet()) {
|
||||
System.out.println("\tlevel_2: " + secondLevel.getKey());
|
||||
//TODO, sql查询:是否有此名字 + parentId=firstLevelId, select * from ma_part_type where name=? and parent_id = firstLevelId;
|
||||
MaPartType maPartType_level2 = excelMapper.selectMa(firstLevel.getKey(),firstLevelId);
|
||||
//TODO, 以上返回 maPartType_level2
|
||||
if (Objects.nonNull(maPartType_level2)) {
|
||||
looplevel3(secondLevel, outExist, maPartType_level2.getPaId());
|
||||
} else {
|
||||
//TODO, insert firstLevel, get id
|
||||
if (!outExist) {
|
||||
MaPartType maPartType = new MaPartType();
|
||||
maPartType.setPaName(secondLevel.getKey());
|
||||
maPartType.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
maPartType.setParentId(firstLevelId);
|
||||
maPartType.setLevel("2");
|
||||
excelMapper.insertPaName(maPartType);//如果第一层在数据库中查询不到则插入数据,并且读取到parent_id
|
||||
outExist = outExist && false;
|
||||
looplevel3(secondLevel, outExist, maPartType.getPaId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void looplevel3(Map.Entry<String, List<MapType>> secondLevel, boolean outExist, long secondLevelId) {
|
||||
for (MapType thirdLevel : secondLevel.getValue()) {
|
||||
System.out.println("\t\tlevel_3: " + thirdLevel);
|
||||
//TODO, sql查询:是否有此名字 + parentId=secondLevelId, select * from ma_part_type where name=? and parent_id = secondLevelId;
|
||||
MaPartType maPartType_level3 = excelMapper.selectMa(thirdLevel.getPaName(),secondLevelId);
|
||||
//TODO, 以上返回 maPartType_level3
|
||||
if (Objects.nonNull(maPartType_level3)) {
|
||||
if (!outExist) {
|
||||
//TODO insert
|
||||
MaPartType maPartType = new MaPartType();
|
||||
maPartType.setPaName(thirdLevel.getPaName());
|
||||
maPartType.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
maPartType.setUnitId(thirdLevel.getUnitId());
|
||||
maPartType.setBuyPrice(thirdLevel.getBuyPrice());
|
||||
maPartType.setParentId(secondLevelId);
|
||||
maPartType.setLevel("3");
|
||||
excelMapper.insertPaName(maPartType);//如果第一层在数据库中查询不到则插入数据,并且读取到parent_id
|
||||
}
|
||||
} else {
|
||||
//TODO insert
|
||||
MaPartType maPartType = new MaPartType();
|
||||
maPartType.setPaName(thirdLevel.getPaName());
|
||||
maPartType.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
maPartType.setUnitId(thirdLevel.getUnitId());
|
||||
maPartType.setBuyPrice(thirdLevel.getBuyPrice());
|
||||
maPartType.setParentId(secondLevelId);
|
||||
maPartType.setLevel("3");
|
||||
excelMapper.insertPaName(maPartType);//如果第一层在数据库中查询不到则插入数据,并且读取到parent_id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,27 +3,64 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.sgzb.base.mapper.ExcelMapper">
|
||||
<insert id="insertPaName" keyProperty="paId" useGeneratedKeys="true">
|
||||
<insert id="insertPaName" parameterType="com.bonus.sgzb.base.domain.MaPartType" keyProperty="paId" useGeneratedKeys="true">
|
||||
insert into ma_part_type
|
||||
(pa_name, status,level,del_flag,create_by,create_time,year)
|
||||
(pa_name, parent_id, status,level,del_flag,unit_id,buy_price,create_by,create_time,year)
|
||||
VALUES
|
||||
(#{paName}, 0 , 1, 0, #{createBy}, now(),year(now()))
|
||||
</insert>
|
||||
<insert id="insertPaTwoName" keyProperty="paId" useGeneratedKeys="true">
|
||||
insert into ma_part_type
|
||||
(pa_name, parent_id, status,level,del_flag,create_by,create_time,year)
|
||||
VALUES
|
||||
(#{paName}, #{parentId},0 , 2, 0, #{createBy}, now(),year(now()))
|
||||
</insert>
|
||||
<insert id="insertPaThreeName">
|
||||
insert into ma_part_type
|
||||
(pa_name, parent_id, status,level,del_flag,unit_id,buy_price,create_by,create_time,year)
|
||||
VALUES
|
||||
(#{paName}, #{parentId},0 , 3, 0, #{unitId}, #{buyPrice}, #{createBy}, now(),year(now()))
|
||||
(#{paName}, #{parentId},0 , #{level}, 0, #{unitId}, #{buyPrice}, #{createBy}, now(),year(now()))
|
||||
</insert>
|
||||
|
||||
|
||||
<select id="selectPaName" resultType="java.lang.String">
|
||||
SELECT pa_id FROM ma_part_type WHERE pa_name = #{firstLevel}
|
||||
</select>
|
||||
<!-- <insert id="insertPaName" keyProperty="paId" useGeneratedKeys="true">-->
|
||||
<!-- insert into ma_part_type-->
|
||||
<!-- (pa_name, status,level,del_flag,create_by,create_time,year)-->
|
||||
<!-- VALUES-->
|
||||
<!-- (#{paName}, 0 , 1, 0, #{createBy}, now(),year(now()))-->
|
||||
<!-- </insert>-->
|
||||
<!-- <insert id="insertPaTwoName" keyProperty="paId" useGeneratedKeys="true">-->
|
||||
<!-- insert into ma_part_type-->
|
||||
<!-- (pa_name, parent_id, status,level,del_flag,unit_id,buy_price,create_by,create_time,year)-->
|
||||
<!-- VALUES-->
|
||||
<!-- (#{paName}, #{parentId},0 , 2, 0, #{unitId}, #{buyPrice}, #{createBy}, now(),year(now()))-->
|
||||
<!-- </insert>-->
|
||||
<!-- <insert id="insertPaThreeName">-->
|
||||
<!-- insert into ma_part_type-->
|
||||
<!-- (pa_name, parent_id, status,level,del_flag,unit_id,buy_price,create_by,create_time,year)-->
|
||||
<!-- VALUES-->
|
||||
<!-- (#{paName}, #{parentId},0 , 3, 0, #{unitId}, #{buyPrice}, #{createBy}, now(),year(now()))-->
|
||||
<!-- </insert>-->
|
||||
<!-- <update id="updateLevelStatus" parameterType="java.lang.String">-->
|
||||
<!-- update ma_part_type set level_status = 1 where pa_id = #{parentId}-->
|
||||
<!-- </update>-->
|
||||
|
||||
<!-- <select id="selectPaName" resultType="java.lang.String">-->
|
||||
<!-- SELECT pa_id FROM ma_part_type WHERE pa_name = #{firstLevel}-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- <select id="selectThreeName" resultType="java.lang.Integer" parameterType="java.lang.String">-->
|
||||
<!-- SELECT count(*) FROM ma_part_type WHERE pa_name = #{firstLevel} and level = 3-->
|
||||
<!-- </select>-->
|
||||
<!-- <select id="selectTwoName" resultType="java.lang.Integer" parameterType="java.lang.String">-->
|
||||
<!-- SELECT count(*) FROM ma_part_type WHERE pa_name = #{secondLevel} and level = 2-->
|
||||
<!-- </select>-->
|
||||
<!-- <select id="selectPaNameAndpaId" resultType="java.lang.String" parameterType="java.lang.String">-->
|
||||
<!-- SELECT parent_id FROM ma_part_type WHERE pa_name = #{value} and pa_id = #{o}-->
|
||||
<!-- </select>-->
|
||||
<!-- <select id="selectListParentid" resultType="java.util.List" parameterType="java.lang.String">-->
|
||||
<!-- SELECT parent_id FROM ma_part_type WHERE pa_name = #{firstLevel} and level = 2-->
|
||||
<!-- </select>-->
|
||||
<!-- <select id="selectName" resultType="java.lang.String" parameterType="java.lang.String">-->
|
||||
<!-- SELECT pa_name FROM ma_part_type WHERE pa_name = #{parentId2}-->
|
||||
<!-- </select>-->
|
||||
<!-- <select id="selectStatus" resultType="java.lang.String">-->
|
||||
<!-- select level_status from ma_part_type where pa_id = #{pId}-->
|
||||
<!-- </select>-->
|
||||
<!-- <select id="selectTwoPaName" resultType="com.bonus.sgzb.base.domain.MaPartType">-->
|
||||
<!-- select * from ma_part_type where pa_name = #{secondLevel} and parent_id = #{id}-->
|
||||
<!-- </select>-->
|
||||
<select id="selectMa" resultType="com.bonus.sgzb.base.domain.MaPartType">
|
||||
select * from ma_part_type where pa_name = #{name} and parent_id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</update>
|
||||
|
||||
<delete id="deletePaById">
|
||||
update ma_part_type set del_flag = '2' where pa_id = #{paId}
|
||||
delete from ma_part_type where pa_id = #{paId}
|
||||
</delete>
|
||||
|
||||
<select id="checkPartNameUnique" resultMap="MaPartTypeResult">
|
||||
|
|
|
|||
Loading…
Reference in New Issue