测试app问题项修改

This commit is contained in:
csyue 2024-04-22 18:58:46 +08:00
parent 10994deeb4
commit f94470a742
20 changed files with 92 additions and 39 deletions

View File

@ -272,6 +272,8 @@ public class SysLoginService {
public static String generateRandomPassword(int length) {
String characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
Random random = new Random();
StringBuilder password = new StringBuilder();
for (int i = 0; i < length; i++) {

View File

@ -1,6 +1,6 @@
# Tomcat
server:
port: 9200
port: 29200
# Spring
spring:
@ -14,11 +14,11 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 192.168.0.14:8848
server-addr: 127.0.0.1:8848
namespace: sgzb_cloud_dev
config:
# 配置中心地址
server-addr: 192.168.0.14:8848
server-addr: 127.0.0.1:8848
namespace: sgzb_cloud_dev
# 配置文件格式
file-extension: yml

View File

@ -1,6 +1,6 @@
# Tomcat
server:
port: 8080
port: 28080
# Spring Boot Actuator V2中风险漏洞处理禁止远程端口访问
management:
@ -27,11 +27,11 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 192.168.0.14:8848
server-addr: 127.0.0.1:8848
namespace: sgzb_cloud_dev
config:
# 配置中心地址
server-addr: 192.168.0.14:8848
server-addr: 127.0.0.1:8848
namespace: sgzb_cloud_dev
# 配置文件格式
file-extension: yml

View File

@ -140,6 +140,8 @@ public class BackReceiveController extends BaseController {
return AjaxResult.success("接收成功");
} else if (res == -1) {
return AjaxResult.error("该编码已接收");
} else if (res == -2) {
return AjaxResult.error("已超出退料数量!!");
} else {
return AjaxResult.error("接收失败");
}

View File

@ -165,6 +165,7 @@ public class BackApplyInfo {
private List<BackApplyInfo> backApplyDetails;
private Integer parentId;
private String sdStatus;
private String sdId;
/**
* 二维码编码
*/

View File

@ -160,7 +160,7 @@ public interface BackReceiveMapper {
* @param record
* @return List<BackApplyInfo>
*/
BackApplyInfo backReceiveRecord(BackApplyInfo record);
List<BackApplyInfo> backReceiveRecord(BackApplyInfo record);
/**
* 查询
@ -194,4 +194,6 @@ public interface BackReceiveMapper {
int deleteCheckDetails(BackApplyInfo backApplyInfo);
List<Integer> getMaId(BackApplyInfo backApplyInfo);
int selectNumByTypeId(@Param("parentId")Integer parentId,@Param("typeId") String typeId);
}

View File

@ -108,14 +108,20 @@ public class BackReceiveServiceImpl implements BackReceiveService {
BackApplyInfo[] arr = record.getArr();
if (arr.length > 0) {
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查询是否已接收
int re = backReceiveMapper.selectCodeByMaIdAndTaskId(arr[i].getMaId(), record.getTaskId());
re = backReceiveMapper.selectCodeByMaIdAndTaskId(arr[i].getMaId(), record.getTaskId());
if (re > 0) {
res = -1;
break;
}
}
if (res == -1) {
if (res < 0) {
return res;
}
}
@ -123,7 +129,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
//修改任务状态
res = updateTaskStatus(taskId, 39);
if (res == 0) {
throw new RuntimeException("插入back_check_details异常");
throw new RuntimeException("修改updateTaskStatus异常");
}
//插入back_check_details
res = insertBcd(record);
@ -239,16 +245,9 @@ public class BackReceiveServiceImpl implements BackReceiveService {
@Override
public List<BackApplyInfo> backReceiveRecord(BackApplyInfo record) {
String typeId = record.getTypeId();
String[] split = typeId.split(",");
List<BackApplyInfo> backApplyInfoList = new ArrayList<>();
for (String s : split) {
record.setTypeId(s);
BackApplyInfo backApplyInfo = backReceiveMapper.backReceiveRecord(record);
if (backApplyInfo != null) {
backApplyInfoList.add(backApplyInfo);
}
}
List<BackApplyInfo> backApplyInfoList = backReceiveMapper.backReceiveRecord(record);
return backApplyInfoList;
}

View File

@ -92,13 +92,17 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
if (CollUtil.isEmpty(maMachineByMaIdAndMaCode)) {
maMachine.setCreateTime(new Date());
int i = maMachineMapper.maMachineAdd(maMachine);
String labelCode = maMachine.getQrCode();
MaLabelBind maLabelBinds = maLabelBindMapper.selectMaLabelBindByMaCode(maMachine);
if (maLabelBinds != null) {
MaLabelBindVO maLabelBind = new MaLabelBindVO();
maLabelBind.setTypeId(maMachine.getTypeId());
maLabelBind.setBindTime(new Date().toString());
maLabelBind.setBinder(SecurityUtils.getLoginUser().getUsername());
maLabelBindMapper.updateMaLabelBind(maLabelBind);
return 0;
} else {
MaLabelBind maLabelBind = new MaLabelBind();
@ -106,10 +110,13 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
maLabelBind.setMaId(maMachine.getMaId());
maLabelBind.setTypeId(maMachine.getTypeId());
maLabelBind.setBindTime(new Date());
maLabelBind.setBinder(SecurityUtils.getLoginUser().getUsername());
maLabelBind.setStatus("1");
maLabelBind.setLabelType(9);
maLabelBindMapper.insertLabelBind(maLabelBind);
maLabelBindMapper.updateMalableCode(maLabelBind);
maLabelBindMapper.updateMatypeNum(maLabelBind);
return 0;
}
} else {
@ -185,7 +192,7 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
return AjaxResult.error("您已提交,请勿重复点击");
}
} catch (Exception e) {
log.error(e.getMessage());
e.printStackTrace();
return AjaxResult.error("出库失败");
}
return AjaxResult.success("出库成功");

View File

@ -1055,7 +1055,7 @@ public class TmTaskServiceImpl implements TmTaskService {
}
} catch (Exception e) {
log.error(e.getMessage(), e);
e.printStackTrace();
}
return res;
}

View File

@ -90,4 +90,8 @@ public interface MaLabelBindMapper
int insertLabelBind(MaLabelBind maLabelBind);
MaLabelBind selectMaLabelBindByMaCode(MaMachine maMachine);
void updateMalableCode(MaLabelBind maLabelBind);
void updateMatypeNum(MaLabelBind maLabelBind);
}

View File

@ -1,6 +1,6 @@
# Tomcat
server:
port: 9301
port: 29301
# Spring
spring:
@ -21,11 +21,11 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 192.168.0.14:8848
server-addr: 127.0.0.1:8848
namespace: sgzb_cloud_dev
config:
# 配置中心地址
server-addr: 192.168.0.14:8848
server-addr: 127.0.0.1:8848
namespace: sgzb_cloud_dev
# 配置文件格式
file-extension: yml

View File

@ -483,6 +483,7 @@
<select id="examineList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
SELECT
bai.id,
bai.code,
bai.status,
bai.back_person as backPerson,
bai.phone,

View File

@ -648,7 +648,7 @@
bagi.plan_start_time
<if test="typeId != null and typeId != ''">
HAVING
FIND_IN_SET(#{typeId}, GROUP_CONCAT(DISTINCT mt2.type_id))
FIND_IN_SET(#{typeId}, GROUP_CONCAT(DISTINCT bad.type_id))
</if>
ORDER BY
tt.task_status ASC,
@ -696,12 +696,8 @@
</if>
</select>
<select id="selectTaskNumByMonthWx" resultType="java.lang.String">
SELECT SUBSTRING(`code`, - 4) as code
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 id="selectTaskNumByMonthWx" resultType="java.lang.Integer">
select count(*) from tm_task where DATE_FORMAT(create_time,'%y%m') = DATE_FORMAT(#{date},'%y%m') and task_type = #{taskType}
</select>
<select id="getHgList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
SELECT

View File

@ -16,6 +16,32 @@
<result column="company_id" jdbcType="INTEGER" property="companyId" />
</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">
task_id, task_type, task_status, code, create_by, create_time, update_by, update_time,
remark, company_id

View File

@ -194,6 +194,16 @@
ma_id = #{maId},is_bind =#{isBind}
where label_id =#{labelId}
</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 into ma_maLabel
<trim prefix="(" suffix=")" suffixOverrides=",">

View File

@ -22,7 +22,7 @@ public class SgzbMaterialApplication
public static void main(String[] args)
{
SpringApplication.run(SgzbMaterialApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 基础管理模块启动成功 ლ(´ڡ`ლ)゙ \n" +
System.out.println("(♥◠‿◠)ノ゙ 机具管理模块启动成功 ლ(´ڡ`ლ)゙ \n" +
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +

View File

@ -205,6 +205,7 @@ public class BackApplyServiceImpl implements BackApplyService {
} else {
return AjaxResult.error("未获取到参数");
}
return AjaxResult.success("修改成功");
}

View File

@ -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.SltAgreementRelation;
import com.bonus.sgzb.base.api.domain.SltInfoVo;
import com.bonus.sgzb.common.core.exception.ServiceException;
import com.bonus.sgzb.common.core.utils.DateUtils;
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.common.security.utils.SecurityUtils;
import com.bonus.sgzb.material.domain.AgreementInfo;
import com.bonus.sgzb.material.domain.TmTask;
import com.bonus.sgzb.material.mapper.SltAgreementInfoMapper;
import com.bonus.sgzb.material.service.SltAgreementInfoService;
import com.bonus.sgzb.material.vo.GlobalContants;

View File

@ -1,6 +1,6 @@
# Tomcat
server:
port: 9302
port: 29302
# Spring
spring:
@ -21,11 +21,11 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 192.168.0.14:8848
server-addr: 127.0.0.1:8848
namespace: sgzb_cloud_dev
config:
# 配置中心地址
server-addr: 192.168.0.14:8848
server-addr: 127.0.0.1:8848
namespace: sgzb_cloud_dev
# 配置文件格式
file-extension: yml

View File

@ -1,6 +1,6 @@
# Tomcat
server:
port: 9201
port: 29201
# Spring
spring:
@ -25,11 +25,11 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 192.168.0.14:8848
server-addr: 127.0.0.1:8848
namespace: sgzb_cloud_dev
config:
# 配置中心地址
server-addr: 192.168.0.14:8848
server-addr: 127.0.0.1:8848
namespace: sgzb_cloud_dev
# 配置文件格式
file-extension: yml