Merge remote-tracking branch 'origin/master'

master
chengqf 2 years ago
commit e10dc87710

@ -277,6 +277,10 @@ public class DeptController extends BaseController {
}
DeptEntity deptEntity = deptService.selectById(deleteRequest.getId());
if(deptEntity.getLevel()!=null && deptEntity.getLevel() == 1){
return ResultVOUtils.error(500,"删除失败,一级部门不允许删除!");
}
List<InvWarehouseEntity> invSubWarehouseEntities = invWarehouseService.findByParentId(deptEntity.getCode());
if (CollUtil.isNotEmpty(invSubWarehouseEntities)) {
return ResultVOUtils.error(500, "删除失败,请先移除该部门关联仓库信息!");

@ -165,7 +165,6 @@ public class InvWarehouseController extends BaseController {
}
@AuthRuleAnnotation("")
@GetMapping("spms/sub/inv/warehouse/filterSub")
public BaseResponse filterSub(FilterInvWarehouseRequest filterInvWarehouseRequest) {
@ -214,6 +213,7 @@ public class InvWarehouseController extends BaseController {
updateEntity.setUpdateTime(new Date());
deptService.updateInvWarehouse(updateEntity);
invWarehouseEntity.setId(IdUtil.getSnowflake(6, 1).nextId() + "");
invWarehouseEntity.setUpdateTime(new Date());
boolean b = invWarehouseService.insertInvSubWarehouse(invWarehouseEntity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
@ -235,6 +235,7 @@ public class InvWarehouseController extends BaseController {
}
//更新仓库信息
invWarehouseEntity.setUpdateTime(new Date());
boolean b = invWarehouseService.updateInvSubWarehouse(invWarehouseEntity);
//更新部门信息
@ -584,4 +585,10 @@ public class InvWarehouseController extends BaseController {
return ResultVOUtils.success();
}
@PostMapping("/warehouse/inout/getDeptById")
public BaseResponse getDeptById(@RequestBody List<Integer> deptIds) {
List<DeptEntity> list = deptService.getDeptById(deptIds);
return ResultVOUtils.success(list);
}
}

@ -27,6 +27,8 @@ public interface DeptDao {
boolean deleteById(@Param("id") String id);
List<DeptEntity> getDeptById(@Param("ids") List<Integer> ids);
String getNameByCode(@Param("fromCorpId") String fromCorpId);
Long getIdByCode(@Param("fromCorpId") Long fromCorpId);

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
@Data
@TableName(value = "auth_warehouse")
public class InvWarehouseEntity {
@ -87,6 +89,8 @@ public class InvWarehouseEntity {
private Boolean advanceType;
@TableField(value = "spUse")
private Boolean spUse;
@TableField(value = "updateTime")
private Date updateTime;
@TableField(exist = false)

@ -1,5 +1,6 @@
package com.glxp.api.entity.system;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.util.Date;
@ -18,6 +19,7 @@ public class SystemPDFTemplateEntity {
private int qrcodeCount;
private String remark;
private Date create_time;
@TableField(value = "`update_time`")
private Date update_time;
private String jrxmlPath;
private Integer bussinessType;

@ -66,4 +66,6 @@ public class FilterUdiRelRequest extends ListPageRequest {
private String certIdFk;
private String manufactory;
private String tyshxydm;
private Boolean dispatch;
private Boolean groupBuy;
}

@ -73,4 +73,6 @@ public interface DeptService {
boolean updateTime(String code, Date updateTime);
List<DeptEntity> getDeptById( List<Integer> ids);
}

@ -1,8 +1,10 @@
package com.glxp.api.service.auth;
import com.glxp.api.entity.auth.DeptEntity;
import com.glxp.api.entity.auth.DeptUserEntity;
import com.glxp.api.req.auth.FilterDeptUserReqeust;
import com.glxp.api.res.auth.DeptUserResponse;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -13,6 +15,8 @@ public interface DeptUserService {
List<DeptUserResponse> selectByUserId(Long userId);
List<DeptEntity> getDeptById( List<Integer> ids);
List<DeptUserResponse> selectJoinDeptUser(FilterDeptUserReqeust filterDeptUserReqeust);
boolean delete(Long deptId, Long userId);

@ -172,4 +172,9 @@ public class DeptServiceImpl implements DeptService {
public boolean updateTime(String code, Date updateTime) {
return deptDao.updateTime(code, updateTime);
}
@Override
public List<DeptEntity> getDeptById(List<Integer> ids) {
return deptDao.getDeptById(ids);
}
}

@ -2,7 +2,9 @@ package com.glxp.api.service.auth.impl;
import cn.hutool.core.collection.CollUtil;
import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.auth.DeptDao;
import com.glxp.api.dao.auth.DeptUserDao;
import com.glxp.api.entity.auth.DeptEntity;
import com.glxp.api.entity.auth.DeptUserEntity;
import com.glxp.api.req.auth.FilterDeptUserReqeust;
import com.glxp.api.res.auth.DeptUserResponse;
@ -19,6 +21,9 @@ public class DeptUserServiceImpl implements DeptUserService {
@Resource
DeptUserDao deptUserDao;
@Resource
DeptDao deptDao;
@Override
@ -37,6 +42,11 @@ public class DeptUserServiceImpl implements DeptUserService {
return deptUserDao.selectJoinDeptUser(filterDeptUserReqeust);
}
@Override
public List<DeptEntity> getDeptById(List<Integer> ids) {
return deptDao.getDeptById(ids);
}
@Override
public List<DeptUserResponse> selectJoinDeptUser(FilterDeptUserReqeust filterDeptUserReqeust) {
if (filterDeptUserReqeust.getPage() != null) {

@ -76,31 +76,32 @@ public class CleanLogTask implements SchedulingConfigurer {
}
private void process() {
//查询删除日志时间配置
String value = systemParamConfigDao.selectValueByParamKey("clean_log_days");
if (StrUtil.isBlank(value)) {
log.info("删除日志天数参数未配置,结束任务");
} else {
int days = Integer.parseInt(value);
if (days > 0) {
String date = DateUtil.offsetDay(new Date(), -days).toString("yyyy-MM-dd");
//查询系统日志删除是否开启
String cleanSystemLogValue = systemParamConfigDao.selectValueByParamKey("clean_system_log");
if ("1".equals(cleanSystemLogValue)) {
cleanSystemLog(date);
}
String cleanThrLogValue = systemParamConfigDao.selectValueByParamKey("clean_thr_log");
if ("1".equals(cleanThrLogValue)) {
cleanThrLog(date);
}
String cleanSyncLogValue = systemParamConfigDao.selectValueByParamKey("clean_sync_log");
if ("1".equals(cleanSyncLogValue)) {
cleanSyncLog(date);
}
} else {
log.info("配置删除日志天数为0不进行删除");
}
//查询系统日志删除是否开启
String cleanSystemLog = systemParamConfigDao.selectValueByParamKey("clean_system_log");
Integer cleanSystemLogValue = Integer.parseInt(cleanSystemLog);
if (cleanSystemLogValue > 0) {
String date = DateUtil.offsetDay(new Date(), -cleanSystemLogValue).toString("yyyy-MM-dd");
cleanSystemLog(date);
}
String cleanThrLogValue = systemParamConfigDao.selectValueByParamKey("clean_thr_log");
Integer cleanThrLogValueInt = Integer.parseInt(cleanThrLogValue);
if (cleanThrLogValueInt > 0) {
String date = DateUtil.offsetDay(new Date(), -cleanThrLogValueInt).toString("yyyy-MM-dd");
cleanThrLog(date);
}
String cleanSyncLogValue = systemParamConfigDao.selectValueByParamKey("clean_sync_log");
Integer cleanSyncLogValueInt = Integer.parseInt(cleanSyncLogValue);
if (cleanSyncLogValueInt > 0) {
String date = DateUtil.offsetDay(new Date(), -cleanSyncLogValueInt).toString("yyyy-MM-dd");
cleanSyncLog(date);
}
}
/**

@ -225,6 +225,16 @@
WHERE id = #{id}
</delete>
<select id="getDeptById" resultType="com.glxp.api.entity.auth.DeptEntity" >
select *
from auth_dept
where id in
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<update id="updateInvWarehouse" parameterType="com.glxp.api.entity.auth.DeptEntity">
UPDATE auth_dept
<trim prefix="set" suffixOverrides=",">

@ -41,7 +41,7 @@
auth_user.employeeName like concat('%', #{key}, '%'))
</if>
</where>
group by auth_dept_user.userId
</select>

@ -39,6 +39,9 @@
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
</if>
<if test="name != '' and name != null">
AND name = #{name}
</if>
</where>
order by updateTime desc

@ -583,6 +583,9 @@
<if test="allowNoProduct != null">
allowNoProduct=#{allowNoProduct},
</if>
<if test="allowNoSerial != null">
allowNoSerial=#{allowNoSerial},
</if>
<if test="spmc != null">
spmc=#{spmc},
</if>

@ -410,6 +410,12 @@
<if test="manufactory != null and manufactory != ''">
and manufactory LIKE concat('%',#{manufactory},'%')
</if>
<if test="dispatch != null">
and basic_udirel.dispatch = #{dispatch}
</if>
<if test="groupBuy != null">
and basic_udirel.groupBuy = #{groupBuy}
</if>
</where>
ORDER BY modifyTime DESC
</select>

@ -5,7 +5,7 @@
<select id="queryPage" parameterType="com.glxp.api.req.system.FilterPdfTemplateRequest"
resultType="com.glxp.api.entity.system.SystemPDFTemplateEntity">
SELECT id,name,type,module,param,path,rowCount,qrcodeCount,remark,create_time,update_time,jrxmlPath,bussinessType,bussinessStatus
SELECT id,name,type,module,param,path,rowCount,qrcodeCount,remark,create_time,update_time as update_time,jrxmlPath,bussinessType,bussinessStatus
FROM sys_pdf_template
<where>
<if test="name != null and '' != name">

@ -138,6 +138,9 @@ CALL Pro_Temp_ColumnWork('inv_product', 'planOutCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product', 'onWayCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product', 'availableStock', 'int ', 1);
CALL Pro_Temp_ColumnWork('auth_warehouse', 'updateTime', 'datetime ', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'basicType', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'basicDept', 'tinyint', 1);

Loading…
Cancel
Save