添加轮档入库分类记录模块

master
wg 3 months ago
parent 2692d5f280
commit ca8a5c661c

@ -1,6 +1,9 @@
package com.ruoyi.manage.controller;
import java.util.List;
import com.github.pagehelper.Page;
import com.ruoyi.manage.domain.RecordInSort;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -30,6 +33,8 @@ import com.ruoyi.common.core.page.TableDataInfo;
public class RecordInController extends BaseController
{
private String prefix = "manage/record_in";
private String prefix2 = "manage/record_in_sort";
@Autowired
private IRecordInService recordInService;
@ -41,7 +46,38 @@ public class RecordInController extends BaseController
return prefix + "/record_in";
}
@RequiresPermissions("manage:record_in_sort:view")
@GetMapping("/record_in_sort")
public String record_in_sort()
{
return prefix2 + "/record_in_sort";
}
/**
*
*/
@RequiresPermissions("manage:record_in:sort_list")
@PostMapping("/sort_list")
@ResponseBody
public TableDataInfo sort_list(RecordInSort recordInSort)
{
startPage();
List<RecordInSort> list = recordInService.selectRecordInSortList(recordInSort);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("manage:record_in:sort_list")
@PostMapping("/sort_BatchCode")
@ResponseBody
public TableDataInfo selectByBatchCode(String batchCode)
{
startPage();
List<RecordIn> list = recordInService.selectByBatchCode(batchCode);
return getDataTable(list);
}
/**
*
*
*/
@RequiresPermissions("manage:record_in:list")

@ -2,6 +2,7 @@ package com.ruoyi.manage.mapper;
import java.util.List;
import com.ruoyi.manage.domain.RecordIn;
import com.ruoyi.manage.domain.RecordInSort;
import org.springframework.stereotype.Repository;
/**
* Mapper
@ -59,4 +60,19 @@ public interface RecordInMapper
* @return
*/
public int deleteRecordInByObjids(String[] objids);
/**
*
*
* @param recordInSort
* @return
*/
List<RecordInSort> selectRecordInSortList(RecordInSort recordInSort);
/**
*
*
* @param batchCode
* @return
*/
public List<RecordIn> selectByBatchCode(String batchCode);
}

@ -2,6 +2,7 @@ package com.ruoyi.manage.service;
import java.util.List;
import com.ruoyi.manage.domain.RecordIn;
import com.ruoyi.manage.domain.RecordInSort;
/**
* Service
@ -58,4 +59,18 @@ public interface IRecordInService
* @return
*/
public int deleteRecordInByObjid(Long objid);
/**
*
*
* @param recordInSort
* @return
*/
List<RecordInSort> selectRecordInSortList(RecordInSort recordInSort);
/**
*
*
* @param
* @return
*/
public List<RecordIn> selectByBatchCode(String bathCode);
}

@ -5,6 +5,7 @@ import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.manage.domain.RecordInSort;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.manage.mapper.RecordInMapper;
@ -90,4 +91,24 @@ public class RecordInServiceImpl implements IRecordInService {
public int deleteRecordInByObjid(Long objid) {
return recordInMapper.deleteRecordInByObjid(objid);
}
/**
*
*
* @param recordInSort
* @return
*/
@Override
public List<RecordInSort> selectRecordInSortList(RecordInSort recordInSort) {
return recordInMapper.selectRecordInSortList(recordInSort);
}
/**
*
*
* @param
* @return
*/
@Override
public List<RecordIn> selectByBatchCode(String batchCode) {
return recordInMapper.selectByBatchCode(batchCode);
}
}

@ -14,7 +14,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<resultMap type="RecordInSort" id="RecordInSortResult">
<!-- <result property="objid" column="objid" />-->
<result property="batchCode" column="batch_code" />
<result property="createTime" column="create_time" />
<result property="recordCount" column="record_count" />
<!-- <result property="remark" column="remark" />-->
<!-- <result property="createBy" column="create_by" />-->
</resultMap>
<sql id="selectRecordInVo">
select objid, epc_code, batch_code, location_code, manufacturer_Name, remark, create_by, create_time from record_in
</sql>
@ -34,6 +41,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where objid = #{objid}
</select>
<select id="selectRecordInSortList" resultMap="RecordInSortResult">
SELECT batch_code, create_time, COUNT(*) AS record_count
FROM record_in
GROUP BY batch_code
ORDER BY batch_code
</select>
<select id="selectByBatchCode" parameterType="String" resultMap="RecordInResult">
SELECT * FROM record_in WHERE batch_code = #{batchCode}
</select>
<insert id="insertRecordIn" parameterType="RecordIn" useGeneratedKeys="true" keyProperty="objid">
insert into record_in
<trim prefix="(" suffix=")" suffixOverrides=",">

Loading…
Cancel
Save