Merge branch 'dev' of http://192.168.0.56:3000/bonus/devicesmgt into dev
This commit is contained in:
commit
2a164bfcca
|
|
@ -272,6 +272,8 @@ public class SysLoginService {
|
||||||
public static String generateRandomPassword(int length) {
|
public static String generateRandomPassword(int length) {
|
||||||
String characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
String characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
|
|
||||||
|
|
||||||
StringBuilder password = new StringBuilder();
|
StringBuilder password = new StringBuilder();
|
||||||
|
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Tomcat
|
# Tomcat
|
||||||
server:
|
server:
|
||||||
port: 9200
|
port: 29200
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
@ -14,11 +14,11 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 192.168.0.14:8848
|
server-addr: 127.0.0.1:8848
|
||||||
namespace: sgzb_cloud_dev
|
namespace: sgzb_cloud_dev
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 192.168.0.14:8848
|
server-addr: 127.0.0.1:8848
|
||||||
namespace: sgzb_cloud_dev
|
namespace: sgzb_cloud_dev
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Tomcat
|
# Tomcat
|
||||||
server:
|
server:
|
||||||
port: 8080
|
port: 28080
|
||||||
|
|
||||||
# Spring Boot Actuator V2中风险漏洞处理,禁止远程端口访问
|
# Spring Boot Actuator V2中风险漏洞处理,禁止远程端口访问
|
||||||
management:
|
management:
|
||||||
|
|
@ -27,11 +27,11 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 192.168.0.14:8848
|
server-addr: 127.0.0.1:8848
|
||||||
namespace: sgzb_cloud_dev
|
namespace: sgzb_cloud_dev
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 192.168.0.14:8848
|
server-addr: 127.0.0.1:8848
|
||||||
namespace: sgzb_cloud_dev
|
namespace: sgzb_cloud_dev
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,8 @@ public class BackReceiveController extends BaseController {
|
||||||
return AjaxResult.success("接收成功");
|
return AjaxResult.success("接收成功");
|
||||||
} else if (res == -1) {
|
} else if (res == -1) {
|
||||||
return AjaxResult.error("该编码已接收");
|
return AjaxResult.error("该编码已接收");
|
||||||
|
} else if (res == -2) {
|
||||||
|
return AjaxResult.error("已超出退料数量!!");
|
||||||
} else {
|
} else {
|
||||||
return AjaxResult.error("接收失败");
|
return AjaxResult.error("接收失败");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -165,6 +165,7 @@ public class BackApplyInfo {
|
||||||
private List<BackApplyInfo> backApplyDetails;
|
private List<BackApplyInfo> backApplyDetails;
|
||||||
private Integer parentId;
|
private Integer parentId;
|
||||||
private String sdStatus;
|
private String sdStatus;
|
||||||
|
private String sdId;
|
||||||
/**
|
/**
|
||||||
* 二维码编码
|
* 二维码编码
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ public interface BackReceiveMapper {
|
||||||
* @param record
|
* @param record
|
||||||
* @return List<BackApplyInfo>
|
* @return List<BackApplyInfo>
|
||||||
*/
|
*/
|
||||||
BackApplyInfo backReceiveRecord(BackApplyInfo record);
|
List<BackApplyInfo> backReceiveRecord(BackApplyInfo record);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询
|
* 查询
|
||||||
|
|
@ -194,4 +194,8 @@ public interface BackReceiveMapper {
|
||||||
int deleteCheckDetails(BackApplyInfo backApplyInfo);
|
int deleteCheckDetails(BackApplyInfo backApplyInfo);
|
||||||
|
|
||||||
List<Integer> getMaId(BackApplyInfo backApplyInfo);
|
List<Integer> getMaId(BackApplyInfo backApplyInfo);
|
||||||
|
|
||||||
|
int selectNumByTypeId(@Param("parentId")Integer parentId,@Param("typeId") String typeId);
|
||||||
|
|
||||||
|
int selectTaskStatus(int taskId);
|
||||||
}
|
}
|
||||||
|
|
@ -108,14 +108,20 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
BackApplyInfo[] arr = record.getArr();
|
BackApplyInfo[] arr = record.getArr();
|
||||||
if (arr.length > 0) {
|
if (arr.length > 0) {
|
||||||
for (int i = 0; i < arr.length; i++) {
|
for (int i = 0; i < arr.length; i++) {
|
||||||
|
//判断是否超出审核数量
|
||||||
|
int re = backReceiveMapper.selectNumByTypeId(arr[i].getParentId(), arr[i].getTypeId());
|
||||||
|
if (re <= 0) {
|
||||||
|
res = -2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
//根据maId和taskId查询是否已接收
|
//根据maId和taskId查询是否已接收
|
||||||
int re = backReceiveMapper.selectCodeByMaIdAndTaskId(arr[i].getMaId(), record.getTaskId());
|
re = backReceiveMapper.selectCodeByMaIdAndTaskId(arr[i].getMaId(), record.getTaskId());
|
||||||
if (re > 0) {
|
if (re > 0) {
|
||||||
res = -1;
|
res = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (res == -1) {
|
if (res < 0) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -123,7 +129,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
//修改任务状态
|
//修改任务状态
|
||||||
res = updateTaskStatus(taskId, 39);
|
res = updateTaskStatus(taskId, 39);
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
throw new RuntimeException("插入back_check_details异常");
|
throw new RuntimeException("修改updateTaskStatus异常");
|
||||||
}
|
}
|
||||||
//插入back_check_details
|
//插入back_check_details
|
||||||
res = insertBcd(record);
|
res = insertBcd(record);
|
||||||
|
|
@ -142,6 +148,11 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
int res;
|
int res;
|
||||||
try {
|
try {
|
||||||
int taskId = record.getTaskId();
|
int taskId = record.getTaskId();
|
||||||
|
//先判断是否已经完成退料了
|
||||||
|
int taskStatus = selectTaskStatus(taskId);
|
||||||
|
if (taskStatus == 0) {
|
||||||
|
throw new RuntimeException("该退料单已完成退料");
|
||||||
|
}
|
||||||
//修改任务状态
|
//修改任务状态
|
||||||
res = updateTaskStatus(taskId, 40);
|
res = updateTaskStatus(taskId, 40);
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
|
|
@ -191,7 +202,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
if (allList != null && allList.size() > 0) {
|
if (allList != null && allList.size() > 0) {
|
||||||
res = updateSlt(record, allList);
|
res = updateSlt(record, allList);
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
throw new RuntimeException("slt_agreement_info");
|
throw new RuntimeException("该机具未被领料使用");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
@ -200,6 +211,15 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int selectTaskStatus(int taskId) {
|
||||||
|
int taskStatus = backReceiveMapper.selectTaskStatus(taskId);
|
||||||
|
if (taskStatus == 40) {
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private int updateSlt(BackApplyInfo record, List<BackApplyInfo> hgList) {
|
private int updateSlt(BackApplyInfo record, List<BackApplyInfo> hgList) {
|
||||||
for (BackApplyInfo bean : hgList) {
|
for (BackApplyInfo bean : hgList) {
|
||||||
List<SltAgreementInfo> infoList = backReceiveMapper.getStlInfo(bean);
|
List<SltAgreementInfo> infoList = backReceiveMapper.getStlInfo(bean);
|
||||||
|
|
@ -239,16 +259,9 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BackApplyInfo> backReceiveRecord(BackApplyInfo record) {
|
public List<BackApplyInfo> backReceiveRecord(BackApplyInfo record) {
|
||||||
String typeId = record.getTypeId();
|
|
||||||
String[] split = typeId.split(",");
|
List<BackApplyInfo> backApplyInfoList = backReceiveMapper.backReceiveRecord(record);
|
||||||
List<BackApplyInfo> backApplyInfoList = new ArrayList<>();
|
|
||||||
for (String s : split) {
|
|
||||||
record.setTypeId(s);
|
|
||||||
BackApplyInfo backApplyInfo = backReceiveMapper.backReceiveRecord(record);
|
|
||||||
if (backApplyInfo != null) {
|
|
||||||
backApplyInfoList.add(backApplyInfo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return backApplyInfoList;
|
return backApplyInfoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -92,13 +92,17 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
||||||
if (CollUtil.isEmpty(maMachineByMaIdAndMaCode)) {
|
if (CollUtil.isEmpty(maMachineByMaIdAndMaCode)) {
|
||||||
maMachine.setCreateTime(new Date());
|
maMachine.setCreateTime(new Date());
|
||||||
int i = maMachineMapper.maMachineAdd(maMachine);
|
int i = maMachineMapper.maMachineAdd(maMachine);
|
||||||
|
String labelCode = maMachine.getQrCode();
|
||||||
MaLabelBind maLabelBinds = maLabelBindMapper.selectMaLabelBindByMaCode(maMachine);
|
MaLabelBind maLabelBinds = maLabelBindMapper.selectMaLabelBindByMaCode(maMachine);
|
||||||
if (maLabelBinds != null) {
|
if (maLabelBinds != null) {
|
||||||
|
|
||||||
MaLabelBindVO maLabelBind = new MaLabelBindVO();
|
MaLabelBindVO maLabelBind = new MaLabelBindVO();
|
||||||
maLabelBind.setTypeId(maMachine.getTypeId());
|
maLabelBind.setTypeId(maMachine.getTypeId());
|
||||||
maLabelBind.setBindTime(new Date().toString());
|
maLabelBind.setBindTime(new Date().toString());
|
||||||
|
|
||||||
maLabelBind.setBinder(SecurityUtils.getLoginUser().getUsername());
|
maLabelBind.setBinder(SecurityUtils.getLoginUser().getUsername());
|
||||||
maLabelBindMapper.updateMaLabelBind(maLabelBind);
|
maLabelBindMapper.updateMaLabelBind(maLabelBind);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
MaLabelBind maLabelBind = new MaLabelBind();
|
MaLabelBind maLabelBind = new MaLabelBind();
|
||||||
|
|
@ -106,10 +110,13 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
||||||
maLabelBind.setMaId(maMachine.getMaId());
|
maLabelBind.setMaId(maMachine.getMaId());
|
||||||
maLabelBind.setTypeId(maMachine.getTypeId());
|
maLabelBind.setTypeId(maMachine.getTypeId());
|
||||||
maLabelBind.setBindTime(new Date());
|
maLabelBind.setBindTime(new Date());
|
||||||
|
|
||||||
maLabelBind.setBinder(SecurityUtils.getLoginUser().getUsername());
|
maLabelBind.setBinder(SecurityUtils.getLoginUser().getUsername());
|
||||||
maLabelBind.setStatus("1");
|
maLabelBind.setStatus("1");
|
||||||
maLabelBind.setLabelType(9);
|
maLabelBind.setLabelType(9);
|
||||||
maLabelBindMapper.insertLabelBind(maLabelBind);
|
maLabelBindMapper.insertLabelBind(maLabelBind);
|
||||||
|
maLabelBindMapper.updateMalableCode(maLabelBind);
|
||||||
|
maLabelBindMapper.updateMatypeNum(maLabelBind);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -185,7 +192,7 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
||||||
return AjaxResult.error("您已提交,请勿重复点击");
|
return AjaxResult.error("您已提交,请勿重复点击");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage());
|
e.printStackTrace();
|
||||||
return AjaxResult.error("出库失败");
|
return AjaxResult.error("出库失败");
|
||||||
}
|
}
|
||||||
return AjaxResult.success("出库成功");
|
return AjaxResult.success("出库成功");
|
||||||
|
|
|
||||||
|
|
@ -1055,7 +1055,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -90,4 +90,8 @@ public interface MaLabelBindMapper
|
||||||
int insertLabelBind(MaLabelBind maLabelBind);
|
int insertLabelBind(MaLabelBind maLabelBind);
|
||||||
|
|
||||||
MaLabelBind selectMaLabelBindByMaCode(MaMachine maMachine);
|
MaLabelBind selectMaLabelBindByMaCode(MaMachine maMachine);
|
||||||
|
|
||||||
|
void updateMalableCode(MaLabelBind maLabelBind);
|
||||||
|
|
||||||
|
void updateMatypeNum(MaLabelBind maLabelBind);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ 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();
|
||||||
if(StringHelper.isNotEmpty(typeIds)){
|
if (StringHelper.isNotEmpty(typeIds)) {
|
||||||
String[] splitTypeIds = typeIds.split("@");
|
String[] splitTypeIds = typeIds.split("@");
|
||||||
//先删除,在去添加
|
//先删除,在去添加
|
||||||
warehouseKeeperMapper.deleteByIdsAll(splitTypeIds);
|
warehouseKeeperMapper.deleteByIdsAll(splitTypeIds);
|
||||||
|
|
@ -47,11 +47,9 @@ public class WarehouseKeeperServiceImpl implements WarehouseKeeperService {
|
||||||
list.add(beans);
|
list.add(beans);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int i =0;
|
int i = 0;
|
||||||
if(list.size()>0){
|
if (list.size() > 0) {
|
||||||
i= warehouseKeeperMapper.add(list);
|
i = warehouseKeeperMapper.add(list);
|
||||||
}else{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
@ -59,11 +57,11 @@ public class WarehouseKeeperServiceImpl implements WarehouseKeeperService {
|
||||||
@Override
|
@Override
|
||||||
public int deleteByIds(WarehouseKeeper bean) {
|
public int deleteByIds(WarehouseKeeper bean) {
|
||||||
int i = 1;
|
int i = 1;
|
||||||
if(StringHelper.isNotEmpty(bean.getType())){
|
if (StringHelper.isNotEmpty(bean.getType())) {
|
||||||
if("1".equals(bean.getType())){
|
if ("1".equals(bean.getType())) {
|
||||||
warehouseKeeperMapper.deleteByIds(bean.getTypeIds());
|
warehouseKeeperMapper.deleteByIds(bean.getTypeIds());
|
||||||
}else{
|
} else {
|
||||||
if(StringHelper.isNotEmpty(bean.getTypeIds())){
|
if (StringHelper.isNotEmpty(bean.getTypeIds())) {
|
||||||
List<WarehouseKeeper> list = new ArrayList<>();
|
List<WarehouseKeeper> list = new ArrayList<>();
|
||||||
String[] splitTypeIds = bean.getTypeIds().split("@");
|
String[] splitTypeIds = bean.getTypeIds().split("@");
|
||||||
warehouseKeeperMapper.deleteByIdsAll(splitTypeIds);
|
warehouseKeeperMapper.deleteByIdsAll(splitTypeIds);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Tomcat
|
# Tomcat
|
||||||
server:
|
server:
|
||||||
port: 9301
|
port: 29301
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
@ -21,11 +21,11 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 192.168.0.14:8848
|
server-addr: 127.0.0.1:8848
|
||||||
namespace: sgzb_cloud_dev
|
namespace: sgzb_cloud_dev
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 192.168.0.14:8848
|
server-addr: 127.0.0.1:8848
|
||||||
namespace: sgzb_cloud_dev
|
namespace: sgzb_cloud_dev
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
|
|
|
||||||
|
|
@ -483,6 +483,7 @@
|
||||||
<select id="examineList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
<select id="examineList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||||
SELECT
|
SELECT
|
||||||
bai.id,
|
bai.id,
|
||||||
|
bai.code,
|
||||||
bai.status,
|
bai.status,
|
||||||
bai.back_person as backPerson,
|
bai.back_person as backPerson,
|
||||||
bai.phone,
|
bai.phone,
|
||||||
|
|
|
||||||
|
|
@ -648,7 +648,7 @@
|
||||||
bagi.plan_start_time
|
bagi.plan_start_time
|
||||||
<if test="typeId != null and typeId != ''">
|
<if test="typeId != null and typeId != ''">
|
||||||
HAVING
|
HAVING
|
||||||
FIND_IN_SET(#{typeId}, GROUP_CONCAT(DISTINCT mt2.type_id))
|
FIND_IN_SET(#{typeId}, GROUP_CONCAT(DISTINCT bad.type_id))
|
||||||
</if>
|
</if>
|
||||||
ORDER BY
|
ORDER BY
|
||||||
tt.task_status ASC,
|
tt.task_status ASC,
|
||||||
|
|
@ -667,7 +667,7 @@
|
||||||
mt2.type_name AS typeName,
|
mt2.type_name AS typeName,
|
||||||
bad.pre_num as preNum,
|
bad.pre_num as preNum,
|
||||||
bad.status as status,
|
bad.status as status,
|
||||||
IFNULL(bad.audit_num,0)-IFNULL(aa.back_num,0) as partNum,
|
IFNULL(bad.audit_num,0)-IFNULL(aa.back_num,0) as num,
|
||||||
mt.manage_type as manageType,
|
mt.manage_type as manageType,
|
||||||
CONCAT('NSJJ',mt.`code`,mt.model_code) as `code`
|
CONCAT('NSJJ',mt.`code`,mt.model_code) as `code`
|
||||||
FROM
|
FROM
|
||||||
|
|
@ -696,12 +696,8 @@
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectTaskNumByMonthWx" resultType="java.lang.String">
|
<select id="selectTaskNumByMonthWx" resultType="java.lang.Integer">
|
||||||
SELECT SUBSTRING(`code`, - 4) as code
|
select count(*) from tm_task where DATE_FORMAT(create_time,'%y%m') = DATE_FORMAT(#{date},'%y%m') and task_type = #{taskType}
|
||||||
FROM tm_task
|
|
||||||
WHERE DATE_FORMAT(create_time, '%y%m') = DATE_FORMAT(#{date}, '%y%m')
|
|
||||||
AND task_type = #{taskType}
|
|
||||||
ORDER BY create_time DESC LIMIT 1
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getHgList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
<select id="getHgList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
@ -935,6 +931,32 @@
|
||||||
<select id="getMaId" resultType="java.lang.Integer">
|
<select id="getMaId" resultType="java.lang.Integer">
|
||||||
select ma_id from back_check_details where parent_id = #{parentId} and type_id = #{typeId}
|
select ma_id from back_check_details where parent_id = #{parentId} and type_id = #{typeId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectTaskStatus" resultType="java.lang.Integer">
|
||||||
|
select task_status from tm_task where task_id = #{taskId}
|
||||||
|
</select>
|
||||||
|
<select id="selectNumByTypeId" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
ROUND(SUM( res.auditNum )- SUM( res.backNum ),0) AS backNum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
bad.audit_num AS auditNum,
|
||||||
|
0 AS backNum
|
||||||
|
FROM
|
||||||
|
back_apply_details bad
|
||||||
|
WHERE
|
||||||
|
bad.parent_id = #{parentId}
|
||||||
|
AND bad.type_id = #{typeId} UNION
|
||||||
|
SELECT
|
||||||
|
0 AS auditNum,
|
||||||
|
SUM(
|
||||||
|
IFNULL( bcd.back_num, 0 )) AS backNum
|
||||||
|
FROM
|
||||||
|
back_check_details bcd
|
||||||
|
WHERE
|
||||||
|
bcd.parent_id = #{parentId}
|
||||||
|
AND bcd.type_id = #{typeId}
|
||||||
|
) res
|
||||||
|
HAVING backNum > -1
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -16,6 +16,32 @@
|
||||||
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="ResultMap" type="com.bonus.sgzb.app.domain.TmTask">
|
||||||
|
<!--@Table tm_task-->
|
||||||
|
<id column="task_id" jdbcType="BIGINT" property="taskId" />
|
||||||
|
<result column="task_type" jdbcType="INTEGER" property="taskType" />
|
||||||
|
<result column="task_status" jdbcType="INTEGER" property="taskStatus" />
|
||||||
|
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||||
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
||||||
|
|
||||||
|
<collection property="leaseApplyDetails" ofType="com.bonus.sgzb.app.domain.TmTask">
|
||||||
|
<id column="dId" property="id" jdbcType="INTEGER" />
|
||||||
|
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||||
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
||||||
|
</collection>
|
||||||
|
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
task_id, task_type, task_status, code, create_by, create_time, update_by, update_time,
|
task_id, task_type, task_status, code, create_by, create_time, update_by, update_time,
|
||||||
remark, company_id
|
remark, company_id
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,16 @@
|
||||||
ma_id = #{maId},is_bind =#{isBind}
|
ma_id = #{maId},is_bind =#{isBind}
|
||||||
where label_id =#{labelId}
|
where label_id =#{labelId}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateMalableCode" parameterType="com.bonus.sgzb.base.api.domain.MaLabelBind">
|
||||||
|
update ma_machine_label set
|
||||||
|
ma_id = #{maId},is_bind =1
|
||||||
|
where label_code =#{labelCode}
|
||||||
|
</update>
|
||||||
|
<update id="updateMatypeNum" parameterType="com.bonus.sgzb.base.api.domain.MaLabelBind">
|
||||||
|
update ma_type set
|
||||||
|
num = num + 1
|
||||||
|
where type_id =#{typeId}
|
||||||
|
</update>
|
||||||
<insert id="insertMaLabels">
|
<insert id="insertMaLabels">
|
||||||
insert into ma_maLabel
|
insert into ma_maLabel
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ public class SgzbMaterialApplication
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
SpringApplication.run(SgzbMaterialApplication.class, args);
|
SpringApplication.run(SgzbMaterialApplication.class, args);
|
||||||
System.out.println("(♥◠‿◠)ノ゙ 基础管理模块启动成功 ლ(´ڡ`ლ)゙ \n" +
|
System.out.println("(♥◠‿◠)ノ゙ 机具管理模块启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||||
" .-------. ____ __ \n" +
|
" .-------. ____ __ \n" +
|
||||||
" | _ _ \\ \\ \\ / / \n" +
|
" | _ _ \\ \\ \\ / / \n" +
|
||||||
" | ( ' ) | \\ _. / ' \n" +
|
" | ( ' ) | \\ _. / ' \n" +
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||||
|
import com.bonus.sgzb.material.domain.MachinePart;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseInput;
|
import com.bonus.sgzb.material.domain.PurchaseInput;
|
||||||
import com.bonus.sgzb.material.service.IPurchaseCheckInfoService;
|
import com.bonus.sgzb.material.service.IPurchaseCheckInfoService;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||||
|
|
@ -23,15 +24,14 @@ import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新购验收任务
|
* 新购验收任务
|
||||||
*
|
*
|
||||||
* @author bonus
|
* @author bonus
|
||||||
* @date 2023-12-10
|
* @date 2023-12-10
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@Api(value = "新购验收任务")
|
@Api(value = "新购验收任务")
|
||||||
@RequestMapping("/purchaseCheckInfo")
|
@RequestMapping("/purchaseCheckInfo")
|
||||||
public class PurchaseCheckInfoController extends BaseController
|
public class PurchaseCheckInfoController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPurchaseCheckInfoService purchaseCheckInfoService;
|
private IPurchaseCheckInfoService purchaseCheckInfoService;
|
||||||
|
|
||||||
|
|
@ -52,20 +52,30 @@ public class PurchaseCheckInfoController extends BaseController
|
||||||
//若依框架多个查询会导致分页失效,需分批处理
|
//若依框架多个查询会导致分页失效,需分批处理
|
||||||
startPage();
|
startPage();
|
||||||
list = purchaseCheckInfoService.selectPutInListExamine(purchaseCheckInfo);
|
list = purchaseCheckInfoService.selectPutInListExamine(purchaseCheckInfo);
|
||||||
}else {
|
} else {
|
||||||
startPage();
|
startPage();
|
||||||
list = purchaseCheckInfoService.selectPutInListList(purchaseCheckInfo);
|
list = purchaseCheckInfoService.selectPutInListList(purchaseCheckInfo);
|
||||||
}
|
}
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成套机具明细查看
|
||||||
|
*/
|
||||||
|
@ApiOperation("成套机具明细查看")
|
||||||
|
@GetMapping("/wholeSetDetails")
|
||||||
|
public TableDataInfo wholeSetDetails(PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
|
startPage();
|
||||||
|
List<MachinePart> list = purchaseCheckInfoService.getWholeSetDetails(purchaseCheckInfo);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询新购验收任务列表
|
* 查询新购验收任务列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation("查询新购验收任务列表")
|
@ApiOperation("查询新购验收任务列表")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(PurchaseCheckInfo purchaseCheckInfo)
|
public TableDataInfo list(PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<PurchaseCheckInfo> list = purchaseCheckInfoService.selectPurchaseCheckInfoList(purchaseCheckInfo);
|
List<PurchaseCheckInfo> list = purchaseCheckInfoService.selectPurchaseCheckInfoList(purchaseCheckInfo);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
|
@ -77,8 +87,7 @@ public class PurchaseCheckInfoController extends BaseController
|
||||||
@ApiOperation("导出新购验收任务列表")
|
@ApiOperation("导出新购验收任务列表")
|
||||||
@Log(title = "新购验收任务", businessType = BusinessType.EXPORT)
|
@Log(title = "新购验收任务", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, PurchaseCheckInfo purchaseCheckInfo)
|
public void export(HttpServletResponse response, PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
{
|
|
||||||
List<PurchaseCheckInfo> list = purchaseCheckInfoService.exportList(purchaseCheckInfo);
|
List<PurchaseCheckInfo> list = purchaseCheckInfoService.exportList(purchaseCheckInfo);
|
||||||
ExcelUtil<PurchaseCheckInfo> util = new ExcelUtil<PurchaseCheckInfo>(PurchaseCheckInfo.class);
|
ExcelUtil<PurchaseCheckInfo> util = new ExcelUtil<PurchaseCheckInfo>(PurchaseCheckInfo.class);
|
||||||
util.exportExcel(response, list, "新购验收任务数据");
|
util.exportExcel(response, list, "新购验收任务数据");
|
||||||
|
|
@ -90,8 +99,7 @@ public class PurchaseCheckInfoController extends BaseController
|
||||||
@ApiOperation("导出新购工机具入库")
|
@ApiOperation("导出新购工机具入库")
|
||||||
@Log(title = "导出新购工机具入库", businessType = BusinessType.EXPORT)
|
@Log(title = "导出新购工机具入库", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/putInExport")
|
@PostMapping("/putInExport")
|
||||||
public void putInExport(HttpServletResponse response, PurchaseCheckInfo purchaseCheckInfo)
|
public void putInExport(HttpServletResponse response, PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
{
|
|
||||||
List<PurchaseInput> list = purchaseCheckInfoService.putInExportList(purchaseCheckInfo);
|
List<PurchaseInput> list = purchaseCheckInfoService.putInExportList(purchaseCheckInfo);
|
||||||
ExcelUtil<PurchaseInput> util = new ExcelUtil<PurchaseInput>(PurchaseInput.class);
|
ExcelUtil<PurchaseInput> util = new ExcelUtil<PurchaseInput>(PurchaseInput.class);
|
||||||
util.exportExcel(response, list, "新购工机具入库");
|
util.exportExcel(response, list, "新购工机具入库");
|
||||||
|
|
@ -103,9 +111,8 @@ public class PurchaseCheckInfoController extends BaseController
|
||||||
@ApiOperation("获取新购验收任务详细信息")
|
@ApiOperation("获取新购验收任务详细信息")
|
||||||
@GetMapping(value = "/getDetails")
|
@GetMapping(value = "/getDetails")
|
||||||
public AjaxResult getInfo(@RequestParam(required = false) Long taskId,
|
public AjaxResult getInfo(@RequestParam(required = false) Long taskId,
|
||||||
@RequestParam(required = false) String keyWord)
|
@RequestParam(required = false) String keyWord) {
|
||||||
{
|
return success(purchaseCheckInfoService.selectPurchaseCheckInfoByTaskId(taskId, keyWord));
|
||||||
return success(purchaseCheckInfoService.selectPurchaseCheckInfoByTaskId(taskId,keyWord));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -114,9 +121,8 @@ public class PurchaseCheckInfoController extends BaseController
|
||||||
@ApiOperation("获取新购验收任务验收单")
|
@ApiOperation("获取新购验收任务验收单")
|
||||||
@GetMapping(value = "/getAcceptanceForm")
|
@GetMapping(value = "/getAcceptanceForm")
|
||||||
public AjaxResult getAcceptanceForm(@RequestParam(required = false) Long taskId,
|
public AjaxResult getAcceptanceForm(@RequestParam(required = false) Long taskId,
|
||||||
@RequestParam(required = false) String keyWord)
|
@RequestParam(required = false) String keyWord) {
|
||||||
{
|
return success(purchaseCheckInfoService.getAcceptanceForm(taskId, keyWord));
|
||||||
return success(purchaseCheckInfoService.getAcceptanceForm(taskId,keyWord));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -125,8 +131,7 @@ public class PurchaseCheckInfoController extends BaseController
|
||||||
@ApiOperation("新增新购验收任务")
|
@ApiOperation("新增新购验收任务")
|
||||||
@Log(title = "新购验收任务", businessType = BusinessType.INSERT)
|
@Log(title = "新购验收任务", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody PurchaseCheckInfo purchaseCheckInfo)
|
public AjaxResult add(@RequestBody PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
{
|
|
||||||
return toAjax(purchaseCheckInfoService.insertPurchaseCheckInfo(purchaseCheckInfo));
|
return toAjax(purchaseCheckInfoService.insertPurchaseCheckInfo(purchaseCheckInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -154,9 +159,8 @@ public class PurchaseCheckInfoController extends BaseController
|
||||||
*/
|
*/
|
||||||
@ApiOperation("删除新购验收任务")
|
@ApiOperation("删除新购验收任务")
|
||||||
@Log(title = "新购验收任务", businessType = BusinessType.DELETE)
|
@Log(title = "新购验收任务", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{taskId}")
|
@DeleteMapping("/{taskId}")
|
||||||
public AjaxResult remove(@PathVariable Long taskId)
|
public AjaxResult remove(@PathVariable Long taskId) {
|
||||||
{
|
|
||||||
return toAjax(purchaseCheckInfoService.deletePurchaseCheckInfoByTaskId(taskId));
|
return toAjax(purchaseCheckInfoService.deletePurchaseCheckInfoByTaskId(taskId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.sgzb.material.mapper;
|
package com.bonus.sgzb.material.mapper;
|
||||||
|
|
||||||
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
||||||
|
import com.bonus.sgzb.material.domain.MachinePart;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseInput;
|
import com.bonus.sgzb.material.domain.PurchaseInput;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
@ -10,16 +11,15 @@ import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新购验收任务purchase_check_infoMapper接口
|
* 新购验收任务purchase_check_infoMapper接口
|
||||||
*
|
*
|
||||||
* @author bonus
|
* @author bonus
|
||||||
* @date 2023-12-10
|
* @date 2023-12-10
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface PurchaseCheckInfoMapper
|
public interface PurchaseCheckInfoMapper {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* 查询新购验收任务purchase_check_info
|
* 查询新购验收任务purchase_check_info
|
||||||
*
|
*
|
||||||
* @param taskId 新购验收任务purchase_check_info主键
|
* @param taskId 新购验收任务purchase_check_info主键
|
||||||
* @return 新购验收任务purchase_check_info
|
* @return 新购验收任务purchase_check_info
|
||||||
*/
|
*/
|
||||||
|
|
@ -27,7 +27,7 @@ public interface PurchaseCheckInfoMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询新购验收任务purchase_check_info列表
|
* 查询新购验收任务purchase_check_info列表
|
||||||
*
|
*
|
||||||
* @param purchaseCheckInfo 新购验收任务purchase_check_info
|
* @param purchaseCheckInfo 新购验收任务purchase_check_info
|
||||||
* @return 新购验收任务purchase_check_info集合
|
* @return 新购验收任务purchase_check_info集合
|
||||||
*/
|
*/
|
||||||
|
|
@ -35,7 +35,7 @@ public interface PurchaseCheckInfoMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增新购验收任务purchase_check_info
|
* 新增新购验收任务purchase_check_info
|
||||||
*
|
*
|
||||||
* @param purchaseCheckInfo 新购验收任务purchase_check_info
|
* @param purchaseCheckInfo 新购验收任务purchase_check_info
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -43,7 +43,7 @@ public interface PurchaseCheckInfoMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改新购验收任务purchase_check_info
|
* 修改新购验收任务purchase_check_info
|
||||||
*
|
*
|
||||||
* @param purchaseCheckInfo 新购验收任务purchase_check_info
|
* @param purchaseCheckInfo 新购验收任务purchase_check_info
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -51,7 +51,7 @@ public interface PurchaseCheckInfoMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除新购验收任务purchase_check_info
|
* 删除新购验收任务purchase_check_info
|
||||||
*
|
*
|
||||||
* @param taskId 新购验收任务purchase_check_info主键
|
* @param taskId 新购验收任务purchase_check_info主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -59,7 +59,7 @@ public interface PurchaseCheckInfoMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除新购验收任务purchase_check_info
|
* 批量删除新购验收任务purchase_check_info
|
||||||
*
|
*
|
||||||
* @param taskIds 需要删除的数据主键集合
|
* @param taskIds 需要删除的数据主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -67,14 +67,15 @@ public interface PurchaseCheckInfoMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询新购入库任务列表
|
* 查询新购入库任务列表
|
||||||
* @param taskId
|
*
|
||||||
** @param type 1-验收,2-入库
|
* @param taskId * @param type 1-验收,2-入库
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String selectTypeNameByTaskId(@Param("taskId") Long taskId,@Param("type") String type);
|
String selectTypeNameByTaskId(@Param("taskId") Long taskId, @Param("type") String type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 插入
|
* 插入
|
||||||
|
*
|
||||||
* @param bmNoticeInfo
|
* @param bmNoticeInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -82,6 +83,7 @@ public interface PurchaseCheckInfoMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询
|
* 查询
|
||||||
|
*
|
||||||
* @param purchaseCheckInfo
|
* @param purchaseCheckInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -89,12 +91,15 @@ public interface PurchaseCheckInfoMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新购验收
|
* 新购验收
|
||||||
|
*
|
||||||
* @param purchaseCheckInfo
|
* @param purchaseCheckInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<PurchaseCheckInfo> exportList(PurchaseCheckInfo purchaseCheckInfo);
|
List<PurchaseCheckInfo> exportList(PurchaseCheckInfo purchaseCheckInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新购入库导出
|
* 新购入库导出
|
||||||
|
*
|
||||||
* @param purchaseCheckInfo
|
* @param purchaseCheckInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -102,6 +107,7 @@ public interface PurchaseCheckInfoMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询
|
* 查询
|
||||||
|
*
|
||||||
* @param purchaseCheckInfo
|
* @param purchaseCheckInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -109,8 +115,11 @@ public interface PurchaseCheckInfoMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询 类型名称和管理类型
|
* 查询 类型名称和管理类型
|
||||||
|
*
|
||||||
* @param taskId
|
* @param taskId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<PurchaseCheckInfo> selectTypeNameAndManageTypeByTaskId(Long taskId);
|
List<PurchaseCheckInfo> selectTypeNameAndManageTypeByTaskId(Long taskId);
|
||||||
|
|
||||||
|
List<MachinePart> getWholeSetDetails(PurchaseCheckInfo purchaseCheckInfo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.sgzb.material.service;
|
package com.bonus.sgzb.material.service;
|
||||||
|
|
||||||
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
||||||
|
import com.bonus.sgzb.material.domain.MachinePart;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseInput;
|
import com.bonus.sgzb.material.domain.PurchaseInput;
|
||||||
import com.bonus.sgzb.material.vo.NoticeInfoVO;
|
import com.bonus.sgzb.material.vo.NoticeInfoVO;
|
||||||
|
|
@ -107,4 +108,6 @@ public interface IPurchaseCheckInfoService
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<PurchaseCheckInfo> selectPutInListExamine(PurchaseCheckInfo purchaseCheckInfo);
|
List<PurchaseCheckInfo> selectPutInListExamine(PurchaseCheckInfo purchaseCheckInfo);
|
||||||
|
|
||||||
|
List<MachinePart> getWholeSetDetails(PurchaseCheckInfo purchaseCheckInfo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -205,6 +205,7 @@ public class BackApplyServiceImpl implements BackApplyService {
|
||||||
} else {
|
} else {
|
||||||
return AjaxResult.error("未获取到参数");
|
return AjaxResult.error("未获取到参数");
|
||||||
}
|
}
|
||||||
|
|
||||||
return AjaxResult.success("修改成功");
|
return AjaxResult.success("修改成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||||
public List<PurchaseCheckInfo> selectPutInListList(PurchaseCheckInfo purchaseCheckInfo) {
|
public List<PurchaseCheckInfo> selectPutInListList(PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseCheckInfoMapper.selectPutInListList(purchaseCheckInfo);
|
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseCheckInfoMapper.selectPutInListList(purchaseCheckInfo);
|
||||||
for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) {
|
for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) {
|
||||||
String typeName = purchaseCheckInfoMapper.selectTypeNameByTaskId(checkInfo.getTaskId(),"2");
|
String typeName = purchaseCheckInfoMapper.selectTypeNameByTaskId(checkInfo.getTaskId(), "2");
|
||||||
checkInfo.setPurchasingTypeName(typeName);
|
checkInfo.setPurchasingTypeName(typeName);
|
||||||
}
|
}
|
||||||
return purchaseCheckInfos;
|
return purchaseCheckInfos;
|
||||||
|
|
@ -101,12 +101,17 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||||
public List<PurchaseCheckInfo> selectPutInListExamine(PurchaseCheckInfo purchaseCheckInfo) {
|
public List<PurchaseCheckInfo> selectPutInListExamine(PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseCheckInfoMapper.selectPutInListExamine(purchaseCheckInfo);
|
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseCheckInfoMapper.selectPutInListExamine(purchaseCheckInfo);
|
||||||
for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) {
|
for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) {
|
||||||
String typeName = purchaseCheckInfoMapper.selectTypeNameByTaskId(checkInfo.getTaskId(),"3");
|
String typeName = purchaseCheckInfoMapper.selectTypeNameByTaskId(checkInfo.getTaskId(), "3");
|
||||||
checkInfo.setPurchasingTypeName(typeName);
|
checkInfo.setPurchasingTypeName(typeName);
|
||||||
}
|
}
|
||||||
return purchaseCheckInfos;
|
return purchaseCheckInfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MachinePart> getWholeSetDetails(PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
|
return purchaseCheckInfoMapper.getWholeSetDetails(purchaseCheckInfo);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询新购验收任务列表
|
* 查询新购验收任务列表
|
||||||
*
|
*
|
||||||
|
|
@ -117,13 +122,13 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||||
public List<PurchaseCheckInfo> selectPurchaseCheckInfoList(PurchaseCheckInfo purchaseCheckInfo) {
|
public List<PurchaseCheckInfo> selectPurchaseCheckInfoList(PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseCheckInfoMapper.selectPurchaseCheckInfoList(purchaseCheckInfo);
|
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseCheckInfoMapper.selectPurchaseCheckInfoList(purchaseCheckInfo);
|
||||||
for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) {
|
for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) {
|
||||||
String typeName="";
|
String typeName = "";
|
||||||
List<PurchaseCheckInfo> list = purchaseCheckInfoMapper.selectTypeNameAndManageTypeByTaskId(checkInfo.getTaskId());
|
List<PurchaseCheckInfo> list = purchaseCheckInfoMapper.selectTypeNameAndManageTypeByTaskId(checkInfo.getTaskId());
|
||||||
if (list.size()>0){
|
if (list.size() > 0) {
|
||||||
typeName = list.get(0).getPurchasingTypeName();
|
typeName = list.get(0).getPurchasingTypeName();
|
||||||
if (list.get(0).getManageType().contains("0")){
|
if (list.get(0).getManageType().contains("0")) {
|
||||||
checkInfo.setManageType("0");
|
checkInfo.setManageType("0");
|
||||||
}else {
|
} else {
|
||||||
checkInfo.setManageType("1");
|
checkInfo.setManageType("1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -168,20 +173,22 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||||
return purchaseCheckInfoMapper.insertPurchaseCheckInfo(purchaseCheckInfo);
|
return purchaseCheckInfoMapper.insertPurchaseCheckInfo(purchaseCheckInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**采购单号编码生成规则*/
|
/**
|
||||||
|
* 采购单号编码生成规则
|
||||||
|
*/
|
||||||
private String purchaseCodeRule() {
|
private String purchaseCodeRule() {
|
||||||
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);
|
||||||
String taskNum = taskMapper.selectTaskNumByMonths(nowDate, 23);
|
String taskNum = taskMapper.selectTaskNumByMonths(nowDate, 23);
|
||||||
if (StringHelper.isNotEmpty(taskNum)){
|
if (StringHelper.isNotEmpty(taskNum)) {
|
||||||
// 将字符串转换为整数
|
// 将字符串转换为整数
|
||||||
int num = Integer.parseInt(taskNum);
|
int num = Integer.parseInt(taskNum);
|
||||||
// 执行加一操作
|
// 执行加一操作
|
||||||
num++;
|
num++;
|
||||||
// 将结果转换回字符串格式,并确保结果是四位数,不足四位则在前面补0
|
// 将结果转换回字符串格式,并确保结果是四位数,不足四位则在前面补0
|
||||||
taskNum = String.format("%04d", num);
|
taskNum = String.format("%04d", num);
|
||||||
}else {
|
} else {
|
||||||
taskNum = "0001";
|
taskNum = "0001";
|
||||||
}
|
}
|
||||||
String code = "XG" + format + "-" + taskNum;
|
String code = "XG" + format + "-" + taskNum;
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,14 @@ import com.bonus.sgzb.base.api.domain.SltAgreementApply;
|
||||||
import com.bonus.sgzb.base.api.domain.SltAgreementInfo;
|
import com.bonus.sgzb.base.api.domain.SltAgreementInfo;
|
||||||
import com.bonus.sgzb.base.api.domain.SltAgreementRelation;
|
import com.bonus.sgzb.base.api.domain.SltAgreementRelation;
|
||||||
import com.bonus.sgzb.base.api.domain.SltInfoVo;
|
import com.bonus.sgzb.base.api.domain.SltInfoVo;
|
||||||
|
|
||||||
import com.bonus.sgzb.common.core.exception.ServiceException;
|
import com.bonus.sgzb.common.core.exception.ServiceException;
|
||||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||||
import com.bonus.sgzb.material.domain.AgreementInfo;
|
import com.bonus.sgzb.material.domain.AgreementInfo;
|
||||||
import com.bonus.sgzb.material.domain.TmTask;
|
import com.bonus.sgzb.material.domain.TmTask;
|
||||||
|
|
||||||
import com.bonus.sgzb.material.mapper.SltAgreementInfoMapper;
|
import com.bonus.sgzb.material.mapper.SltAgreementInfoMapper;
|
||||||
import com.bonus.sgzb.material.service.SltAgreementInfoService;
|
import com.bonus.sgzb.material.service.SltAgreementInfoService;
|
||||||
import com.bonus.sgzb.material.vo.GlobalContants;
|
import com.bonus.sgzb.material.vo.GlobalContants;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Tomcat
|
# Tomcat
|
||||||
server:
|
server:
|
||||||
port: 9302
|
port: 29302
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
@ -21,11 +21,11 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 192.168.0.14:8848
|
server-addr: 127.0.0.1:8848
|
||||||
namespace: sgzb_cloud_dev
|
namespace: sgzb_cloud_dev
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 192.168.0.14:8848
|
server-addr: 127.0.0.1:8848
|
||||||
namespace: sgzb_cloud_dev
|
namespace: sgzb_cloud_dev
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
|
|
|
||||||
|
|
@ -309,4 +309,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
) t
|
) t
|
||||||
GROUP BY task_id
|
GROUP BY task_id
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getWholeSetDetails" resultType="com.bonus.sgzb.material.domain.MachinePart">
|
||||||
|
SELECT
|
||||||
|
mt2.type_name AS typeModelName,
|
||||||
|
mt3.type_name AS typeName,
|
||||||
|
aa.part_num * #{purchaseNum} AS partNum,
|
||||||
|
mt2.unit_name as unitName
|
||||||
|
FROM
|
||||||
|
ma_type mt2
|
||||||
|
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id
|
||||||
|
INNER JOIN (
|
||||||
|
SELECT
|
||||||
|
mws.type_id,
|
||||||
|
mws.part_num
|
||||||
|
FROM
|
||||||
|
ma_type mt
|
||||||
|
LEFT JOIN ma_whole_set mws ON mt.type_id = mws.parent_id
|
||||||
|
WHERE
|
||||||
|
mt.type_id = #{typeId}
|
||||||
|
) aa ON aa.type_id = mt2.type_id
|
||||||
|
<if test="keyWord != null and keyWord != ''">
|
||||||
|
WHERE mt2.type_name like concat('%', #{keyWord}, '%')
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Tomcat
|
# Tomcat
|
||||||
server:
|
server:
|
||||||
port: 9201
|
port: 29201
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
@ -25,11 +25,11 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 192.168.0.14:8848
|
server-addr: 127.0.0.1:8848
|
||||||
namespace: sgzb_cloud_dev
|
namespace: sgzb_cloud_dev
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 192.168.0.14:8848
|
server-addr: 127.0.0.1:8848
|
||||||
namespace: sgzb_cloud_dev
|
namespace: sgzb_cloud_dev
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
|
|
|
||||||
|
|
@ -1,143 +0,0 @@
|
||||||
/** 退料ID */
|
|
||||||
@ApiModelProperty(value = "退料ID")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/** 退料ID-字符串 */
|
|
||||||
@ApiModelProperty(value = "退料ID-字符串")
|
|
||||||
private String ids;
|
|
||||||
|
|
||||||
/** 退料单号 */
|
|
||||||
@Excel(name = "退料单号")
|
|
||||||
@ApiModelProperty(value = "退料单号")
|
|
||||||
private String code;
|
|
||||||
|
|
||||||
/** 任务ID */
|
|
||||||
@ApiModelProperty(value = "任务ID")
|
|
||||||
private Integer taskId;
|
|
||||||
|
|
||||||
/** 任务ID */
|
|
||||||
@ApiModelProperty(value = "任务类型")
|
|
||||||
private Integer taskType;
|
|
||||||
|
|
||||||
/** 签订日期 */
|
|
||||||
@ApiModelProperty(value = "签订日期")
|
|
||||||
private String signTime;
|
|
||||||
|
|
||||||
/** 退料人员 */
|
|
||||||
@Excel(name = "退料人员")
|
|
||||||
@ApiModelProperty(value = "退料人员")
|
|
||||||
private String backPerson;
|
|
||||||
|
|
||||||
/** 联系电话 */
|
|
||||||
@Excel(name = "退料人联系电话")
|
|
||||||
@ApiModelProperty(value = "联系电话")
|
|
||||||
private String phone;
|
|
||||||
|
|
||||||
/** 机具公司审核人 */
|
|
||||||
@ApiModelProperty(value = "机具公司审核人")
|
|
||||||
private Integer directAuditBy;
|
|
||||||
|
|
||||||
/** 机具公司审批时间 */
|
|
||||||
@ApiModelProperty(value = "机具公司审批时间")
|
|
||||||
private String directAuditTime;
|
|
||||||
|
|
||||||
/** 机具公司审批备注 */
|
|
||||||
@ApiModelProperty(value = "机具公司审批备注")
|
|
||||||
private String directAuditRemark;
|
|
||||||
|
|
||||||
|
|
||||||
/** 创建者 */
|
|
||||||
@ApiModelProperty(value = "创建者")
|
|
||||||
private String createBy;
|
|
||||||
|
|
||||||
/** 创建时间 */
|
|
||||||
@ApiModelProperty(value = "创建时间")
|
|
||||||
private Date createTime;
|
|
||||||
|
|
||||||
/** 更新者 */
|
|
||||||
@ApiModelProperty(value = "更新者")
|
|
||||||
private String updateBy;
|
|
||||||
|
|
||||||
/** 更新时间 */
|
|
||||||
@ApiModelProperty(value = "更新时间")
|
|
||||||
private Date updateTime;
|
|
||||||
|
|
||||||
/** 备注 */
|
|
||||||
@ApiModelProperty(value = "备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
/** 数据所属组织 */
|
|
||||||
@ApiModelProperty(value = "数据所属组织")
|
|
||||||
private Long companyId;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "关键字")
|
|
||||||
private String keyWord;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "工程id")
|
|
||||||
private Integer lotId;
|
|
||||||
|
|
||||||
@Excel(name = "退料工程名称")
|
|
||||||
@ApiModelProperty(value = "工程名称")
|
|
||||||
private String lotName;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "单位id")
|
|
||||||
private Integer unitId;
|
|
||||||
|
|
||||||
@Excel(name = "退料单位名称")
|
|
||||||
@ApiModelProperty(value = "单位名称")
|
|
||||||
private String unitName;
|
|
||||||
|
|
||||||
@Excel(name = "退料申请时间")
|
|
||||||
@ApiModelProperty(value = "退料日期")
|
|
||||||
private String backTime;
|
|
||||||
|
|
||||||
@Excel(name = "协议号")
|
|
||||||
@ApiModelProperty(value = "协议编号")
|
|
||||||
private String agreementCode;
|
|
||||||
|
|
||||||
@Excel(name = "退料状态")
|
|
||||||
@ApiModelProperty(value = "任务状态")
|
|
||||||
private String taskStatus;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "协议id")
|
|
||||||
private Integer agreementId;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "类型id")
|
|
||||||
private String typeId;
|
|
||||||
|
|
||||||
@Excel(name = "退料工机具类型")
|
|
||||||
@ApiModelProperty(value = "类型名称")
|
|
||||||
private String typeName;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "规格编号")
|
|
||||||
private String typeCode;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "数量")
|
|
||||||
private String num;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "详情id和数量")
|
|
||||||
private String detailsIdByNum;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "类型id和数量")
|
|
||||||
private String typeIdByNum;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "详情id")
|
|
||||||
private String detailsId;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "编码")
|
|
||||||
private String maCode;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "在用数量")
|
|
||||||
private String useNum;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "操作人")
|
|
||||||
private String createName;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "审核人")
|
|
||||||
private String examineName;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "开始时间")
|
|
||||||
private String startTime;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "结束时间")
|
|
||||||
private String endTime;
|
|
||||||
|
|
@ -401,7 +401,7 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
receiveView,
|
receiveView,
|
||||||
|
|
@ -885,4 +885,3 @@ export default {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
Loading…
Reference in New Issue