Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
577b25aeaa
|
|
@ -41,10 +41,10 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringBoot Actuator -->
|
<!-- SpringBoot Actuator -->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework.boot</groupId>
|
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<!-- <artifactId>spring-boot-starter-actuator</artifactId>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<!-- sgzb Common Security-->
|
<!-- sgzb Common Security-->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,10 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringBoot Actuator -->
|
<!-- SpringBoot Actuator -->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework.boot</groupId>
|
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<!-- <artifactId>spring-boot-starter-actuator</artifactId>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<!-- SpringCloud Loadbalancer -->
|
<!-- SpringCloud Loadbalancer -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
||||||
|
|
@ -43,10 +43,10 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringBoot Actuator -->
|
<!-- SpringBoot Actuator -->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework.boot</groupId>
|
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<!-- <artifactId>spring-boot-starter-actuator</artifactId>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<!-- FastDFS -->
|
<!-- FastDFS -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
||||||
|
|
@ -36,10 +36,10 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringBoot Actuator -->
|
<!-- SpringBoot Actuator -->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework.boot</groupId>
|
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<!-- <artifactId>spring-boot-starter-actuator</artifactId>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<!-- Swagger UI -->
|
<!-- Swagger UI -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
||||||
|
|
@ -36,10 +36,10 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringBoot Actuator -->
|
<!-- SpringBoot Actuator -->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework.boot</groupId>
|
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<!-- <artifactId>spring-boot-starter-actuator</artifactId>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<!-- Swagger UI -->
|
<!-- Swagger UI -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
||||||
|
|
@ -1402,7 +1402,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
log.info("dataString-=========:" + data);
|
log.info("dataString-=========:" + data);
|
||||||
resultDataHandler(data);
|
resultDataHandler(data);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("请求失败!{}", e);
|
log.error("推送失败!{}", e);
|
||||||
return AjaxResult.error("推送失败!");
|
return AjaxResult.error("推送失败!");
|
||||||
}
|
}
|
||||||
//更改推送的状态
|
//更改推送的状态
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@ import org.springframework.web.bind.annotation.*;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.bonus.sgzb.common.core.web.page.TableSupport.PAGE_NUM;
|
import static com.bonus.sgzb.common.core.web.page.TableSupport.PAGE_NUM;
|
||||||
import static com.bonus.sgzb.common.core.web.page.TableSupport.PAGE_SIZE;
|
import static com.bonus.sgzb.common.core.web.page.TableSupport.PAGE_SIZE;
|
||||||
|
|
@ -270,7 +272,11 @@ public class MaTypeController extends BaseController {
|
||||||
public AjaxResult edit(@RequestBody MaType maType) {
|
public AjaxResult edit(@RequestBody MaType maType) {
|
||||||
Long parentId = maType.getParentId();
|
Long parentId = maType.getParentId();
|
||||||
List<MaType> subMas = maTypeMapper.getListByParentId(parentId, null);
|
List<MaType> subMas = maTypeMapper.getListByParentId(parentId, null);
|
||||||
boolean containsSameBrother = subMas.stream().anyMatch(o -> o.getTypeName().equals(maType.getTypeName()));
|
List<MaType> filteredItems = subMas.stream().collect(Collectors.toList());
|
||||||
|
if (Objects.nonNull(maType.getTypeId())) {
|
||||||
|
filteredItems = subMas.stream().filter(item -> !maType.getTypeId().equals(item.getTypeId())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
boolean containsSameBrother = filteredItems.stream().anyMatch(o -> o.getTypeName().equals(maType.getTypeName()));
|
||||||
if (containsSameBrother) {
|
if (containsSameBrother) {
|
||||||
return AjaxResult.error("修改失败,同级存在相同名称");
|
return AjaxResult.error("修改失败,同级存在相同名称");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,10 @@ import com.bonus.sgzb.base.service.IMaTypeKeeperService;
|
||||||
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
||||||
|
import com.bonus.sgzb.system.api.domain.SysDept;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -56,11 +54,18 @@ public class MaTypeKeeperController extends BaseController {
|
||||||
return getDataTable(maTypeKeeperService.getListByMaType(userId, typeName));
|
return getDataTable(maTypeKeeperService.getListByMaType(userId, typeName));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "查询全部库管员信息")
|
@ApiOperation(value = "查询库管员信息")
|
||||||
@GetMapping("/getMaTypeKeeper")
|
@PostMapping("/getMaTypeKeeper")
|
||||||
public AjaxResult getMaTypeKeeper(){
|
public AjaxResult getMaTypeKeeper(SysDept sysDept){
|
||||||
List<MaKeeperUser> maTypeList = maTypeKeeperService.getMaTypeKeeper();
|
List<MaKeeperUser> maTypeList = maTypeKeeperService.getMaTypeKeeper(sysDept);
|
||||||
return AjaxResult.success(maTypeList);
|
return AjaxResult.success(maTypeList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询公司信息")
|
||||||
|
@PostMapping("/getEnterprise")
|
||||||
|
public AjaxResult getEnterprise(SysDept sysDept){
|
||||||
|
SysDept sysDeptRes = maTypeKeeperService.getEnterprise(sysDept);
|
||||||
|
return AjaxResult.success(sysDeptRes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,6 @@ import java.util.List;
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface DeptMapper {
|
public interface DeptMapper {
|
||||||
public List<SysDept> getDeptList();
|
public List<SysDept> getDeptList();
|
||||||
|
|
||||||
|
SysDept getDeptBySocialCreditCode(SysDept sysDept);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,6 @@ public interface MaTypeKeeperMapper {
|
||||||
* 查询全部库管员信息
|
* 查询全部库管员信息
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<MaKeeperUser> getMaTypeKeeper();
|
List<MaKeeperUser> getMaTypeKeeper(Long deptId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.bonus.sgzb.base.service;
|
||||||
import com.bonus.sgzb.base.domain.MaKeeperUser;
|
import com.bonus.sgzb.base.domain.MaKeeperUser;
|
||||||
import com.bonus.sgzb.base.vo.DeptUser;
|
import com.bonus.sgzb.base.vo.DeptUser;
|
||||||
import com.bonus.sgzb.base.vo.MaTypeKeeperVO;
|
import com.bonus.sgzb.base.vo.MaTypeKeeperVO;
|
||||||
|
import com.bonus.sgzb.system.api.domain.SysDept;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -33,6 +34,13 @@ public interface IMaTypeKeeperService {
|
||||||
* 查询全部库管员信息
|
* 查询全部库管员信息
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<MaKeeperUser> getMaTypeKeeper();
|
List<MaKeeperUser> getMaTypeKeeper(SysDept sysDept);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询企业信息
|
||||||
|
* @param sysDept
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
SysDept getEnterprise(SysDept sysDept);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,17 @@
|
||||||
package com.bonus.sgzb.base.service.impl;
|
package com.bonus.sgzb.base.service.impl;
|
||||||
|
|
||||||
import com.bonus.sgzb.base.domain.MaKeeperUser;
|
import com.bonus.sgzb.base.domain.MaKeeperUser;
|
||||||
|
import com.bonus.sgzb.base.mapper.DeptMapper;
|
||||||
import com.bonus.sgzb.base.mapper.MaTypeKeeperMapper;
|
import com.bonus.sgzb.base.mapper.MaTypeKeeperMapper;
|
||||||
import com.bonus.sgzb.base.service.IMaTypeKeeperService;
|
import com.bonus.sgzb.base.service.IMaTypeKeeperService;
|
||||||
import com.bonus.sgzb.base.vo.DeptUser;
|
import com.bonus.sgzb.base.vo.DeptUser;
|
||||||
import com.bonus.sgzb.base.vo.MaTypeKeeperVO;
|
import com.bonus.sgzb.base.vo.MaTypeKeeperVO;
|
||||||
|
import com.bonus.sgzb.system.api.domain.SysDept;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -16,12 +20,16 @@ import java.util.List;
|
||||||
* @author makejava
|
* @author makejava
|
||||||
* @since 2023-11-28 15:34:03
|
* @since 2023-11-28 15:34:03
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Service("maTypeKeeperService")
|
@Service("maTypeKeeperService")
|
||||||
public class MaTypeKeeperServiceImpl implements IMaTypeKeeperService {
|
public class MaTypeKeeperServiceImpl implements IMaTypeKeeperService {
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private MaTypeKeeperMapper maTypeKeeperMapper;
|
private MaTypeKeeperMapper maTypeKeeperMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DeptMapper deptMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据人员名称查询左侧列表
|
* 根据人员名称查询左侧列表
|
||||||
* @param userName
|
* @param userName
|
||||||
|
|
@ -46,12 +54,24 @@ public class MaTypeKeeperServiceImpl implements IMaTypeKeeperService {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询全部库管员信息
|
* 查询库管员信息
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<MaKeeperUser> getMaTypeKeeper() {
|
public List<MaKeeperUser> getMaTypeKeeper(SysDept sysDept) {
|
||||||
return maTypeKeeperMapper.getMaTypeKeeper();
|
log.info("MaTypeKeeperServiceImpl getMaTypeKeeper {}", sysDept);
|
||||||
|
//根据企业机构代码(统一社会信用代码)获取企业信息
|
||||||
|
sysDept = deptMapper.getDeptBySocialCreditCode(sysDept);
|
||||||
|
//获取该企业下的库管员
|
||||||
|
return maTypeKeeperMapper.getMaTypeKeeper(sysDept.getDeptId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SysDept getEnterprise(SysDept sysDept) {
|
||||||
|
log.info("MaTypeKeeperServiceImpl getEnterprise {}", sysDept);
|
||||||
|
//根据企业机构代码(统一社会信用代码)获取企业信息
|
||||||
|
sysDept = deptMapper.getDeptBySocialCreditCode(sysDept);
|
||||||
|
return sysDept;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String genderBackCode() {
|
public String genderBackCode() {
|
||||||
|
log.info("enter method genderBackCode");
|
||||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||||
Date nowDate = DateUtils.getNowDate();
|
Date nowDate = DateUtils.getNowDate();
|
||||||
String format = dateFormat.format(nowDate);
|
String format = dateFormat.format(nowDate);
|
||||||
|
|
@ -68,6 +69,7 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi
|
||||||
} else {
|
} else {
|
||||||
code = "PD" + format + "-000" + taskNum;
|
code = "PD" + format + "-000" + taskNum;
|
||||||
}
|
}
|
||||||
|
log.info("end method genderBackCode" + code);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -97,7 +99,8 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi
|
||||||
//判断提交表单中是否存在相同编码
|
//判断提交表单中是否存在相同编码
|
||||||
for (int i = 0; i < machIneDtoList.size() - 1; i++) {
|
for (int i = 0; i < machIneDtoList.size() - 1; i++) {
|
||||||
for (int j = i + 1; j < machIneDtoList.size(); j++) {
|
for (int j = i + 1; j < machIneDtoList.size(); j++) {
|
||||||
if (machIneDtoList.get(i).getMaCode().equals(machIneDtoList.get(j).getMaCode())) {
|
if (StringUtils.isNotEmpty(machIneDtoList.get(i).getMaCode()) && StringUtils.isNotEmpty(machIneDtoList.get(j).getMaCode())
|
||||||
|
&& machIneDtoList.get(i).getMaCode().equals(machIneDtoList.get(j).getMaCode())) {
|
||||||
throw new ServiceException("列表中包含以下相同的设备编码,请修改后重新提交:" + machIneDtoList.get(i).getMaCode());
|
throw new ServiceException("列表中包含以下相同的设备编码,请修改后重新提交:" + machIneDtoList.get(i).getMaCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
create_by, create_time, update_by, update_time
|
create_by, create_time, update_by, update_time
|
||||||
from sys_dept
|
from sys_dept
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getDeptBySocialCreditCode" resultType="com.bonus.sgzb.system.api.domain.SysDept">
|
||||||
|
select * from sys_dept where social_credit_code = #{socialCreditCode}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<insert id="unitInfoAdd" parameterType="com.bonus.sgzb.base.domain.BmUnitInfo">
|
<insert id="unitInfoAdd" parameterType="com.bonus.sgzb.base.domain.BmUnitInfo">
|
||||||
|
|
|
||||||
|
|
@ -28,13 +28,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="getMaTypeKeeper" resultType="com.bonus.sgzb.base.domain.MaKeeperUser">
|
<select id="getMaTypeKeeper" resultType="com.bonus.sgzb.base.domain.MaKeeperUser">
|
||||||
SELECT
|
SELECT
|
||||||
mtk.user_id AS userId,
|
su.user_id AS userId,
|
||||||
su.user_name AS userName,
|
su.user_name AS userName,
|
||||||
su.nick_name AS nickName
|
su.nick_name AS nickName
|
||||||
FROM
|
FROM
|
||||||
ma_type_keeper mtk
|
sys_user su
|
||||||
LEFT JOIN sys_user su ON mtk.user_id = su.user_id
|
left join sys_user_role sur on su.user_id = sur.user_id
|
||||||
GROUP BY
|
left join sys_role sr on sur.role_id = sr.role_id
|
||||||
mtk.user_id
|
where
|
||||||
|
su.company_id = #{deptId} and sr.role_key = 'jjfgs'
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -43,10 +43,10 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringBoot Actuator -->
|
<!-- SpringBoot Actuator -->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework.boot</groupId>
|
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<!-- <artifactId>spring-boot-starter-actuator</artifactId>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<!-- Swagger UI -->
|
<!-- Swagger UI -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue