Browse Source

[delete]删除物料中技术团队

dev
zhangsiqi 7 months ago
parent
commit
25b5a31bcd
  1. 13
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysErpMaterialProductItemMapper.java
  2. 14
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysErpMaterialProductItemService.java
  3. 37
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/ISysErpMaterialProductItemServiceIpml.java
  4. 143
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysProductItemServiceImpl.java
  5. 50
      ruoyi-admin/src/main/resources/mapper/system/SysErpMaterialProductItemMapper.xml
  6. 148
      ruoyi-admin/src/main/resources/templates/system/customer/customer.html

13
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysErpMaterialProductItemMapper.java

@ -1,13 +0,0 @@
package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.SysErpMaterialProductItem;
import java.util.List;
public interface SysErpMaterialProductItemMapper {
List<SysErpMaterialProductItem> selectSysMaterialProductItemList(SysErpMaterialProductItem sysErpMaterialProductItem);
SysErpMaterialProductItem selectSysMaterialProductItemListById(Long iconId);
Integer insertSysErpMaterialProductItem(SysErpMaterialProductItem sysErpMaterialProductItem);
Integer deleteSysErpMaterialProductItem(List<Long> list);
Integer updateSysErpMaterialProductItem(SysErpMaterialProductItem sysErpMaterialProductItem);
}

14
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysErpMaterialProductItemService.java

@ -1,14 +0,0 @@
package com.ruoyi.system.service;
import com.ruoyi.system.domain.SysErpMaterialProductItem;
import java.util.List;
public interface ISysErpMaterialProductItemService {
public List<SysErpMaterialProductItem> selectSysMaterialProductItemList(SysErpMaterialProductItem sysErpMaterialProductItem);
public SysErpMaterialProductItem selectSysMaterialProductItemListById(Long iconId);
public Integer insertSysErpMaterialProductItem(SysErpMaterialProductItem sysErpMaterialProductItem);
public Integer deleteSysErpMaterialProductItem(List<Long> list);
public Integer updateSysErpMaterialProductItem(SysErpMaterialProductItem sysErpMaterialProductItem);
}

37
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/ISysErpMaterialProductItemServiceIpml.java

@ -1,37 +0,0 @@
package com.ruoyi.system.service.impl;
import com.ruoyi.system.domain.SysErpMaterialProductItem;
import com.ruoyi.system.mapper.SysErpMaterialProductItemMapper;
import com.ruoyi.system.service.ISysErpMaterialProductItemService;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ISysErpMaterialProductItemServiceIpml implements ISysErpMaterialProductItemService {
private SysErpMaterialProductItemMapper sysErpMaterialProductItemMapper;
@Override
public List<SysErpMaterialProductItem> selectSysMaterialProductItemList(SysErpMaterialProductItem sysErpMaterialProductItem) {
return sysErpMaterialProductItemMapper.selectSysMaterialProductItemList(sysErpMaterialProductItem);
}
@Override
public SysErpMaterialProductItem selectSysMaterialProductItemListById(Long iconId) {
return sysErpMaterialProductItemMapper.selectSysMaterialProductItemListById(iconId);
}
@Override
public Integer insertSysErpMaterialProductItem(SysErpMaterialProductItem sysErpMaterialProductItem) {
return sysErpMaterialProductItemMapper.insertSysErpMaterialProductItem(sysErpMaterialProductItem);
}
@Override
public Integer deleteSysErpMaterialProductItem(List<Long> list) {
return sysErpMaterialProductItemMapper.deleteSysErpMaterialProductItem(list);
}
@Override
public Integer updateSysErpMaterialProductItem(SysErpMaterialProductItem sysErpMaterialProductItem) {
return sysErpMaterialProductItemMapper.updateSysErpMaterialProductItem(sysErpMaterialProductItem);
}
}

143
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysProductItemServiceImpl.java

@ -1,143 +0,0 @@
package com.ruoyi.system.service.impl;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.SysProductItem;
import com.ruoyi.system.mapper.SysProductItemMapper;
import com.ruoyi.system.service.ISysProductItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 生产团队Service业务层处理
*
* @author ruoyi
* @date 2023-12-04
*/
@Service("productItems")
public class SysProductItemServiceImpl implements ISysProductItemService
{
@Autowired
private SysProductItemMapper sysProductItemMapper;
@Autowired
private RedisCache redisCache;
/**
* 查询生产团队
*
* @param id 生产团队ID
* @return 生产团队
*/
@Override
public SysProductItem selectSysProductItemById(Long id)
{
return sysProductItemMapper.selectSysProductItemById(id);
}
/**
* 查询生产团队列表
*
* @param sysProductItem 生产团队
* @return 生产团队
*/
@Override
public List<SysProductItem> selectSysProductItemList(SysProductItem sysProductItem)
{
return sysProductItemMapper.selectSysProductItemList(sysProductItem);
}
/**
* 新增生产团队
*
* @param sysProductItem 生产团队
* @return 结果
*/
@Override
public int insertSysProductItem(SysProductItem sysProductItem)
{
String loginName = ShiroUtils.getLoginName();
sysProductItem.setCreateBy(loginName);
sysProductItem.setCreateTime(DateUtils.getNowDate());
redisCache.generateNo("JSTEAM");
return sysProductItemMapper.insertSysProductItem(sysProductItem);
}
/**
* 修改生产团队
*
* @param sysProductItem 生产团队
* @return 结果
*/
@Override
public int updateSysProductItem(SysProductItem sysProductItem)
{
String loginName = ShiroUtils.getLoginName();
sysProductItem.setUpdateBy(loginName);
sysProductItem.setUpdateTime(DateUtils.getNowDate());
return sysProductItemMapper.updateSysProductItem(sysProductItem);
}
/**
* 删除生产团队对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteSysProductItemByIds(String ids)
{
return sysProductItemMapper.deleteSysProductItemByIds(Convert.toStrArray(ids));
}
/**
* 删除生产团队信息
*
* @param id 生产团队ID
* @return 结果
*/
@Override
public int deleteSysProductItemById(Long id)
{
return sysProductItemMapper.deleteSysProductItemById(id);
}
/**
* 作废生产团队
*
* @param id 生产团队ID
* @return 结果
*/
@Override
public int cancelSysProductItemById(Long id)
{
return sysProductItemMapper.cancelSysProductItemById(id);
}
/**
* 恢复生产团队信息
*
* @param id 生产团队ID
* @return 结果
*/
@Override
public int restoreSysProductItemById(Long id)
{
return sysProductItemMapper.restoreSysProductItemById(id);
}
@Override
public List<SysProductItem> selectSysProductItemLists() {
SysProductItem sysProductItem = new SysProductItem();
return sysProductItemMapper.selectSysProductItemList(sysProductItem);
}
@Override
public Object getId() {
return redisCache.generateNo("JSTEAM");
}
}

50
ruoyi-admin/src/main/resources/mapper/system/SysErpMaterialProductItemMapper.xml

@ -1,50 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysErpMaterialProductItemMapper">
<resultMap type="SysErpMaterialProductItem" id="SysErpMaterialProductItemResult">
<result property="id" column="id" />
<result property="materialId" column="materialId" />
<result property="productItemId" column="productItemId" />
</resultMap>
<sql id="selectSysErpMaterialProductItemVo">
select iconId,materialId,productItemId from
sys_erpmaterial_productitem
</sql>
<select id="selectSysErpMaterialProductItemList">
<include refid="selectSysErpMaterialProductItemVo"/>
</select>
<select id="selectSysErpMaterialProductItemByList" parameterType="SysErpMaterialProductItem" resultMap="SysErpMaterialProductItemResult">
<include refid="selectSysErpMaterialProductItemVo"/>
<where>
<if test="materialId != null"> and materialId = #{materialId}</if>
<if test="productItemId != null"> and productItemId = #{productItemId}</if>
</where>
</select>
<insert id="insertSysErpMaterialProductItem" useGeneratedKeys="true" keyProperty="iconId">
insert into sys_erpmaterial_productitem(`materialId`,`productItemId`);
</insert>
<delete id="deleteSysErpMaterialProductItem">
delete from sys_erpmaterial_productitem
where iconId in
<foreach collection="list" open="(" separator="," close=")" item="id">
#{id}
</foreach>
</delete>
<update id="updateSysErpMaterialProductItem" parameterType="SysErpMaterialProductItem">
update sys_erpmaterial_productitem set
materialId = #{materialId},productItemId = #{productItemId}
where iconId in
<foreach collection="list" open="(" separator="," close=")" item="id">
#{id}
</foreach>
</update>
<select id="selectSysMaterialProductItemListById" parameterType="Long" resultMap="SysErpMaterialProductItemResult">
<include refid="selectSysErpMaterialProductItemVo"/>
where iconId = #{iconId}
</select>
</mapper>

148
ruoyi-admin/src/main/resources/templates/system/customer/customer.html

