门口门禁记录
parent
34f27ebfd4
commit
63cc479f4f
|
@ -55,16 +55,14 @@ public class GateCarIOController extends BaseController {
|
|||
}
|
||||
|
||||
@RequestMapping(value = "/getIORecords")
|
||||
public ReturnMap getIORecord(Page page) {
|
||||
PageData pageData = this.getPageData();
|
||||
page.setPd(pageData);
|
||||
return ReturnMap.ok().put("data", gateCarIOService.getIORecord(page));
|
||||
public ReturnMap getIORecord() {
|
||||
return ReturnMap.ok().put("data", gateCarIOService.getIORecord(this.getPageData()));
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/getEQCount")
|
||||
public ReturnMap getTodayEQCount() {
|
||||
PageData pageData = this.getPageData();
|
||||
return ReturnMap.ok().put("data", gateCarIOService.getTodayEQCount(pageData));
|
||||
PageData page = this.getPageData();
|
||||
return ReturnMap.ok().put("data", gateCarIOService.getTodayEQCount(page));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -16,7 +16,11 @@ public interface CzksGateCarIOMapper {
|
|||
|
||||
void saveMineral(PageData pageData);
|
||||
|
||||
List<PageData> getIORecord(Page page);
|
||||
PageData countGroceryEnterAndQuit(PageData pageData);
|
||||
PageData countMineralEnterAndQuit(PageData pageData);
|
||||
List<PageData> getIORecord(PageData pd);
|
||||
PageData countGroceryEnterAndQuit(PageData pd);
|
||||
PageData countMineralEnterAndQuit(PageData pd);
|
||||
|
||||
List<PageData> getGroceryIORecords(PageData page);
|
||||
|
||||
List<PageData> getMineralIORecords(PageData page);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ public interface GateCarIOService {
|
|||
|
||||
List<PageData> getDatalistpage(Page page);
|
||||
|
||||
List<PageData> getIORecord(Page page);
|
||||
List<PageData> getIORecord(PageData page);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -29,8 +30,12 @@ public class GateCarIOServiceImpl implements GateCarIOService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getIORecord(Page page) {
|
||||
return czksGateCarIOMapper.getIORecord(page);
|
||||
public List<PageData> getIORecord(PageData page) {
|
||||
if (page.get("areaType") != null && "1".equals(page.get("areaType").toString())) {
|
||||
return czksGateCarIOMapper.getGroceryIORecords(page);
|
||||
} else {
|
||||
return czksGateCarIOMapper.getMineralIORecords(page);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -60,10 +65,10 @@ public class GateCarIOServiceImpl implements GateCarIOService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public PageData getTodayEQCount(PageData PageData) {
|
||||
public PageData getTodayEQCount(PageData page) {
|
||||
PageData pageData = new PageData();
|
||||
pageData.put("grocery", czksGateCarIOMapper.countGroceryEnterAndQuit(PageData));
|
||||
pageData.put("mineral", czksGateCarIOMapper.countMineralEnterAndQuit(PageData));
|
||||
pageData.put("grocery", czksGateCarIOMapper.countGroceryEnterAndQuit(page));
|
||||
pageData.put("mineral", czksGateCarIOMapper.countMineralEnterAndQuit(page));
|
||||
return pageData;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,23 +63,33 @@
|
|||
#{OPERATOR},
|
||||
#{OPERATTIME})
|
||||
</insert>
|
||||
<select id="getIORecord" resultType="com.zcloud.entity.PageData">
|
||||
<select id="getGroceryIORecords" resultType="com.zcloud.entity.PageData" parameterType="pd">
|
||||
select * from
|
||||
<if test="pd.areaType != null and pd.areaType != '' and pd.areaType == '0'">
|
||||
`qa-czks-prevention`.`work_grocery_io_record` f
|
||||
where 1=1
|
||||
<if test="JGSJ != null and JGSJ != ''">
|
||||
and f.JGSJ = #{JGSJ}
|
||||
</if>
|
||||
<if test="pd.areaType != null and pd.areaType != '' and pd.areaType == '1'">
|
||||
`qa-czks-prevention`.`work_mineral_io_record` f
|
||||
<if test="LX != null and LX != ''">
|
||||
and f.LX = #{LX}
|
||||
</if>
|
||||
where
|
||||
<if test="pd.JGSJ != null and pd.JGSJ != ''">
|
||||
f.JGSJ = #{pd.JGSJ}
|
||||
<if test="TRUCK_NO != null and TRUCK_NO != ''">
|
||||
and f.TRUCK_NO like CONCAT(CONCAT('%', #{TRUCK_NO}),'%')
|
||||
</if>
|
||||
<if test="pd.LX != null and pd.LX != ''">
|
||||
and f.LX = #{pd.LX}
|
||||
order by f.OPERATTIME desc
|
||||
</select>
|
||||
<select id="getMineralIORecords" resultType="com.zcloud.entity.PageData" parameterType="pd">
|
||||
select * from
|
||||
`qa-czks-prevention`.`work_grocery_io_record` f
|
||||
where 1=1
|
||||
<if test="JGSJ != null and JGSJ != ''">
|
||||
and f.JGSJ = #{JGSJ}
|
||||
</if>
|
||||
<if test="pd.TRUCK_NO != null and pd.TRUCK_NO != ''">
|
||||
f.TRUCK_NO like CONCAT(CONCAT('%', #{pd.TRUCK_NO}),'%')
|
||||
<if test="LX != null and LX != ''">
|
||||
and f.LX = #{LX}
|
||||
</if>
|
||||
<if test="TRUCK_NO != null and TRUCK_NO != ''">
|
||||
and f.TRUCK_NO like CONCAT(CONCAT('%', #{TRUCK_NO}),'%')
|
||||
</if>
|
||||
order by f.OPERATTIME desc
|
||||
</select>
|
||||
|
@ -106,10 +116,10 @@
|
|||
OPERATTIME=#{OPERATTIME}
|
||||
where 1=1
|
||||
<if test="pd.areaType != null and pd.areaType != '' and pd.areaType == '0'">
|
||||
f.grocery_record_id=#{grocery_record_id}
|
||||
and f.grocery_record_id=#{grocery_record_id}
|
||||
</if>
|
||||
<if test="pd.areaType != null and pd.areaType != '' and pd.areaType == '1'">
|
||||
f.mineral_record_id=#{mineral_record_id}
|
||||
and f.mineral_record_id=#{mineral_record_id}
|
||||
</if>
|
||||
</update>
|
||||
<update id="removeByIds">
|
||||
|
@ -123,10 +133,10 @@
|
|||
set ISDELETE = 1
|
||||
where 1=1
|
||||
<if test="pd.areaType != null and pd.areaType != '' and pd.areaType == '0'">
|
||||
f.grocery_record_id=#{grocery_record_id}
|
||||
and f.grocery_record_id=#{grocery_record_id}
|
||||
</if>
|
||||
<if test="pd.areaType != null and pd.areaType != '' and pd.areaType == '1'">
|
||||
f.mineral_record_id=#{mineral_record_id}
|
||||
and f.mineral_record_id=#{mineral_record_id}
|
||||
</if>
|
||||
</update>
|
||||
<select id="countGroceryEnterAndQuit" resultType="com.zcloud.entity.PageData" parameterType="pageData">
|
||||
|
|
Loading…
Reference in New Issue