Browse Source

1127

master
ruanqi 2 years ago
parent
commit
499bb80680
  1. 18
      src/main/java/com/spring/modules/project/data/PlmProjectContactData.java
  2. 10
      src/main/java/com/spring/modules/project/entity/PlmProjectContact.java
  3. 2
      src/main/java/com/spring/modules/project/service/impl/ProjectServiceImpl.java
  4. 12
      src/main/resources/mapper/project/ProjectDao.xml

18
src/main/java/com/spring/modules/project/data/PlmProjectContactData.java

@ -69,6 +69,16 @@ public class PlmProjectContactData extends PlmProjectContact {
**/
private String updateBy;
private List<String> contactList;
private String contactDesc;
private String contact;
public String getContact() {
return contact;
}
public void setContact(String contact) {
this.contact = contact;
}
public String getContactLandlineNumber() {
return contactLandlineNumber;
@ -181,4 +191,12 @@ public class PlmProjectContactData extends PlmProjectContact {
public void setContactList(List<String> contactList) {
this.contactList = contactList;
}
public String getContactDesc() {
return contactDesc;
}
public void setContactDesc(String contactDesc) {
this.contactDesc = contactDesc;
}
}

10
src/main/java/com/spring/modules/project/entity/PlmProjectContact.java

@ -26,6 +26,8 @@ public class PlmProjectContact {
*/
private String customerId;
private Integer contactId;
public Integer getId() {
return id;
}
@ -65,5 +67,13 @@ public class PlmProjectContact {
public void setCustomerId(String customerId) {
this.customerId = customerId;
}
public Integer getContactId() {
return contactId;
}
public void setContactId(Integer contactId) {
this.contactId = contactId;
}
}

2
src/main/java/com/spring/modules/project/service/impl/ProjectServiceImpl.java

@ -192,7 +192,7 @@ public class ProjectServiceImpl implements ProjectService {
inData.setSite(data.getSite());
inData.setProjectId(data.getProjectId());
inData.setCustomerId(data.getCustomerId());
inData.setContactName(data.getContactList().get(i));
inData.setContactId( Integer.valueOf(data.getContactList().get(i)));
projectDao.saveProjectContactList(inData);
}

12
src/main/resources/mapper/project/ProjectDao.xml

@ -112,18 +112,18 @@
select b.site,b.customer_no,b.contact_name,b.contact_landline_number,b.contact_phone_number1,b.contact_phone_number2,
b.contact_phone_number3,b.position,b.mailbox,b.primary_contact,b.contact_status,b.remark,b.create_date,b.create_by,
b.update_date,b.update_by,b.contact_id,a.customer_id
from plm_project_contact a left join plm_customer_contact b on a.site=b.site and a.customer_id=b.customer_no and a.contact_name=b.contact_name
from plm_project_contact a left join plm_customer_contact b on a.site=b.site and a.customer_id=b.customer_no and a.contact_id=b.contact_id
where a.site=#{site} and a.project_id=#{projectId} and a.customer_id=#{customerId} and b.contact_status='启用'
</select>
<select id="getPlmProjectContactString" resultType="String">
select b.contact_name
from plm_project_contact a left join plm_customer_contact b on a.site=b.site and a.customer_id=b.customer_no and a.contact_name=b.contact_name
select b.contact_id
from plm_project_contact a left join plm_customer_contact b on a.site=b.site and a.customer_id=b.customer_no and a.contact_id=b.contact_id
where a.site=#{site} and a.project_id=#{projectId} and a.customer_id=#{customerId} and b.contact_status='启用'
</select>
<select id="getCustomerContactString" resultType="PlmProjectContactData">
select contact_name from plm_customer_contact
select contact_id,contact_name from plm_customer_contact
where site=#{site} and customer_no=#{customerId} and contact_status='启用'
</select>
@ -132,8 +132,8 @@
</delete>
<insert id="saveProjectContactList">
insert into plm_project_contact (site,project_id,contact_name,customer_id)
values (#{site},#{projectId},#{contactName},#{customerId})
insert into plm_project_contact (site,project_id,contact_id,customer_id)
values (#{site},#{projectId},#{contactId},#{customerId})
</insert>
<delete id="deleteProjectInfo">
delete from plm_project_info where site=#{site} and project_id=#{projectId}

Loading…
Cancel
Save