change - 修改班组、员工管理

main
yinq 6 months ago
parent 0cccc11761
commit b154069c9d

@ -46,6 +46,16 @@ public class BaseDeviceLedgerController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
*
*/
@GetMapping("/getDeviceLedger")
public AjaxResult getDeviceLedger(BaseDeviceLedger baseDeviceLedger)
{
List<BaseDeviceLedger> list = baseDeviceLedgerService.selectBaseDeviceLedgerList(baseDeviceLedger);
return success(list);
}
/** /**
* *
*/ */

@ -48,8 +48,8 @@ public class BaseTeamMembersController extends BaseController {
/** /**
* *
*/ */
@GetMapping("/getBaseTeamMembers") @GetMapping("/getTeamMembers")
public AjaxResult getBaseTeamMembers(BaseTeamMembers baseTeamMembers) { public AjaxResult getTeamMembers(BaseTeamMembers baseTeamMembers) {
List<BaseTeamMembers> list = baseTeamMembersService.selectBaseTeamMembersList(baseTeamMembers); List<BaseTeamMembers> list = baseTeamMembersService.selectBaseTeamMembersList(baseTeamMembers);
return success(list); return success(list);
} }

@ -49,6 +49,12 @@ public class BaseStaffInfo extends BaseEntity {
@Excel(name = "班组编号") @Excel(name = "班组编号")
private String teamCode; private String teamCode;
/**
*
*/
@Excel(name = "班组名称")
private String teamName;
/** /**
* *
*/ */
@ -72,6 +78,14 @@ public class BaseStaffInfo extends BaseEntity {
*/ */
private String delFlag; private String delFlag;
public String getTeamName() {
return teamName;
}
public void setTeamName(String teamName) {
this.teamName = teamName;
}
public void setObjId(Long objId) { public void setObjId(Long objId) {
this.objId = objId; this.objId = objId;
} }

@ -38,11 +38,17 @@ public class BaseTeamMembers extends BaseEntity {
private String teamHead; private String teamHead;
/** /**
* *
*/ */
@Excel(name = "所属工位") @Excel(name = "所属工位编号")
private String stationCode; private String stationCode;
/**
*
*/
@Excel(name = "所属工位名称")
private String stationName;
/** /**
* 1 2 * 1 2
*/ */
@ -79,6 +85,28 @@ public class BaseTeamMembers extends BaseEntity {
@Excel(name = "机台编号") @Excel(name = "机台编号")
private String machineCode; private String machineCode;
/**
*
*/
@Excel(name = "机台名称")
private String machineName;
public String getStationName() {
return stationName;
}
public void setStationName(String stationName) {
this.stationName = stationName;
}
public String getMachineName() {
return machineName;
}
public void setMachineName(String machineName) {
this.machineName = machineName;
}
public void setObjId(Long objId) { public void setObjId(Long objId) {
this.objId = objId; this.objId = objId;
} }

@ -11,6 +11,7 @@
<result property="staffType" column="staff_type"/> <result property="staffType" column="staff_type"/>
<result property="cardId" column="card_id"/> <result property="cardId" column="card_id"/>
<result property="teamCode" column="team_code"/> <result property="teamCode" column="team_code"/>
<result property="teamName" column="team_name"/>
<result property="phoneNumber" column="phone_number"/> <result property="phoneNumber" column="phone_number"/>
<result property="sex" column="sex"/> <result property="sex" column="sex"/>
<result property="passWord" column="pass_word"/> <result property="passWord" column="pass_word"/>
@ -23,41 +24,43 @@
</resultMap> </resultMap>
<sql id="selectBaseStaffInfoVo"> <sql id="selectBaseStaffInfoVo">
select obj_id, select bsi.obj_id,
staff_id, bsi.staff_id,
staff_name, bsi.staff_name,
staff_type, bsi.staff_type,
card_id, bsi.card_id,
team_code, bsi.team_code,
phone_number, btm.team_name,
sex, bsi.phone_number,
pass_word, bsi.sex,
del_flag, bsi.pass_word,
create_by, bsi.del_flag,
create_time, bsi.create_by,
update_by, bsi.create_time,
update_time, bsi.update_by,
remark bsi.update_time,
from base_staff_info bsi.remark
from base_staff_info bsi
left join base_team_members btm on btm.team_code = bsi.team_code
</sql> </sql>
<select id="selectBaseStaffInfoList" parameterType="BaseStaffInfo" resultMap="BaseStaffInfoResult"> <select id="selectBaseStaffInfoList" parameterType="BaseStaffInfo" resultMap="BaseStaffInfoResult">
<include refid="selectBaseStaffInfoVo"/> <include refid="selectBaseStaffInfoVo"/>
<where> <where>
<if test="staffId != null and staffId != ''">and staff_id = #{staffId}</if> <if test="staffId != null and staffId != ''">and bsi.staff_id = #{staffId}</if>
<if test="staffName != null and staffName != ''">and staff_name like concat('%', #{staffName}, '%')</if> <if test="staffName != null and staffName != ''">and bsi.staff_name like concat('%', #{staffName}, '%')</if>
<if test="staffType != null and staffType != ''">and staff_type = #{staffType}</if> <if test="staffType != null and staffType != ''">and bsi.staff_type = #{staffType}</if>
<if test="cardId != null and cardId != ''">and card_id = #{cardId}</if> <if test="cardId != null and cardId != ''">and bsi.card_id = #{cardId}</if>
<if test="teamCode != null and teamCode != ''">and team_code = #{teamCode}</if> <if test="teamCode != null and teamCode != ''">and bsi.team_code = #{teamCode}</if>
<if test="phoneNumber != null and phoneNumber != ''">and phone_number = #{phoneNumber}</if> <if test="phoneNumber != null and phoneNumber != ''">and bsi.phone_number = #{phoneNumber}</if>
<if test="sex != null and sex != ''">and sex = #{sex}</if> <if test="sex != null and sex != ''">and bsi.sex = #{sex}</if>
<if test="passWord != null and passWord != ''">and pass_word = #{passWord}</if> <if test="passWord != null and passWord != ''">and bsi.pass_word = #{passWord}</if>
</where> </where>
</select> </select>
<select id="selectBaseStaffInfoByObjId" parameterType="Long" resultMap="BaseStaffInfoResult"> <select id="selectBaseStaffInfoByObjId" parameterType="Long" resultMap="BaseStaffInfoResult">
<include refid="selectBaseStaffInfoVo"/> <include refid="selectBaseStaffInfoVo"/>
where obj_id = #{objId} where bsi.obj_id = #{objId}
</select> </select>
<insert id="insertBaseStaffInfo" parameterType="BaseStaffInfo" useGeneratedKeys="true" keyProperty="objId"> <insert id="insertBaseStaffInfo" parameterType="BaseStaffInfo" useGeneratedKeys="true" keyProperty="objId">

@ -10,6 +10,7 @@
<result property="teamName" column="team_name"/> <result property="teamName" column="team_name"/>
<result property="teamHead" column="team_head"/> <result property="teamHead" column="team_head"/>
<result property="stationCode" column="station_code"/> <result property="stationCode" column="station_code"/>
<result property="stationName" column="station_name"/>
<result property="classes" column="classes"/> <result property="classes" column="classes"/>
<result property="startTime" column="start_time"/> <result property="startTime" column="start_time"/>
<result property="endTime" column="end_time"/> <result property="endTime" column="end_time"/>
@ -20,46 +21,51 @@
<result property="updateBy" column="update_by"/> <result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/> <result property="updateTime" column="update_time"/>
<result property="machineCode" column="machine_code"/> <result property="machineCode" column="machine_code"/>
<result property="machineName" column="machine_name"/>
</resultMap> </resultMap>
<sql id="selectBaseTeamMembersVo"> <sql id="selectBaseTeamMembersVo">
select obj_id, select btm.obj_id,
team_code, btm.team_code,
team_name, btm.team_name,
team_head, btm.team_head,
station_code, btm.station_code,
classes, bpl.product_line_name station_name,
start_time, btm.classes,
end_time, btm.start_time,
dine_time, btm.end_time,
is_flag, btm.dine_time,
create_by, btm.is_flag,
create_time, btm.create_by,
update_by, btm.create_time,
update_time, btm.update_by,
machine_code btm.update_time,
from base_team_members btm.machine_code,
bdl.device_name machine_name
from base_team_members btm
left join base_product_line bpl on bpl.product_line_code = btm.station_code
left join base_device_ledger bdl on bdl.device_code = btm.machine_code
</sql> </sql>
<select id="selectBaseTeamMembersList" parameterType="BaseTeamMembers" resultMap="BaseTeamMembersResult"> <select id="selectBaseTeamMembersList" parameterType="BaseTeamMembers" resultMap="BaseTeamMembersResult">
<include refid="selectBaseTeamMembersVo"/> <include refid="selectBaseTeamMembersVo"/>
<where> <where>
<if test="teamCode != null and teamCode != ''">and team_code = #{teamCode}</if> <if test="teamCode != null and teamCode != ''">and btm.team_code = #{teamCode}</if>
<if test="teamName != null and teamName != ''">and team_name like concat('%', #{teamName}, '%')</if> <if test="teamName != null and teamName != ''">and btm.team_name like concat('%', #{teamName}, '%')</if>
<if test="teamHead != null and teamHead != ''">and team_head = #{teamHead}</if> <if test="teamHead != null and teamHead != ''">and btm.team_head = #{teamHead}</if>
<if test="stationCode != null and stationCode != ''">and station_code = #{stationCode}</if> <if test="stationCode != null and stationCode != ''">and btm.station_code = #{stationCode}</if>
<if test="classes != null and classes != ''">and classes = #{classes}</if> <if test="classes != null and classes != ''">and btm.classes = #{classes}</if>
<if test="startTime != null and startTime != ''">and start_time = #{startTime}</if> <if test="startTime != null and startTime != ''">and btm.start_time = #{startTime}</if>
<if test="endTime != null and endTime != ''">and end_time = #{endTime}</if> <if test="endTime != null and endTime != ''">and btm.end_time = #{endTime}</if>
<if test="dineTime != null and dineTime != ''">and dine_time = #{dineTime}</if> <if test="dineTime != null and dineTime != ''">and btm.dine_time = #{dineTime}</if>
<if test="isFlag != null and isFlag != ''">and is_flag = #{isFlag}</if> <if test="isFlag != null and isFlag != ''">and btm.is_flag = #{isFlag}</if>
<if test="machineCode != null and machineCode != ''">and machine_code = #{machineCode}</if> <if test="machineCode != null and machineCode != ''">and btm.machine_code = #{machineCode}</if>
</where> </where>
</select> </select>
<select id="selectBaseTeamMembersByObjId" parameterType="Long" resultMap="BaseTeamMembersResult"> <select id="selectBaseTeamMembersByObjId" parameterType="Long" resultMap="BaseTeamMembersResult">
<include refid="selectBaseTeamMembersVo"/> <include refid="selectBaseTeamMembersVo"/>
where obj_id = #{objId} where btm.obj_id = #{objId}
</select> </select>
<insert id="insertBaseTeamMembers" parameterType="BaseTeamMembers" useGeneratedKeys="true" keyProperty="objId"> <insert id="insertBaseTeamMembers" parameterType="BaseTeamMembers" useGeneratedKeys="true" keyProperty="objId">

Loading…
Cancel
Save