试运行问题修改
This commit is contained in:
parent
e1928139b7
commit
d74109015c
|
|
@ -217,7 +217,7 @@ public class TmTaskController extends BaseController {
|
||||||
leaseApplyInfo.setCompanyId(leaseApplyDetailsList.get(0).getCompanyId()); // 设置设备所属分公司,用于交给哪家审核
|
leaseApplyInfo.setCompanyId(leaseApplyDetailsList.get(0).getCompanyId()); // 设置设备所属分公司,用于交给哪家审核
|
||||||
leaseApplyInfo.setType("2"); // 设置审批层级,先固定2层,后期根据接口传入Type区分来源设定
|
leaseApplyInfo.setType("2"); // 设置审批层级,先固定2层,后期根据接口传入Type区分来源设定
|
||||||
leaseApplyInfo.setLeaseType(task.getLeaseType());
|
leaseApplyInfo.setLeaseType(task.getLeaseType());
|
||||||
leaseApplyInfo.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
leaseApplyInfo.setCreateBy(task.getUserId());
|
||||||
leaseApplyInfo.setEstimateLeaseTime(task.getEstimateLeaseTime());
|
leaseApplyInfo.setEstimateLeaseTime(task.getEstimateLeaseTime());
|
||||||
|
|
||||||
// 创建领料任务,返回领料任务编号
|
// 创建领料任务,返回领料任务编号
|
||||||
|
|
|
||||||
|
|
@ -1230,6 +1230,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
leaseApplyInfo.setCompanyId(leaseApplyDetail.getCompanyId());
|
leaseApplyInfo.setCompanyId(leaseApplyDetail.getCompanyId());
|
||||||
leaseApplyInfo.setEstimateLeaseTime(task.getEstimateLeaseTime());
|
leaseApplyInfo.setEstimateLeaseTime(task.getEstimateLeaseTime());
|
||||||
leaseApplyInfo.setLeaseType(task.getLeaseType());
|
leaseApplyInfo.setLeaseType(task.getLeaseType());
|
||||||
|
leaseApplyInfo.setCreateBy(task.getUserId());
|
||||||
res = leaseApplyInfoMapper.insert(leaseApplyInfo);
|
res = leaseApplyInfoMapper.insert(leaseApplyInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,7 @@ public class WarehouseKeeperController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取库管员配置列表")
|
@ApiOperation(value = "获取库管员配置列表")
|
||||||
@GetMapping("/warehouseKeeperInfoAll")
|
@GetMapping("/warehouseKeeperInfoAll")
|
||||||
public TableDataInfo getWarehouseKeeperInfoAll(WarehouseKeeper bean)
|
public TableDataInfo getWarehouseKeeperInfoAll(WarehouseKeeper bean) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<WarehouseKeeper> list = warehouseKeeperService.getWarehouseKeeperInfoAll(bean);
|
List<WarehouseKeeper> list = warehouseKeeperService.getWarehouseKeeperInfoAll(bean);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
|
@ -41,20 +40,26 @@ public class WarehouseKeeperController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库管员配置-根据人员名称查询左侧列表
|
* 库管员配置-根据人员名称查询左侧列表
|
||||||
|
*
|
||||||
* @param userName
|
* @param userName
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "库管员配置-根据人员名称查询左侧列表")
|
@ApiOperation(value = "库管员配置-根据人员名称查询左侧列表")
|
||||||
@GetMapping("/getMaUserList")
|
@GetMapping("/getMaUserList")
|
||||||
public AjaxResult getMaUserList(String userName){
|
public AjaxResult getMaUserList(String userName) {
|
||||||
return AjaxResult.success(warehouseKeeperService.getMaUserList(userName));
|
return AjaxResult.success(warehouseKeeperService.getMaUserList(userName));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("库管员配置-保存")
|
@ApiOperation("库管员配置-保存")
|
||||||
@Log(title = "库管员配置-保存", businessType = BusinessType.INSERT)
|
@Log(title = "库管员配置-保存", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/addList")
|
@PostMapping("/addList")
|
||||||
public AjaxResult add(@Validated @RequestBody WarehouseKeeper bean)
|
public AjaxResult add(@Validated @RequestBody WarehouseKeeper bean) {
|
||||||
{
|
int add = warehouseKeeperService.add(bean);
|
||||||
return toAjax(warehouseKeeperService.add(bean));
|
if (add == 1) {
|
||||||
|
return AjaxResult.success("绑定成功");
|
||||||
|
} else {
|
||||||
|
return AjaxResult.error("该库管员已绑定该设备");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -62,8 +67,7 @@ public class WarehouseKeeperController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "库管员配置-删除")
|
@ApiOperation(value = "库管员配置-删除")
|
||||||
@PostMapping("/remove")
|
@PostMapping("/remove")
|
||||||
public AjaxResult remove(@Validated @RequestBody WarehouseKeeper bean )
|
public AjaxResult remove(@Validated @RequestBody WarehouseKeeper bean) {
|
||||||
{
|
|
||||||
return toAjax(warehouseKeeperService.deleteByIds(bean));
|
return toAjax(warehouseKeeperService.deleteByIds(bean));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,4 +50,6 @@ public interface WarehouseKeeperMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int deleteByIdsAll(String[] typeIds);
|
int deleteByIdsAll(String[] typeIds);
|
||||||
|
|
||||||
|
List<Integer> getUsers(String typeId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,11 +35,18 @@ public class WarehouseKeeperServiceImpl implements WarehouseKeeperService {
|
||||||
public int add(WarehouseKeeper bean) {
|
public int add(WarehouseKeeper bean) {
|
||||||
List<WarehouseKeeper> list = new ArrayList<>();
|
List<WarehouseKeeper> list = new ArrayList<>();
|
||||||
String typeIds = bean.getTypeIds();
|
String typeIds = bean.getTypeIds();
|
||||||
|
int i = 0;
|
||||||
if (StringHelper.isNotEmpty(typeIds)) {
|
if (StringHelper.isNotEmpty(typeIds)) {
|
||||||
String[] splitTypeIds = typeIds.split("@");
|
String[] splitTypeIds = typeIds.split("@");
|
||||||
//先删除,在去添加
|
|
||||||
// warehouseKeeperMapper.deleteByIdsAll(splitTypeIds);
|
// warehouseKeeperMapper.deleteByIdsAll(splitTypeIds);
|
||||||
for (String typeId : splitTypeIds) {
|
for (String typeId : splitTypeIds) {
|
||||||
|
//先判断当前库管员已经绑定了该设备
|
||||||
|
List<Integer> users = warehouseKeeperMapper.getUsers(typeId);
|
||||||
|
for (Integer user : users) {
|
||||||
|
if (user.equals(bean.getUserId().intValue())) {
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
WarehouseKeeper beans = new WarehouseKeeper();
|
WarehouseKeeper beans = new WarehouseKeeper();
|
||||||
beans.setTypeIds(typeId);
|
beans.setTypeIds(typeId);
|
||||||
beans.setUserId(bean.getUserId());
|
beans.setUserId(bean.getUserId());
|
||||||
|
|
@ -47,7 +54,7 @@ public class WarehouseKeeperServiceImpl implements WarehouseKeeperService {
|
||||||
list.add(beans);
|
list.add(beans);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int i = 0;
|
|
||||||
if (list.size() > 0) {
|
if (list.size() > 0) {
|
||||||
i = warehouseKeeperMapper.add(list);
|
i = warehouseKeeperMapper.add(list);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -937,7 +937,7 @@
|
||||||
</select>
|
</select>
|
||||||
<select id="getAuditListByLeaseTmTaskByPeople" resultType="com.bonus.sgzb.app.domain.TmTask">
|
<select id="getAuditListByLeaseTmTaskByPeople" resultType="com.bonus.sgzb.app.domain.TmTask">
|
||||||
SELECT DISTINCT
|
SELECT DISTINCT
|
||||||
tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName,su.nick_name as nickName,
|
tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName,su.nick_name as nickName,su.user_id as userId,
|
||||||
bpl.lot_id as proId,bpl.lot_name as proName,
|
bpl.lot_id as proId,bpl.lot_name as proName,
|
||||||
bui.unit_id as unitId,bui.unit_name as unitName,
|
bui.unit_id as unitId,bui.unit_name as unitName,
|
||||||
lai.lease_person as leasePerson, lai.phone as leasePhone, tt.create_by as applyFor,d.`name` as taskName,lai.lease_type as leaseType,lai.estimate_lease_time as estimateLeaseTime,
|
lai.lease_person as leasePerson, lai.phone as leasePhone, tt.create_by as applyFor,d.`name` as taskName,lai.lease_type as leaseType,lai.estimate_lease_time as estimateLeaseTime,
|
||||||
|
|
@ -1082,7 +1082,7 @@
|
||||||
mt.type_name as typeModelName,
|
mt.type_name as typeModelName,
|
||||||
mt.manage_type as manageType,
|
mt.manage_type as manageType,
|
||||||
mt.num as num,
|
mt.num as num,
|
||||||
su.user_name as userName,
|
GROUP_CONCAT(su.user_name) as userName,
|
||||||
lad.status as status,
|
lad.status as status,
|
||||||
lad.type_id as typeId
|
lad.type_id as typeId
|
||||||
FROM
|
FROM
|
||||||
|
|
@ -1103,6 +1103,7 @@
|
||||||
<if test="typeId != null and typeId != ''">
|
<if test="typeId != null and typeId != ''">
|
||||||
and lad.type_id = #{typeId}
|
and lad.type_id = #{typeId}
|
||||||
</if>
|
</if>
|
||||||
|
GROUP BY lad.type_id
|
||||||
</select>
|
</select>
|
||||||
<select id="getMaTypeDetails" resultType="com.bonus.sgzb.app.domain.TmTask">
|
<select id="getMaTypeDetails" resultType="com.bonus.sgzb.app.domain.TmTask">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
||||||
|
|
@ -57,4 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</if>
|
</if>
|
||||||
ORDER BY su.user_id DESC
|
ORDER BY su.user_id DESC
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getUsers" resultType="java.lang.Integer">
|
||||||
|
select user_id from ma_type_keeper where type_id = #{typeId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue