闸机出入记录功能
parent
9e0f486228
commit
de49f0fa9c
|
@ -1,6 +1,5 @@
|
||||||
package com.zcloud.controller.gatemachine;
|
package com.zcloud.controller.gatemachine;
|
||||||
|
|
||||||
import com.zcloud.aspect.DockAnnotation;
|
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,11 +33,12 @@ public class GateCarIOServiceImpl implements GateCarIOService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<PageData> getDatalistpage(Page page) {
|
public List<PageData> getDatalistpage(Page page) {
|
||||||
if ("0".equals(page.getPd().get("areaType"))) {
|
if (page.getPd().get("GATE_AREA_TYPE") != null && "1".equals(page.getPd().get("GATE_AREA_TYPE"))) {
|
||||||
return czksGateCarIOMapper.getMineralDatalistPage(page);
|
|
||||||
} else {
|
|
||||||
return czksGateCarIOMapper.getGroceryDatalistPage(page);
|
return czksGateCarIOMapper.getGroceryDatalistPage(page);
|
||||||
|
} else if (page.getPd().get("GATE_AREA_TYPE") != null) {
|
||||||
|
return czksGateCarIOMapper.getMineralDatalistPage(page);
|
||||||
}
|
}
|
||||||
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -58,9 +60,9 @@ public class GateCarIOServiceImpl implements GateCarIOService {
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void edit(PageData pd) {
|
public void edit(PageData pd) {
|
||||||
initPageDataUtil.initEdit(pd);
|
initPageDataUtil.initEdit(pd);
|
||||||
if (pd.get("GROCERY_RECORD_ID") != null && !"".equals(pd.get("GROCERY_RECORD_ID"))) {
|
if (pd.get("GATE_AREA_TYPE") != null && "1".equals(pd.get("GATE_AREA_TYPE"))) {
|
||||||
czksGateCarIOMapper.editGrocery(pd);
|
czksGateCarIOMapper.editGrocery(pd);
|
||||||
} else if (pd.get("MINERAL_RECORD_ID") != null && "".equals(pd.get("MINERAL_RECORD_ID"))) {
|
} else if (pd.get("GATE_AREA_TYPE") != null) {
|
||||||
czksGateCarIOMapper.editMineral(pd);
|
czksGateCarIOMapper.editMineral(pd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,10 +76,10 @@ public class GateCarIOServiceImpl implements GateCarIOService {
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void removeByIds(PageData pd) {
|
public void removeByIds(PageData pd) {
|
||||||
initPageDataUtil.initEdit(pd);
|
initPageDataUtil.initEdit(pd);
|
||||||
if (pd.get("GROCERY_RECORD_ID") != null && !"".equals(pd.get("GROCERY_RECORD_ID"))) {
|
if (pd.get("GATE_AREA_TYPE") != null && "1".equals(pd.get("GATE_AREA_TYPE"))) {
|
||||||
pd.put("ISDELETE", new Integer(1));
|
pd.put("ISDELETE", new Integer(1));
|
||||||
czksGateCarIOMapper.removeGroceryRecordByIds(pd);
|
czksGateCarIOMapper.removeGroceryRecordByIds(pd);
|
||||||
} else if (pd.get("MINERAL_RECORD_ID") != null && "".equals(pd.get("MINERAL_RECORD_ID"))) {
|
} else if (pd.get("GATE_AREA_TYPE") != null) {
|
||||||
pd.put("ISDELETE", new Integer(1));
|
pd.put("ISDELETE", new Integer(1));
|
||||||
czksGateCarIOMapper.removeMineralRecordByIds(pd);
|
czksGateCarIOMapper.removeMineralRecordByIds(pd);
|
||||||
}
|
}
|
||||||
|
@ -92,10 +94,10 @@ public class GateCarIOServiceImpl implements GateCarIOService {
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void save(PageData pageData) {
|
public void save(PageData pageData) {
|
||||||
initPageDataUtil.initSave(pageData, "RECORD_ID");
|
initPageDataUtil.initSave(pageData, "RECORD_ID");
|
||||||
if (pageData.get("areaType") != null && !"GROCERY".equals(pageData.get("areaType"))) {
|
if (pageData.get("GATE_AREA_TYPE") != null && "1".equals(pageData.get("GATE_AREA_TYPE"))) {
|
||||||
pageData.put("GROCERY_RECORD_ID", UuidUtil.get32UUID());
|
pageData.put("GROCERY_RECORD_ID", UuidUtil.get32UUID());
|
||||||
czksGateCarIOMapper.saveGrocery(pageData);
|
czksGateCarIOMapper.saveGrocery(pageData);
|
||||||
} else if (pageData.get("areaType") != null && "MINERAL".equals(pageData.get("areaType"))) {
|
} else if (pageData.get("GATE_AREA_TYPE") != null) {
|
||||||
pageData.put("MINERAL_RECORD_ID", UuidUtil.get32UUID());
|
pageData.put("MINERAL_RECORD_ID", UuidUtil.get32UUID());
|
||||||
czksGateCarIOMapper.saveMineral(pageData);
|
czksGateCarIOMapper.saveMineral(pageData);
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,16 +167,42 @@
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getMineralDatalistPage" resultType="com.zcloud.entity.PageData">
|
<select id="getMineralDatalistPage" resultType="pd" parameterType="com.zcloud.entity.Page">
|
||||||
select *
|
select *
|
||||||
from `qa-czks-prevention`.`work_mineral_io_record` f
|
from `qa-czks-prevention`.`work_mineral_io_record` f
|
||||||
where f.ISDELETE = 0
|
where f.ISDELETE = 0
|
||||||
|
<if test="pd.GATE_MACHINE_ID!=null and pd.GATE_MACHINE_ID!='' ">
|
||||||
|
and f.GATE_MACHINE_ID = #{pd.GATE_MACHINE_ID ,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="pd.JGSJ!=null and pd.JGSJ!='' and pd.CGSJ!=null and pd.CGSJ!=''">
|
||||||
|
and f.JGSJ <![CDATA[ >= ]]> #{pd.JGSJ ,jdbcType=VARCHAR} and f.CGSJ <![CDATA[ <= ]]>
|
||||||
|
#{pd.CGSJ ,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="pd.TRUCK_NO!=null and pd.TRUCK_NO!='' ">
|
||||||
|
and f.TRUCK_NO like CONCAT(CONCAT('%',#{pd.TRUCK_NO}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="pd.CAR_TEAM_NAME!=null and pd.CAR_TEAM_NAME!='' ">
|
||||||
|
and f.CAR_TEAM_NAME like CONCAT(CONCAT('%',#{pd.CAR_TEAM_NAME}),'%')
|
||||||
|
</if>
|
||||||
order by f.OPERATTIME desc
|
order by f.OPERATTIME desc
|
||||||
</select>
|
</select>
|
||||||
<select id="getGroceryDatalistPage" resultType="com.zcloud.entity.PageData">
|
<select id="getGroceryDatalistPage" resultType="pd" parameterType="com.zcloud.entity.Page">
|
||||||
select *
|
select *
|
||||||
from `qa-czks-prevention`.`work_grocery_io_record` f
|
from `qa-czks-prevention`.`work_grocery_io_record` f
|
||||||
where f.ISDELETE = 0
|
where f.ISDELETE = 0
|
||||||
|
<if test="pd.GATE_MACHINE_ID!=null and pd.GATE_MACHINE_ID!='' ">
|
||||||
|
and f.GATE_MACHINE_ID = #{pd.GATE_MACHINE_ID ,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="pd.JGSJ!=null and pd.JGSJ!='' and pd.CGSJ!=null and pd.CGSJ!=''">
|
||||||
|
and f.JGSJ <![CDATA[ >= ]]> #{pd.JGSJ ,jdbcType=VARCHAR} and f.CGSJ <![CDATA[ <= ]]>
|
||||||
|
#{pd.CGSJ ,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="pd.TRUCK_NO!=null and pd.TRUCK_NO!='' ">
|
||||||
|
and f.TRUCK_NO like CONCAT(CONCAT('%',#{pd.TRUCK_NO}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="pd.CAR_TEAM_NAME!=null and pd.CAR_TEAM_NAME!='' ">
|
||||||
|
and f.CAR_TEAM_NAME like CONCAT(CONCAT('%',#{pd.CAR_TEAM_NAME}),'%')
|
||||||
|
</if>
|
||||||
order by f.OPERATTIME desc
|
order by f.OPERATTIME desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue