Compare commits

..

2 Commits

Author SHA1 Message Date
杨万里 615601866d Merge branch 'master' of http://1.13.177.47:3000/Yangwl/SZXBGJ_HT
# Conflicts:
#	ruoyi-admin/src/main/java/com/ruoyi/web/controller/tyre/BaseTyreController.java
#	ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseTyre.java
#	ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseTyreMapper.java
#	ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseTyreService.java
#	ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseTyreServiceImpl.java
2 weeks ago
杨万里 0f29c27d20 轮胎生命周期展示完善 2 weeks ago

@ -19,6 +19,7 @@ import com.ruoyi.system.service.IRecordTyreInstallService;
import com.ruoyi.system.service.IRecordWarehousingService; import com.ruoyi.system.service.IRecordWarehousingService;
import com.ruoyi.system.service.ITyreStatDetailService; import com.ruoyi.system.service.ITyreStatDetailService;
import com.ruoyi.system.domain.vo.InboundBatchPreviewVo; import com.ruoyi.system.domain.vo.InboundBatchPreviewVo;
import com.ruoyi.system.service.*;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -63,6 +64,10 @@ public class BaseTyreController extends BaseController
@Autowired @Autowired
private IBaseInventoryService baseInventoryService; private IBaseInventoryService baseInventoryService;
@Autowired
private IBizOrderTireDetailService bizOrderTireDetailService;
@Autowired
private IBizMaintenanceOrderService iBizMaintenanceOrderService;
@RequiresPermissions("tyre:tyre:view") @RequiresPermissions("tyre:tyre:view")
@GetMapping() @GetMapping()
public String tyre() public String tyre()
@ -546,4 +551,16 @@ public class BaseTyreController extends BaseController
: AjaxResult.error("收货撤回失败或无可撤回轮胎"); : AjaxResult.error("收货撤回失败或无可撤回轮胎");
} }
@PostMapping("/pdaQueryTyreTimeLine")
@ResponseBody
public AjaxResult pdaQueryTyreTimeLine(BaseTyre baseTyre)
{
try {
Map resultMap = baseTyreService.pdaQueryTyreTimeLine(baseTyre);
return success(resultMap);
}catch (Exception e){
e.printStackTrace();
return error();
}
}
} }

@ -7,7 +7,7 @@ ruoyi:
# 版权年份 # 版权年份
copyrightYear: 2026 copyrightYear: 2026
# 实例演示开关 # 实例演示开关
demoEnabled: false demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath # 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: C:/ruoyi/uploadPath profile: C:/ruoyi/uploadPath
# 获取ip地址开关 # 获取ip地址开关

@ -347,6 +347,8 @@ public class ShiroConfig
filterChainDefinitionMap.put("/tyre/order/PDAGetMaintenanceOrder", "anon,captchaValidate"); filterChainDefinitionMap.put("/tyre/order/PDAGetMaintenanceOrder", "anon,captchaValidate");
filterChainDefinitionMap.put("/tyre/order/PDAAddMaintenanceOrder", "anon,captchaValidate"); filterChainDefinitionMap.put("/tyre/order/PDAAddMaintenanceOrder", "anon,captchaValidate");
filterChainDefinitionMap.put("/tyre/order/PDASaveMaintenanceOrder", "anon,captchaValidate"); filterChainDefinitionMap.put("/tyre/order/PDASaveMaintenanceOrder", "anon,captchaValidate");
filterChainDefinitionMap.put("/tyre/tyre/pdaQueryTyreTimeLine", "anon,captchaValidate");
// 系统权限列表 // 系统权限列表
// filterChainDefinitionMap.putAll(SpringUtils.getBean(IMenuService.class).selectPermsAll()); // filterChainDefinitionMap.putAll(SpringUtils.getBean(IMenuService.class).selectPermsAll());

