测试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) { 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++) {

View File

@ -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

View File

@ -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

View File

@ -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("接收失败");
} }

View File

@ -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;
/** /**
* 二维码编码 * 二维码编码
*/ */

View File

@ -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,6 @@ 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);
} }

View File

@ -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);
@ -239,16 +245,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;
} }

View File

@ -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("出库成功");

View File

@ -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;
} }

View File

@ -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);
} }

View File

@ -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

View File

@ -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,

View File

@ -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,
@ -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

View File

@ -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

View File

@ -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=",">

View File

@ -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" +

View File

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

View File

@ -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

View File

@ -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