Merge branch 'master' of http://git.unissense.tech/mula/unis_sip
commit
c3f1d39a7a
|
@ -11,9 +11,9 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">关联合同:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="orderId" class="form-control" required>
|
||||
<input style="display: none" name="orderId" class="form-control" readonly type="text" required>
|
||||
<input name="orderName" class="form-control" readonly type="text" onclick="openList()" required>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -128,20 +128,19 @@
|
|||
focusCleanup: true
|
||||
});
|
||||
$(function (){
|
||||
getOrderList()
|
||||
|
||||
})
|
||||
function getOrderList() {
|
||||
$.operate.post(prefixOrder + "/list",{isTable:0}, function (res){
|
||||
orderList=res.rows
|
||||
$("[name='orderId']").html(
|
||||
orderList.map((ele)=>{
|
||||
return `<option value="${ele.id}">${ele.orderName}</option>`
|
||||
}).join('')
|
||||
)
|
||||
|
||||
})
|
||||
}
|
||||
// function getOrderList() {
|
||||
// $.operate.post(prefixOrder + "/list",{isTable:0}, function (res){
|
||||
// orderList=res.rows
|
||||
// $("[name='orderId']").html(
|
||||
// orderList.map((ele)=>{
|
||||
// return `<option value="${ele.id}">${ele.orderName}</option>`
|
||||
// }).join('')
|
||||
// )
|
||||
//
|
||||
// })
|
||||
// }
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-delivery-add').serialize());
|
||||
|
@ -159,6 +158,18 @@ function getOrderList() {
|
|||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
function openList(id){
|
||||
var options = {
|
||||
title: "关联合同",
|
||||
url: prefix + '/selectOrder',
|
||||
skin: 'layui-layer-gray',
|
||||
btn: false,
|
||||
maxmin: false,
|
||||
full: false,
|
||||
index:1000
|
||||
};
|
||||
$.modal.openOptions(options)
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -12,9 +12,9 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">关联合同:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="orderId" class="form-control" th:orderId="*{orderId}" required>
|
||||
<input style="display: none" th:orderId="*{orderId}" name="orderId" class="form-control" readonly type="text" required>
|
||||
<input name="orderName" th:orderName="*{orderName}" class="form-control" readonly type="text" onclick="openList()" required>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -128,17 +128,19 @@
|
|||
focusCleanup: true
|
||||
});
|
||||
$(function (){
|
||||
getOrderList()
|
||||
setTimeout( getOrderList(),500)
|
||||
|
||||
})
|
||||
function getOrderList() {
|
||||
$.operate.post(prefixOrder + "/list",{isTable:0}, function (res){
|
||||
orderList=res.rows
|
||||
var orderId=$("[name='orderId']").attr('orderid')
|
||||
$("[name='orderId']").html(
|
||||
orderList.map((ele)=>{
|
||||
return `<option value="${ele.id}" ${orderId==ele.id?'selected':''}>${ele.orderName}</option>`
|
||||
}).join('')
|
||||
)
|
||||
orderList.forEach((ele)=>{
|
||||
if(ele.id==orderId){
|
||||
$("[name='orderName']").val(ele.orderName)
|
||||
$("[name='orderId']").val(ele.id)
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
|
@ -159,6 +161,18 @@
|
|||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
function openList(){
|
||||
var options = {
|
||||
title: "关联合同",
|
||||
url: prefix + '/selectOrder',
|
||||
skin: 'layui-layer-gray',
|
||||
btn: false,
|
||||
maxmin: false,
|
||||
full: false,
|
||||
index:1000
|
||||
};
|
||||
$.modal.openOptions(options)
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -63,6 +63,10 @@ url: prefix + "/list",
|
|||
field: 'productCode',
|
||||
title: '产品编码'
|
||||
},
|
||||
{
|
||||
field: 'model',
|
||||
title: '产品型号'
|
||||
},
|
||||
{
|
||||
field: 'serialNumber',
|
||||
title: '产品序列号'
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('关联合同')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="col-sm-12 select-table table-striped" >
|
||||
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
|
||||
|
||||
<script>
|
||||
var prefixOrder = ctx + "manage/order";
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefixOrder + "/list",
|
||||
showSearch:false,
|
||||
showColumns:false,
|
||||
showToggle:false,
|
||||
showPageGo:true,
|
||||
params:{
|
||||
|
||||
},
|
||||
onClickRow:function (row,event) {
|
||||
$(parent[parent.length-2].document).find("input[name='orderId']").val(row.id)
|
||||
$(parent[parent.length-2].document).find("input[name='orderName']").val(row.orderName)
|
||||
$.modal.close();
|
||||
|
||||
},
|
||||
columns: [{
|
||||
checkbox: false,
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '主键',
|
||||
},
|
||||
{
|
||||
field: 'orderCode',
|
||||
title: '合同编号'
|
||||
},
|
||||
{
|
||||
field: 'orderName',
|
||||
title: '合同名称'
|
||||
},
|
||||
]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('关联合同')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="col-sm-12 select-table table-striped" >
|
||||
<h2>查询结果</h2>
|
||||
<h4 style="margin-top: 40px;">产品信息</h4>
|
||||
<table>
|
||||
<tr>
|
||||
<th>硬件序列号</th>
|
||||
<th>产品号</th>
|
||||
<th>产品描述</th>
|
||||
<th>产品线描述</th>
|
||||
<th>区域</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2131340A.CZ02300002M</td>
|
||||
<td>313048.C</td>
|
||||
<td>H3C Workspace 云桌面许可证</td>
|
||||
<td>云产品</td>
|
||||
<td>CN</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
getData()
|
||||
});
|
||||
function getData() {
|
||||
|
||||
$.operate.get("/system/product/query",{isTable:0}, function (res){
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -34,6 +34,7 @@
|
|||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Shiro使用EhCache缓存框架 -->
|
||||
<dependency>
|
||||
|
@ -94,7 +95,10 @@
|
|||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -27,5 +27,9 @@
|
|||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
package com.ruoyi.sip.controller;
|
||||
|
||||
|
||||
import com.ruoyi.sip.service.IOrderDeliveryService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
/**
|
||||
* @author : ch
|
||||
* @version : 1.0
|
||||
* @ClassName : MaintenanceController
|
||||
* @Description :
|
||||
* @DATE : Created in 11:25 2025/4/23
|
||||
* <pre> Copyright: Copyright(c) 2025 </pre>
|
||||
* <pre> Company : 紫光汇智信息技术有限公司 </pre>
|
||||
* Modification History:
|
||||
* Date Author Version Discription
|
||||
* --------------------------------------------------------------------------
|
||||
* 2025/04/23 ch 1.0 Why & What is modified: <修改原因描述> *
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/manage/service")
|
||||
public class MaintenanceController {
|
||||
private String prefix = "manage/service";
|
||||
|
||||
|
||||
|
||||
@GetMapping()
|
||||
public String service()
|
||||
{
|
||||
return prefix + "/service";
|
||||
}
|
||||
}
|
|
@ -40,6 +40,11 @@ public class OrderDeliveryController extends BaseController
|
|||
{
|
||||
return prefix + "/delivery";
|
||||
}
|
||||
@GetMapping("/selectOrder")
|
||||
public String selectOrder()
|
||||
{
|
||||
return prefix + "/selectOrder";
|
||||
}
|
||||
@RequiresPermissions("manage:delivery:view")
|
||||
@GetMapping("/import/{id}")
|
||||
public String importView(@PathVariable("id") Long id, ModelMap mmap)
|
||||
|
|
|
@ -2,16 +2,13 @@ package com.ruoyi.sip.controller;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
||||
import com.ruoyi.sip.domain.OrderList;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.sip.domain.OrderInfo;
|
||||
|
@ -127,4 +124,12 @@ public class OrderInfoController extends BaseController
|
|||
{
|
||||
return toAjax(orderInfoService.deleteOrderInfoByIds(ids));
|
||||
}
|
||||
|
||||
@Log(title = "合同档案", businessType = BusinessType.DELETE)
|
||||
@GetMapping( "/query")
|
||||
@ResponseBody
|
||||
public AjaxResult query(MaintenanceRecordsDto dto)
|
||||
{
|
||||
return AjaxResult.success(orderInfoService.selectOrderInfoByMaintenance(dto));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.ruoyi.sip.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
@ -125,4 +127,17 @@ public class ProductInfoController extends BaseController
|
|||
{
|
||||
return toAjax(productInfoService.deleteProductInfoByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据序列号查询产品信息
|
||||
*/
|
||||
|
||||
|
||||
@GetMapping( "/query")
|
||||
@ResponseBody
|
||||
public AjaxResult query(MaintenanceRecordsDto dto)
|
||||
{
|
||||
return AjaxResult.success(productInfoService.query(dto));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ public class DeliveryList extends BaseEntity
|
|||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
private String model;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
// @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
|
@ -141,11 +142,20 @@ public class DeliveryList extends BaseEntity
|
|||
return deletedAt;
|
||||
}
|
||||
|
||||
public String getModel() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public void setModel(String model) {
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new StringJoiner(", ", DeliveryList.class.getSimpleName() + "[", "]")
|
||||
.add("id=" + id)
|
||||
.add("deliveryId=" + deliveryId)
|
||||
.add("model=" + model)
|
||||
.add("orderCode='" + orderCode + "'")
|
||||
.add("productCode='" + productCode + "'")
|
||||
.add("serialNumber='" + serialNumber + "'")
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
package com.ruoyi.sip.domain;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author : ch
|
||||
* @version : 1.0
|
||||
* @ClassName : MaintenanceRecordsDto
|
||||
* @Description :
|
||||
* @DATE : Created in 17:50 2025/4/22
|
||||
* <pre> Copyright: Copyright(c) 2025 </pre>
|
||||
* <pre> Company : 紫光汇智信息技术有限公司 </pre>
|
||||
* Modification History:
|
||||
* Date Author Version Discription
|
||||
* --------------------------------------------------------------------------
|
||||
* 2025/04/22 ch 1.0 Why & What is modified: <修改原因描述> *
|
||||
*/
|
||||
@Data
|
||||
public class MaintenanceRecordsDto {
|
||||
//序列号
|
||||
private String serialNumber;
|
||||
private String productCode;
|
||||
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
package com.ruoyi.sip.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
||||
import com.ruoyi.sip.domain.OrderInfo;
|
||||
import com.ruoyi.sip.domain.OrderList;
|
||||
|
||||
|
@ -99,4 +101,6 @@ public interface OrderInfoMapper
|
|||
void updateListBatch(List<OrderList> orderListList);
|
||||
|
||||
List<OrderList> listOrderListByDeliveryId(Long deliveryId);
|
||||
|
||||
List<OrderInfo> selectOrderInfoByMaintenance(MaintenanceRecordsDto dto);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.ruoyi.sip.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
||||
import com.ruoyi.sip.domain.ProductInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
@ -63,4 +65,7 @@ public interface ProductInfoMapper
|
|||
|
||||
|
||||
List<ProductInfo> listByProductCodeList(@Param("list") List<String> productCodeList);
|
||||
|
||||
List<ProductInfo> query(MaintenanceRecordsDto dto);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.ruoyi.sip.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
||||
import com.ruoyi.sip.domain.OrderInfo;
|
||||
import com.ruoyi.sip.domain.OrderList;
|
||||
|
||||
|
@ -59,4 +61,6 @@ public interface IOrderInfoService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInfoById(Long id);
|
||||
|
||||
List<OrderInfo> selectOrderInfoByMaintenance(MaintenanceRecordsDto dto);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package com.ruoyi.sip.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.sip.controller.ProductInfoController;
|
||||
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
||||
import com.ruoyi.sip.domain.ProductInfo;
|
||||
|
||||
/**
|
||||
|
@ -58,4 +61,6 @@ public interface IProductInfoService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteProductInfoById(Long id);
|
||||
|
||||
List<ProductInfo> query(MaintenanceRecordsDto dto);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package com.ruoyi.sip.service.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
|
@ -133,6 +136,14 @@ public class OrderInfoServiceImpl implements IOrderInfoService
|
|||
return orderInfoMapper.deleteOrderInfoById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderInfo> selectOrderInfoByMaintenance(MaintenanceRecordsDto dto) {
|
||||
if (StringUtils.isEmpty(dto.getSerialNumber()) && StringUtils.isEmpty(dto.getProductCode())){
|
||||
dto.setSerialNumber("-23232$$$$32");
|
||||
}
|
||||
return orderInfoMapper.selectOrderInfoByMaintenance(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增合同清单信息
|
||||
*
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package com.ruoyi.sip.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.sip.mapper.ProductInfoMapper;
|
||||
|
@ -91,4 +94,12 @@ public class ProductInfoServiceImpl implements IProductInfoService
|
|||
{
|
||||
return productInfoMapper.deleteProductInfoById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductInfo> query(MaintenanceRecordsDto dto) {
|
||||
if (StringUtils.isEmpty(dto.getSerialNumber()) && StringUtils.isEmpty(dto.getProductCode())){
|
||||
dto.setSerialNumber("-23232$$$$32");
|
||||
}
|
||||
return productInfoMapper.query(dto);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
select t1.id, t1.delivery_id,t1.product_code, t1.serial_number, t1.remark, t1.created_at, t1.updated_at, t1.deleted_at,
|
||||
t2.delivery_code,
|
||||
t3.product_code, t3.product_name,
|
||||
t3.product_code, t3.product_name,t3.model,
|
||||
t4.order_code
|
||||
from delivery_list t1
|
||||
left join order_delivery t2 on t1.delivery_id = t2.id
|
||||
|
|
|
@ -136,6 +136,20 @@
|
|||
where order_id = (select order_id from order_delivery where id = #{deliveryId} and status=0)
|
||||
and status=0
|
||||
</select>
|
||||
<select id="selectOrderInfoByMaintenance" resultType="com.ruoyi.sip.domain.OrderInfo">
|
||||
<include refid="selectOrderInfoVo"/>
|
||||
where status=0
|
||||
<if test="serialNumber!=null and serialNumber!=''">
|
||||
and id in (
|
||||
select t2.order_id from delivery_list t1 left join order_delivery t2 on t1.delivery_id =t2.id where
|
||||
t1.serial_number=#{serialNumber})
|
||||
</if>
|
||||
<if test="productCode!=null and productCode!=''">
|
||||
and id in (
|
||||
select t2.order_id from delivery_list t1 left join order_delivery t2 on t1.delivery_id =t2.id where
|
||||
t1.product_code=#{productCode})
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insertOrderInfo" parameterType="OrderInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into order_info
|
||||
|
|
|
@ -42,6 +42,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="query" resultType="com.ruoyi.sip.domain.ProductInfo">
|
||||
<include refid="selectProductInfoVo"/>
|
||||
<where>
|
||||
<if test="serialNumber!=null and serialNumber!=''">
|
||||
and product_code in (select product_code from delivery_list where serial_number=#{serialNumber})
|
||||
</if>
|
||||
<if test="productCode!=null and productCode!=''">
|
||||
and product_code=#{productCode}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertProductInfo" parameterType="ProductInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
|
|
Loading…
Reference in New Issue