@ -133,6 +133,9 @@
<a class="btn btn-success" onclick="showaddress()" shiro:hasPermission="system:shippingaddress:add">
<i class="fa fa-ambulance"></i> 添加其他送货地址
</a>
<a class="btn btn-success" onclick="showInvoice()" >
<i class="fa fa-plus"></i> 添加其他开票信息
</a>
<a class="btn btn-success" onclick="showSign()" >
<i class="fa fa-plus"></i> 修改客户标识
</a>
@ -320,6 +323,64 @@
</div>
</div>
</div>
<!--添加其他开票信息-->
<div class="modal inmodal" id="invoiceModal" tabindex="1"
role="dilog" aria-hidden="true">
<div class="modal-dialog" style="width: 1000px;background-color: #FFFFFF">
<div class="modal-content" style="background-color: #FFFFFF">
<div style="font-size: 20px;padding: 10px 50px 0">开票信息</div>
<div class="modal-body">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-invoice-add" style="display: flex;flex-wrap: wrap;">
<div class="form-group" hidden>
<input name="invoiceId" class="form-control" type="text" readonly>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">客户/企业代码:</label>
<div class="col-sm-8">
<input name="enterpriseCode" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">客户/企业名称:</label>
<div class="col-sm-8">
<input name="enterpriseName" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">开票公司名称:</label>
<div class="col-sm-8">
<input name="invoiceCompanyName" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">开票公司税号:</label>
<div class="col-sm-8">
<input name="invoiceCompanyCode" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公司开户行:</label>
<div class="col-sm-8">
<input name="depositBank" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">公司开户账号:</label>
<div class="col-sm-8">
<input name="bankAccount" class="form-control" type="text" required>
</div>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" onclick="submitInvoice()">确定</button>
<button type="button" class="btn btn-default" onclick="closeInvoice()">取消</button>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<script th:src="@{/js/activiti.js}"></script>
@ -343,6 +404,8 @@
var prefix1 = ctx + "system/contacts"
// 送货地址
var prefix2 = ctx + "system/shippingaddress"
/*开票信息*/
var prefix3 = ctx + "system/invoice";
$(function () {
var options = {
url: prefix + "/list",
@ -351,7 +414,6 @@
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
detailUrl: prefix + "/detail/{id}",
clickToSelect: true,
modalName: "客户基本信息",
fixedColumns:true,
fixedRightNumber:1,
@ -479,12 +541,12 @@
{title: '第一收货人邮编',field: 'deliveryCustomerPostal',visible:false},
{title: '第一收货人传真',field: 'deliveryCustomerFax',visible: false},
{title: '客户标识',field:'customerSign'},
{title: '录入时间',field: 'firstAddTime',
{title: '录入时间',field: 'createTime',
formatter: function (value, row, index) {
if (value == null) {return " ";} else { return value;}
}
},
{title: '上次修改时间',field: 'updateInfoTime',
{title: '上次修改时间',field: 'updateTime',
formatter: function (value, row, index) {
if (value == null) {
return " ";
@ -639,9 +701,9 @@
}
$("#shipingModal input[name='enterpriseCode']").val(data.enterpriseCode);
$("#shipingModal input[name='enterpriseName']").val(data.enterpriseName);
$("#shipingModal").modal("show");
}
// 联系人明细
function addContacts() {
$("input").val('')
@ -693,7 +755,6 @@
} else {
$.modal.alert("请选择一条数据");
}
console.log(data);
}
$("#customerContact").select2({
placeholder: '请选择',
@ -736,9 +797,14 @@
$("input[name='customerEmail']").val(data.materialName);
$("input[name='customerFax']").val(data.commonEmail);
});
$("#form-contacts-add").validate({
focusCleanup: true
});
$("#form-contacts-add").validate({focusCleanup: true});
function submitHandler() {
if ($.validate.form('form-contacts-add')) {
$.operate.save(prefix1 + "/add", $('#form-contacts-add').serialize());
$('#shipingModal').modal("hide");
}
}
function closeInfo() {$('#shipingModal').modal("hide");}
// 送货地址
function showaddress() {
$("input").val('')
@ -750,13 +816,14 @@
} else {
$.modal.alert("请选择一条数据");
}
console.log(data)
}
$("#form-contacts-add").validate({
focusCleanup: true
});
function submitaddress() {
if ($.validate.form('form-address-add')) {
$.operate.save(prefix2 + "/add", $('#form-address-add').serialize());
$('#addressModal').modal("hide")
}
}
function closeAdress() {$('#addressModal').modal("hide");}
/*客户标识*/
function showSign(index){
var data = $("#bootstrap-table").bootstrapTable("getSelections");
@ -770,19 +837,6 @@
$.modal.alert("请选择一条数据");
}
}
function submitHandler() {
if ($.validate.form('form-contacts-add')) {
$.operate.save(prefix1 + "/add", $('#form-contacts-add').serialize());
$('#shipingModal').modal("hide");
}
}
function submitaddress() {
if ($.validate.form('form-address-add')) {
$.operate.save(prefix2 + "/add", $('#form-address-add').serialize());
$('#addressModal').modal("hide")
}
}
function submitHandlerSign() {
if ($.validate.form('form-customerSign-add')) {
var id = $("#form-customerSign-add input[name='id']").val();
@ -798,14 +852,42 @@
function closeSign() {
$('#signModel').modal("hide");
}
function closeAdress() {
$('#addressModal').modal("hide");
}
function closeInfo() {
$('#shipingModal').modal("hide");
}
/*其他开票信息*/
function showInvoice() {
$("input").val('')
var data = $("#bootstrap-table").bootstrapTable("getSelections");
if (data.length == 1) {
$("#invoiceModal input[name='enterpriseCode']").val(data[0].enterpriseCode)
$("#invoiceModal input[name='enterpriseName']").val(data[0].enterpriseName)
$.ajax({
url: prefix3 + "/getId",
type: "post",
success: function (resp) {
if (resp.code === 0) {
$("#form-invoice-add input[name='invoiceId']").val(resp.data);
} else {
$.modal.msgError("失败啦");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
$("#invoiceModal").modal("show");
/*获取生成的开票ID*/
} else {
$.modal.alert("请选择一条数据");
}
}
function submitInvoice() {
if ($.validate.form('form-invoice-add')) {
$.operate.save(prefix3 + "/add", $('#form-invoice-add').serialize());
$('#invoiceModal').modal("hide")
}
}
function closeInvoice() {$('#invoiceModal').modal("hide");}
</script>
</body>
</html>
Loading…
Cancel
Save