@ -83,6 +83,23 @@ public class BaseTyre extends BaseEntity
* *
*/ */
private String inventoryStatus; private String inventoryStatus;
public String getPressure() {
return pressure;
}
public void setPressure(String pressure) {
this.pressure = pressure;
}
private String keyParam;
public String getKeyParam() {
return keyParam;
}
public void setKeyParam(String keyParam) {
this.keyParam = keyParam;
}
public String getCompany() { public String getCompany() {
return company; return company;

@ -24,8 +24,10 @@ public class BizOrderTireDetail extends BaseEntity
private Long orderId; private Long orderId;
/** 轮胎位置ID关联位置表 */ /** 轮胎位置ID关联位置表 */
@Excel(name = "轮胎位置ID", readConverterExp = "关=联位置表") // @Excel(name = "轮胎位置ID", readConverterExp = "关=联位置表")
private Long positionId; private Long positionId;
@Excel(name = "轮胎位置ID")
private String positionName;
/** 轮胎ID关联轮胎档案如果是新胎可能为空或临时生成 */ /** 轮胎ID关联轮胎档案如果是新胎可能为空或临时生成 */
@Excel(name = "轮胎ID", readConverterExp = "关=联轮胎档案,如果是新胎可能为空或临时生成") @Excel(name = "轮胎ID", readConverterExp = "关=联轮胎档案,如果是新胎可能为空或临时生成")
@ -49,6 +51,14 @@ public class BizOrderTireDetail extends BaseEntity
// 数据类型(保养;换新胎,卸车;换新胎,装车) // 数据类型(保养;换新胎,卸车;换新胎,装车)
private String dataType; private String dataType;
public String getPositionName() {
return positionName;
}
public void setPositionName(String positionName) {
this.positionName = positionName;
}
public String getDataType() { public String getDataType() {
return dataType; return dataType;
} }

@ -90,4 +90,6 @@ public interface BaseTyreMapper
*/ */
int countBaseTyreByInboundCode(@Param("inboundCode") String inboundCode); int countBaseTyreByInboundCode(@Param("inboundCode") String inboundCode);
BaseTyre selectBaseTyreByKeyParam(BaseTyre baseTyre);
} }

@ -84,4 +84,6 @@ public interface IBaseTyreService
*/ */
List<BaseTyre> selectBaseTyresByInboundCode(String inboundCode); List<BaseTyre> selectBaseTyresByInboundCode(String inboundCode);
Map pdaQueryTyreTimeLine(BaseTyre baseTyre);
} }

@ -67,4 +67,5 @@ public interface IRecordTyreInstallService
AjaxResult PdaInstallTyre(RecordTyreInstall recordTyreInstall); AjaxResult PdaInstallTyre(RecordTyreInstall recordTyreInstall);
AjaxResult PdaUnInstallTyre(RecordTyreInstall recordTyreInstall); AjaxResult PdaUnInstallTyre(RecordTyreInstall recordTyreInstall);
} }

