Commit a9907806 authored by lenovo's avatar lenovo

通用转换数据清洗

parent 6c9420b5
......@@ -30,11 +30,11 @@ public class ActSuppliesCleaningRuleController extends BaseController
* 获取所有历史数据
*/
@PreAuthorize("@ss.hasPermi('system:cleaningrule:queryAll')")
@GetMapping("/queryAll")
public AjaxResult selectActSuppliesHistorydata()
@GetMapping("/queryAll/{tylkStatus}")
public AjaxResult selectActSuppliesHistorydata(@PathVariable("tylkStatus") Integer tylkStatus)
{
List<ActSuppliesHistorydata> s = actSuppliesHistorydataService.selectActSuppliesHistorydata();
List<ActSuppliesHistorydata> s = actSuppliesHistorydataService.selectActSuppliesHistorydata(tylkStatus);
return AjaxResult.success(s);
}
......
......@@ -115,7 +115,7 @@ public class ActSuppliesHistorydataController extends BaseController
}
/**
* 数据清洗 历史数据 生成
* 数据清洗 六矿生成表数据
*/
@PreAuthorize("@ss.hasPermi('system:historydata:addInsert1')")
@PostMapping("/addInsert1")
......@@ -127,7 +127,7 @@ public class ActSuppliesHistorydataController extends BaseController
}
/**
* 数据清洗 历史数据 导入
* 数据清洗 六矿导入表数据
*/
@PreAuthorize("@ss.hasPermi('system:historydata:addInsert2')")
@PostMapping("/addInsert2")
......@@ -139,6 +139,31 @@ public class ActSuppliesHistorydataController extends BaseController
return toAjax(1);
}
/**
* 数据清洗 通用生成表数据
*/
@PreAuthorize("@ss.hasPermi('system:historydata:addInsertConvert1')")
@PostMapping("/addInsertConvert1")
public AjaxResult addInsertConvert1(@RequestBody List<ActOperation1> actOperation2s)
{
actSuppliesHistorydataService.addInsertConvert1(actOperation2s);
return toAjax(1);
}
/**
* 数据清洗 通用导入表数据
*/
@PreAuthorize("@ss.hasPermi('system:historydata:addInsertConvert2')")
@PostMapping("/addInsertConvert2")
public AjaxResult addInsertConvert2(@RequestBody List<ActOperation1> actOperation2s)
{
actSuppliesHistorydataService.addInsertConvert2(actOperation2s);
return toAjax(1);
}
}
......@@ -59,6 +59,9 @@ public class ActSuppliesHistorydata extends BaseEntity
@Excel(name = "状态")
private Long status;
/** 通用or六矿 */
private Long tylkStatus;
/** 是否清洗 */
private Long cleanStatus;
......@@ -170,6 +173,14 @@ public class ActSuppliesHistorydata extends BaseEntity
return status;
}
public Long getTylkStatus() {
return tylkStatus;
}
public void setTylkStatus(Long tylkStatus) {
this.tylkStatus = tylkStatus;
}
public Long getCleanStatus() {
return cleanStatus;
}
......
......@@ -23,4 +23,8 @@ public interface ActSuppliesCleaningRuleMapper
int deleteActSuppliesSixMinesSummaryTable(Long hId);
int deleteActSuppliesImportTable(Long hId);
void addInsertConvert1(ActSuppliesImportTable actSuppliesImportTable);
void addInsertConvert2(ActSuppliesImportTable actSuppliesImportTable);
}
......@@ -66,12 +66,13 @@ public interface ActSuppliesHistorydataMapper
void insertActSuppliesHistorydatas(ActSuppliesHistorydata actSuppliesHistorydata1);
void updateActSuppliesHistorydatas(ActSuppliesHistorydata actSuppliesHistorydata);
/**
* 获取所有历史数据
*
* @return 结果
*/
List<ActSuppliesHistorydata> selectActSuppliesHistorydata();
List<ActSuppliesHistorydata> selectActSuppliesHistorydata(Integer tylkStatus);
int updateActSuppliesHistorydataStatusById(Long gethId);
}
......@@ -67,7 +67,7 @@ public interface IActSuppliesHistorydataService
*
* @return 结果
*/
List<ActSuppliesHistorydata> selectActSuppliesHistorydata();
List<ActSuppliesHistorydata> selectActSuppliesHistorydata(Integer tylkStatus);
/**
* 修改历史数据通过id
*
......@@ -78,4 +78,8 @@ public interface IActSuppliesHistorydataService
void addInsertImport(List<ActOperation1> actOperation2s);
void addInsertImportss(List<ActOperation1> actOperation2s);
void addInsertConvert1(List<ActOperation1> actOperation2s);
void addInsertConvert2(List<ActOperation1> actOperation2s);
}
......@@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="historyContent" column="history_content" />
<result property="identifyingCode" column="identifying_code" />
<result property="cleanStatus" column="clean_status" />
<result property="tylkStatus" column="tylk_status" />
<result property="status" column="status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
......@@ -60,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="historyContent != null">history_content,</if>
<if test="identifyingCode != null">identifying_code,</if>
clean_status,
<if test="tylkStatus != null">tylk_status,</if>
<if test="status != null">status,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
......@@ -75,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="historyContent != null">#{historyContent},</if>
<if test="identifyingCode != null">#{identifyingCode},</if>
0,
<if test="tylkStatus != null">#{tylkStatus},</if>
<if test="status != null">#{status},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
......@@ -133,6 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="historyContent != null">history_content = #{historyContent},</if>
<if test="identifyingCode != null">identifying_code = #{identifyingCode},</if>
clean_status = 0,
<if test="tylkStatus != null">tylk_status = #{tylkStatus},</if>
<if test="status != null">status = #{status},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
......@@ -147,17 +151,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</update>
<select id="selectActSuppliesHistorydata" resultMap="ActSuppliesHistorydataResult">
<select id="selectActSuppliesHistorydata" parameterType="java.lang.Integer" resultMap="ActSuppliesHistorydataResult">
<include refid="selectActSuppliesHistorydataVo"/>
where clean_status = 0
where clean_status = 0 and tylk_status =#{tylkStatus}
</select>
<update id="updateActSuppliesHistorydataStatusById" parameterType="java.lang.Long">
update act_supplies_historydata
set clean_status = 1
<where>
<if test="hId != null">and id = #{hId}</if>
<if test="gethId != null">and id = #{gethId}</if>
</where>
</update>
</mapper>
......
import request from '@/utils/request'
// 查询六矿汇总表数据
export function selectActSuppliesHistorydata() {
export function selectActSuppliesHistorydata(tylkStatus) {
return request({
url: '/system/cleaningrule/queryAll',
url: '/system/cleaningrule/queryAll/'+tylkStatus,
method: 'get'
})
......
......@@ -79,3 +79,21 @@ export function addInsert2(data) {
data: data
})
}
// 数据清洗 历史数据
export function addInsertConvert1(data) {
return request({
url: '/system/historydata/addInsertConvert1',
method: 'post',
data: data
})
}
// 数据清洗 历史数据
export function addInsertConvert2(data) {
return request({
url: '/system/historydata/addInsertConvert2',
method: 'post',
data: data
})
}
......@@ -1725,6 +1725,7 @@ export default {
this.dfrom.historyName=name+'(导入文件)';
this.dfrom.historyContent=str;
this.dfrom.identifyingCode=0;
this.dfrom.tylkStatus = 1;
let date = new Date(this.date);
......@@ -1739,6 +1740,8 @@ export default {
this.from.historyContent=strsheet;
this.from.identifyingCode=1;
this.from.date = datastr;
this.from.tylkStatus = 1;
this.from.mining = this.mining
list.push(this.from);
addInsert(list).then(response=>{
......@@ -1756,7 +1759,7 @@ export default {
exportExcel(luckysheet.getAllSheets(),fileName,trueORfalse);
// 清洗数据
selectActSuppliesHistorydata().then(response => {
selectActSuppliesHistorydata(1).then(response => {
var data = response.data;
let list=[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment