试运行问题修改
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.setType("2"); // 设置审批层级,先固定2层,后期根据接口传入Type区分来源设定
|
||||
leaseApplyInfo.setLeaseType(task.getLeaseType());
|
||||
leaseApplyInfo.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
leaseApplyInfo.setCreateBy(task.getUserId());
|
||||
leaseApplyInfo.setEstimateLeaseTime(task.getEstimateLeaseTime());
|
||||
|
||||
// 创建领料任务,返回领料任务编号
|
||||
|
|
|
|||
|
|
@ -1230,6 +1230,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
leaseApplyInfo.setCompanyId(leaseApplyDetail.getCompanyId());
|
||||
leaseApplyInfo.setEstimateLeaseTime(task.getEstimateLeaseTime());
|
||||
leaseApplyInfo.setLeaseType(task.getLeaseType());
|
||||
leaseApplyInfo.setCreateBy(task.getUserId());
|
||||
res = leaseApplyInfoMapper.insert(leaseApplyInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@ public class WarehouseKeeperController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "获取库管员配置列表")
|
||||
@GetMapping("/warehouseKeeperInfoAll")
|
||||
public TableDataInfo getWarehouseKeeperInfoAll(WarehouseKeeper bean)
|
||||
{
|
||||
public TableDataInfo getWarehouseKeeperInfoAll(WarehouseKeeper bean) {
|
||||
startPage();
|
||||
List<WarehouseKeeper> list = warehouseKeeperService.getWarehouseKeeperInfoAll(bean);
|
||||
return getDataTable(list);
|
||||
|
|
@ -41,6 +40,7 @@ public class WarehouseKeeperController extends BaseController {
|
|||
|
||||
/**
|
||||
* 库管员配置-根据人员名称查询左侧列表
|
||||
*
|
||||
* @param userName
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -49,12 +49,17 @@ public class WarehouseKeeperController extends BaseController {
|
|||
public AjaxResult getMaUserList(String userName) {
|
||||
return AjaxResult.success(warehouseKeeperService.getMaUserList(userName));
|
||||
}
|
||||
|
||||
@ApiOperation("库管员配置-保存")
|
||||
@Log(title = "库管员配置-保存", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/addList")
|
||||
public AjaxResult add(@Validated @RequestBody WarehouseKeeper bean)
|
||||
{
|
||||
return toAjax(warehouseKeeperService.add(bean));
|
||||
public AjaxResult add(@Validated @RequestBody WarehouseKeeper bean) {
|
||||
int add = warehouseKeeperService.add(bean);
|
||||
if (add == 1) {
|
||||
return AjaxResult.success("绑定成功");
|
||||
} else {
|
||||
return AjaxResult.error("该库管员已绑定该设备");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -62,8 +67,7 @@ public class WarehouseKeeperController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "库管员配置-删除")
|
||||
@PostMapping("/remove")
|
||||
public AjaxResult remove(@Validated @RequestBody WarehouseKeeper bean )
|
||||
{
|
||||
public AjaxResult remove(@Validated @RequestBody WarehouseKeeper bean) {
|
||||
return toAjax(warehouseKeeperService.deleteByIds(bean));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,4 +50,6 @@ public interface WarehouseKeeperMapper {
|
|||
* @return
|
||||
*/
|
||||
int deleteByIdsAll(String[] typeIds);
|
||||
|
||||
List<Integer> getUsers(String typeId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,11 +35,18 @@ public class WarehouseKeeperServiceImpl implements WarehouseKeeperService {
|
|||
public int add(WarehouseKeeper bean) {
|
||||
List<WarehouseKeeper> list = new ArrayList<>();
|
||||
String typeIds = bean.getTypeIds();
|
||||
int i = 0;
|
||||
if (StringHelper.isNotEmpty(typeIds)) {
|
||||
String[] splitTypeIds = typeIds.split("@");
|
||||
//先删除,在去添加
|
||||
// warehouseKeeperMapper.deleteByIdsAll(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();
|
||||
beans.setTypeIds(typeId);
|
||||
beans.setUserId(bean.getUserId());
|
||||
|
|
@ -47,7 +54,7 @@ public class WarehouseKeeperServiceImpl implements WarehouseKeeperService {
|
|||
list.add(beans);
|
||||
}
|
||||
}
|
||||
int i = 0;
|
||||
|
||||
if (list.size() > 0) {
|
||||
i = warehouseKeeperMapper.add(list);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -937,7 +937,7 @@
|
|||
</select>
|
||||
<select id="getAuditListByLeaseTmTaskByPeople" resultType="com.bonus.sgzb.app.domain.TmTask">
|
||||
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,
|
||||
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,
|
||||
|
|
@ -1082,7 +1082,7 @@
|
|||
mt.type_name as typeModelName,
|
||||
mt.manage_type as manageType,
|
||||
mt.num as num,
|
||||
su.user_name as userName,
|
||||
GROUP_CONCAT(su.user_name) as userName,
|
||||
lad.status as status,
|
||||
lad.type_id as typeId
|
||||
FROM
|
||||
|
|
@ -1103,6 +1103,7 @@
|
|||
<if test="typeId != null and typeId != ''">
|
||||
and lad.type_id = #{typeId}
|
||||
</if>
|
||||
GROUP BY lad.type_id
|
||||
</select>
|
||||
<select id="getMaTypeDetails" resultType="com.bonus.sgzb.app.domain.TmTask">
|
||||
SELECT
|
||||
|
|
|
|||
|
|
@ -57,4 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
ORDER BY su.user_id DESC
|
||||
</select>
|
||||
<select id="getUsers" resultType="java.lang.Integer">
|
||||
select user_id from ma_type_keeper where type_id = #{typeId}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue