闸机功能
							parent
							
								
									7992101af8
								
							
						
					
					
						commit
						fbd277ae60
					
				| 
						 | 
				
			
			@ -77,12 +77,14 @@ public class GateCarIOController extends BaseController {
 | 
			
		|||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    @RequestMapping(value = "/getIORecords")
 | 
			
		||||
    public ReturnMap getIORecord() {
 | 
			
		||||
        return ReturnMap.ok().put("data", gateCarIOService.getIORecord(this.getPageData()));
 | 
			
		||||
    public ReturnMap getIORecord(Page page) {
 | 
			
		||||
        PageData pd = this.getPageData();
 | 
			
		||||
        page.setPd(pd);
 | 
			
		||||
        return ReturnMap.ok().put("data", gateCarIOService.getIORecord(page));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取在场,离场,总量计数
 | 
			
		||||
     * 获取当日计数
 | 
			
		||||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    @RequestMapping(value = "/getEQCount")
 | 
			
		||||
| 
						 | 
				
			
			@ -90,4 +92,13 @@ public class GateCarIOController extends BaseController {
 | 
			
		|||
        return ReturnMap.ok().put("data", gateCarIOService.getTodayEQCount(this.getPageData()));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取在场,离场,总量计数
 | 
			
		||||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    @RequestMapping(value = "/getEQCountAll")
 | 
			
		||||
    public ReturnMap getTodayEQCountAll() {
 | 
			
		||||
        return ReturnMap.ok().put("data", gateCarIOService.getAllEQCount(this.getPageData()));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,12 +19,13 @@ public interface CzksGateCarIOMapper {
 | 
			
		|||
    void saveMineral(PageData pageData);
 | 
			
		||||
 | 
			
		||||
    PageData countGroceryEnterAndQuit(PageData pd);
 | 
			
		||||
    PageData countGroceryEnterAndQuitAll(PageData pd);
 | 
			
		||||
 | 
			
		||||
    PageData countMineralEnterAndQuit(PageData pd);
 | 
			
		||||
    PageData countMineralEnterAndQuitAll(PageData pd);
 | 
			
		||||
 | 
			
		||||
    List<PageData> getGroceryIORecords(PageData page);
 | 
			
		||||
 | 
			
		||||
    List<PageData> getMineralIORecords(PageData page);
 | 
			
		||||
    List<PageData> getGroceryIORecords(Page page);
 | 
			
		||||
    List<PageData> getMineralIORecords(Page page);
 | 
			
		||||
 | 
			
		||||
    void removeGroceryRecordByIds(PageData pageData);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,10 +7,9 @@ import java.util.List;
 | 
			
		|||
 | 
			
		||||
public interface GateCarIOService {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    List<PageData> getDatalistpage(Page page);
 | 
			
		||||
 | 
			
		||||
    List<PageData> getIORecord(PageData page);
 | 
			
		||||
    List<PageData> getIORecord(Page page);
 | 
			
		||||
 | 
			
		||||
    void edit(PageData pd);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -19,4 +18,6 @@ public interface GateCarIOService {
 | 
			
		|||
    void save(PageData pageData);
 | 
			
		||||
 | 
			
		||||
    PageData getTodayEQCount(PageData pageData);
 | 
			
		||||
    PageData getAllEQCount(PageData pageData);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,8 +47,13 @@ public class GateCarIOServiceImpl implements GateCarIOService {
 | 
			
		|||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<PageData> getIORecord(PageData page) {
 | 
			
		||||
        return czksGateCarIOMapper.getMineralIORecords(page);
 | 
			
		||||
    public List<PageData> getIORecord(Page page) {
 | 
			
		||||
        PageData pd = page.getPd();
 | 
			
		||||
        String o = (String) pd.get("type");
 | 
			
		||||
        if ("1".equals(o)) {
 | 
			
		||||
            return czksGateCarIOMapper.getMineralIORecords(page);
 | 
			
		||||
        }
 | 
			
		||||
        return czksGateCarIOMapper.getGroceryIORecords(page);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
| 
						 | 
				
			
			@ -109,10 +114,18 @@ public class GateCarIOServiceImpl implements GateCarIOService {
 | 
			
		|||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public PageData getTodayEQCount(PageData page) {
 | 
			
		||||
    public PageData getTodayEQCount(PageData pd) {
 | 
			
		||||
        PageData pageData = new PageData();
 | 
			
		||||
        pageData.put("grocery", czksGateCarIOMapper.countGroceryEnterAndQuit(page));
 | 
			
		||||
        pageData.put("mineral", czksGateCarIOMapper.countMineralEnterAndQuit(page));
 | 
			
		||||
        pageData.put("grocery", czksGateCarIOMapper.countGroceryEnterAndQuit(pd));
 | 
			
		||||
        pageData.put("mineral", czksGateCarIOMapper.countMineralEnterAndQuit(pd));
 | 
			
		||||
        return pageData;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public PageData getAllEQCount(PageData pd) {
 | 
			
		||||
        PageData pageData = new PageData();
 | 
			
		||||
        pageData.put("grocery", czksGateCarIOMapper.countGroceryEnterAndQuitAll(pd));
 | 
			
		||||
        pageData.put("mineral", czksGateCarIOMapper.countMineralEnterAndQuitAll(pd));
 | 
			
		||||
        return pageData;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,28 +67,28 @@
 | 
			
		|||
        select * from
 | 
			
		||||
        `qa-czks-prevention`.`work_grocery_io_record` f
 | 
			
		||||
        where 1=1
 | 
			
		||||
        <if test="JGSJ != null and JGSJ != ''">
 | 
			
		||||
        <if test="pd.JGSJ != null and pd.JGSJ != ''">
 | 
			
		||||
            and f.JGSJ = #{JGSJ}
 | 
			
		||||
        </if>
 | 
			
		||||
        <if test="LX != null and LX != ''">
 | 
			
		||||
        <if test="pd.LX != null and pd.LX != ''">
 | 
			
		||||
            and f.LX = #{LX}
 | 
			
		||||
        </if>
 | 
			
		||||
        <if test="TRUCK_NO != null and TRUCK_NO != ''">
 | 
			
		||||
        <if test="pd.TRUCK_NO != null and pd.TRUCK_NO != ''">
 | 
			
		||||
            and f.TRUCK_NO like CONCAT(CONCAT('%', #{TRUCK_NO}),'%')
 | 
			
		||||
        </if>
 | 
			
		||||
        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
 | 
			
		||||
        `qa-czks-prevention`.`work_mineral_io_record` f
 | 
			
		||||
        where 1=1
 | 
			
		||||
        <if test="JGSJ != null and JGSJ != ''">
 | 
			
		||||
        <if test="pd.JGSJ != null and pd.JGSJ != ''">
 | 
			
		||||
            and f.JGSJ = #{JGSJ}
 | 
			
		||||
        </if>
 | 
			
		||||
        <if test="LX != null and LX != ''">
 | 
			
		||||
        <if test="pd.LX != null and pd.LX != ''">
 | 
			
		||||
            and f.LX = #{LX}
 | 
			
		||||
        </if>
 | 
			
		||||
        <if test="TRUCK_NO != null and TRUCK_NO != ''">
 | 
			
		||||
        <if test="pd.TRUCK_NO != null and pd.TRUCK_NO != ''">
 | 
			
		||||
            and f.TRUCK_NO like CONCAT(CONCAT('%', #{TRUCK_NO}),'%')
 | 
			
		||||
        </if>
 | 
			
		||||
        order by f.OPERATTIME desc
 | 
			
		||||
| 
						 | 
				
			
			@ -142,7 +142,7 @@
 | 
			
		|||
        where 1 = 1
 | 
			
		||||
          and MINERAL_RECORD_ID = #{MINERAL_RECORD_ID ,jdbcType=VARCHAR}
 | 
			
		||||
    </update>
 | 
			
		||||
    <select id="countGroceryEnterAndQuit" resultType="com.zcloud.entity.PageData">
 | 
			
		||||
    <select id="countGroceryEnterAndQuit" resultType="pd" parameterType="pd">
 | 
			
		||||
        select
 | 
			
		||||
        count(case when g.PASS_TYPE = '0' then 0 end) as `entered`,
 | 
			
		||||
        count(case when g.PASS_TYPE = '1' then 1 end) as `quited`
 | 
			
		||||
| 
						 | 
				
			
			@ -150,11 +150,9 @@
 | 
			
		|||
        `qa-czks-prevention`.`work_grocery_io_record` g
 | 
			
		||||
        where
 | 
			
		||||
        g.ISDELETE = 0
 | 
			
		||||
        <if test="pageData.CREATTIME != null and pageData.CREATTIME != ''">
 | 
			
		||||
            and day(g.CREATTIME) = day(NOW());
 | 
			
		||||
        </if>
 | 
			
		||||
        and day(g.CREATTIME) = day(NOW())
 | 
			
		||||
    </select>
 | 
			
		||||
    <select id="countMineralEnterAndQuit" resultType="com.zcloud.entity.PageData">
 | 
			
		||||
    <select id="countMineralEnterAndQuit" resultType="pd" parameterType="pd">
 | 
			
		||||
        select
 | 
			
		||||
        count(case when m.PASS_TYPE = '0' then 0 end) as `entered`,
 | 
			
		||||
        count(case when m.PASS_TYPE = '1' then 1 end) as `quited`
 | 
			
		||||
| 
						 | 
				
			
			@ -162,9 +160,25 @@
 | 
			
		|||
        `qa-czks-prevention`.`work_mineral_io_record` m
 | 
			
		||||
        where
 | 
			
		||||
        m.ISDELETE = 0
 | 
			
		||||
        <if test="pageData.CREATTIME != null and pageData.CREATTIME != ''">
 | 
			
		||||
            and day(m.CREATTIME) = day(NOW());
 | 
			
		||||
        </if>
 | 
			
		||||
        and day(m.CREATTIME) = day(NOW())
 | 
			
		||||
    </select>
 | 
			
		||||
    <select id="countGroceryEnterAndQuitAll" resultType="pd" parameterType="pd">
 | 
			
		||||
        select
 | 
			
		||||
            count(case when g.PASS_TYPE = '0' then 0 end) as `entered`,
 | 
			
		||||
            count(case when g.PASS_TYPE = '1' then 1 end) as `quited`
 | 
			
		||||
        from
 | 
			
		||||
            `qa-czks-prevention`.`work_grocery_io_record` g
 | 
			
		||||
        where
 | 
			
		||||
            g.ISDELETE = 0
 | 
			
		||||
    </select>
 | 
			
		||||
    <select id="countMineralEnterAndQuitAll" resultType="pd" parameterType="pd">
 | 
			
		||||
        select
 | 
			
		||||
            count(case when m.PASS_TYPE = '0' then 0 end) as `entered`,
 | 
			
		||||
            count(case when m.PASS_TYPE = '1' then 1 end) as `quited`
 | 
			
		||||
        from
 | 
			
		||||
            `qa-czks-prevention`.`work_mineral_io_record` m
 | 
			
		||||
        where
 | 
			
		||||
            m.ISDELETE = 0
 | 
			
		||||
    </select>
 | 
			
		||||
 | 
			
		||||
    <select id="getMineralDatalistPage" resultType="pd" parameterType="com.zcloud.entity.Page">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue