change - 修改班组、员工管理

main
yinq 6 months ago
parent 0cccc11761
commit b154069c9d

@ -46,6 +46,16 @@ public class BaseDeviceLedgerController extends BaseController
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")
public AjaxResult getBaseTeamMembers(BaseTeamMembers baseTeamMembers) {
@GetMapping("/getTeamMembers")
public AjaxResult getTeamMembers(BaseTeamMembers baseTeamMembers) {
List<BaseTeamMembers> list = baseTeamMembersService.selectBaseTeamMembersList(baseTeamMembers);
return success(list);
}

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

@ -38,11 +38,17 @@ public class BaseTeamMembers extends BaseEntity {
private String teamHead;
/**
*
*
*/
@Excel(name = "所属工位")
@Excel(name = "所属工位编号")
private String stationCode;
/**
*
*/
@Excel(name = "所属工位名称")
private String stationName;
/**
* 1 2
*/
@ -79,6 +85,28 @@ public class BaseTeamMembers extends BaseEntity {
@Excel(name = "机台编号")
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) {
this.objId = objId;
}

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

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

Loading…
Cancel
Save