@ -19,6 +19,7 @@ import org.springframework.beans.BeanUtils;
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 java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -37,6 +38,12 @@ public class BaseTyreServiceImpl implements IBaseTyreService
{ {
@Autowired @Autowired
private BaseTyreMapper baseTyreMapper; private BaseTyreMapper baseTyreMapper;
@Autowired
private RecordWarehousingMapper recordWarehousingMapper;
@Autowired
private RecordTyreInstallMapper recordTyreInstallMapper;
private static final Logger log = LoggerFactory.getLogger(BaseTyreServiceImpl.class); private static final Logger log = LoggerFactory.getLogger(BaseTyreServiceImpl.class);
/** /**
* *
@ -245,4 +252,28 @@ public class BaseTyreServiceImpl implements IBaseTyreService
public List<BaseTyre> selectBaseTyresByInboundCode(String inboundCode) { public List<BaseTyre> selectBaseTyresByInboundCode(String inboundCode) {
return baseTyreMapper.selectByInboundCode(inboundCode); return baseTyreMapper.selectByInboundCode(inboundCode);
} }
@Override
public Map pdaQueryTyreTimeLine(BaseTyre baseTyre) {
Map map = new HashMap();
//查询轮胎数据
BaseTyre resultBase = baseTyreMapper.selectBaseTyreByKeyParam(baseTyre);
if (resultBase==null){
return map;
}else {
map.put("resultBase",resultBase);
//查询出入库数据
String tyreRfid = resultBase.getTyreEpc();
RecordWarehousing recordWarehousing = new RecordWarehousing();
recordWarehousing.setTyreRfid(tyreRfid);
List<RecordWarehousing> recordWarehousingList = recordWarehousingMapper.selectRecordWarehousingList(recordWarehousing);
map.put("recordWarehousingList",recordWarehousingList);
//查询操作记录记录(装卸车)
RecordTyreInstall recordTyreInstall = new RecordTyreInstall();
recordTyreInstall.setTyreRfid(tyreRfid);
List<RecordTyreInstall> recordTyreInstallList = recordTyreInstallMapper.selectRecordTyreInstallList(recordTyreInstall);
map.put("recordTyreInstallList",recordTyreInstallList);
return map;
}
}
} }

@ -179,6 +179,8 @@ public class RecordTyreInstallServiceImpl implements IRecordTyreInstallService
} }
return AjaxResult.error("卸胎失败!"); return AjaxResult.error("卸胎失败!");
} }
public static long calculateMileageDifference(long endMileage, long startMileage) { public static long calculateMileageDifference(long endMileage, long startMileage) {
return Math.abs(endMileage - startMileage); return Math.abs(endMileage - startMileage);
} }

@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="tyreModel" column="tyre_model" /> <result property="tyreModel" column="tyre_model" />
<result property="tyreLevel" column="tyre_level" /> <result property="tyreLevel" column="tyre_level" />
<result property="tyrePattern" column="tyre_pattern" /> <result property="tyrePattern" column="tyre_pattern" />
<result property="pressure" column="pressure" />
<result property="tyreType" column="tyre_type" /> <result property="tyreType" column="tyre_type" />
<result property="team" column="team" /> <result property="team" column="team" />
<result property="deptName" column="dept_name" /> <result property="deptName" column="dept_name" />
@ -141,6 +142,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
${params.dataScope} ${params.dataScope}
</where> </where>
</select> </select>
<select id="selectBaseTyreByKeyParam" resultMap="BaseTyreResult" parameterType="BaseTyre">
SELECT
tyre_id,
tyre_no,
self_no,
tyre_epc,
tyre_brand,
tyre_model,
tyre_level,
tyre_pattern,
pattern_depth,
tyre_type,
sdss.dept_name as company,
d.team,
sd.dept_name as carTeam,
su.user_name AS create_by,
d.create_time,
d.update_by,
d.update_time,
d.remark,
d.car_no,
wheel_postion,
d.pressure
FROM
base_tyre d
LEFT JOIN sys_user su ON su.login_name = d.create_by
LEFT JOIN base_car bc ON bc.car_no = d.car_no
LEFT JOIN sys_dept sd ON bc.dept_id = sd.dept_id
LEFT JOIN sys_dept sds ON sd.parent_id = sds.dept_id
LEFT JOIN sys_dept sdss ON sds.parent_id = sdss.dept_id
where tyre_id is not null
<if test="keyParam != null and keyParam != ''">and d.tyre_epc = #{keyParam} OR d.tyre_no = #{keyParam} OR d.self_no = #{keyParam}</if>
</select>
<insert id="insertBaseTyre" parameterType="BaseTyre"> <insert id="insertBaseTyre" parameterType="BaseTyre">

@ -111,6 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN sys_user su ON su.login_name = bmo.create_by LEFT JOIN sys_user su ON su.login_name = bmo.create_by
LEFT JOIN sys_user sus ON sus.login_name = bmo.update_by LEFT JOIN sys_user sus ON sus.login_name = bmo.update_by
LEFT JOIN base_car bc ON bc.id = bmo.vehicle_id LEFT JOIN base_car bc ON bc.id = bmo.vehicle_id
where order_id = #{orderId} where order_id = #{orderId}
</select> </select>
<select id="selectBizMaintenanceOrderTD" resultMap="BizMaintenanceOrderResult"> <select id="selectBizMaintenanceOrderTD" resultMap="BizMaintenanceOrderResult">

@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="positionName" column="position_name" />
</resultMap> </resultMap>
<sql id="selectBizOrderTireDetailVo"> <sql id="selectBizOrderTireDetailVo">
@ -25,15 +26,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectBizOrderTireDetailList" parameterType="BizOrderTireDetail" resultMap="BizOrderTireDetailResult"> <select id="selectBizOrderTireDetailList" parameterType="BizOrderTireDetail" resultMap="BizOrderTireDetailResult">
<include refid="selectBizOrderTireDetailVo"/> select botd.detail_id, botd.order_id, botd.position_id, botd.tire_id, botd.tire_code, botd.tread_depth,
botd.tire_press, botd.tire_status, botd.create_by, botd.create_time, botd.update_by, botd.update_time, botd.remark,
sda.dict_label as position_name
from biz_order_tire_detail botd
LEFT JOIN sys_dict_data sda ON sda.dict_value = botd.position_id
<where> <where>
<if test="orderId != null "> and order_id = #{orderId}</if> <if test="orderId != null "> and botd.order_id = #{orderId}</if>
<if test="positionId != null "> and position_id = #{positionId}</if> <if test="positionId != null "> and botd.position_id = #{positionId}</if>
<if test="tireId != null "> and tire_id = #{tireId}</if> <if test="tireId != null "> and botd.tire_id = #{tireId}</if>
<if test="tireCode != null and tireCode != ''"> and tire_code = #{tireCode}</if> <if test="tireCode != null and tireCode != ''"> and botd.tire_code = #{tireCode}</if>
<if test="treadDepth != null "> and tread_depth = #{treadDepth}</if> <if test="treadDepth != null "> and botd.tread_depth = #{treadDepth}</if>
<if test="tirePress != null "> and tire_press = #{tirePress}</if> <if test="tirePress != null "> and botd.tire_press = #{tirePress}</if>
<if test="tireStatus != null and tireStatus != ''"> and tire_status = #{tireStatus}</if> <if test="tireStatus != null and tireStatus != ''"> and botd.tire_status = #{tireStatus}</if>
</where> </where>
</select> </select>

Loading…
Cancel
Save