Commit a9907806 authored by lenovo's avatar lenovo

通用转换数据清洗

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