|
|
@@ -44,6 +44,7 @@ func (this *LimsCheckEquipmentListController) GetEntityList() {
|
|
|
Id := this.GetString("Id")
|
|
|
DepartmentId := this.GetString("DepartmentId")
|
|
|
OrderNo := this.GetString("OrderNo")
|
|
|
+ ThrUnitId := this.GetString("ThrUnitId")
|
|
|
PositionCheckId := this.GetString("PositionCheckId")
|
|
|
PositionCheck := this.GetString("PositionCheck")
|
|
|
PositionID := this.GetString("PositionID")
|
|
|
@@ -55,12 +56,33 @@ func (this *LimsCheckEquipmentListController) GetEntityList() {
|
|
|
status := this.GetString("Status")
|
|
|
|
|
|
TemplateTypeId := this.GetString("TemplateTypeId")
|
|
|
- PositionAllTypeId := this.GetString("PositionAllTypeId")
|
|
|
+ //PositionAllTypeId := this.GetString("ThrUnitId")
|
|
|
QueryCheckDate := this.GetString("QueryCheckDate")
|
|
|
statusValue := this.GetString("statusValue")
|
|
|
|
|
|
+ //取出三级单位下的位置
|
|
|
+
|
|
|
+ strPositionList := ""
|
|
|
+ orgSvc := organize.GetOrganizeService(utils.DBE)
|
|
|
+ positionSvc := limscustomerposition.GetLimsCustomerpositionService(utils.DBE)
|
|
|
+ var entitys []limscustomerposition.LimsCustomerPosition
|
|
|
+ entitys = positionSvc.GetPositionCheckList(this.User.AccCode+LimsCustomerpositionName, ThrUnitId)
|
|
|
+
|
|
|
+ PositionAllTypeId := ""
|
|
|
+ if entitys != nil {
|
|
|
+ for _, value := range entitys {
|
|
|
+ PositionAllTypeId += strconv.Itoa(value.Id) + ","
|
|
|
+ }
|
|
|
+ PositionAllTypeId = strings.Trim(PositionAllTypeId, ",")
|
|
|
+ } else {
|
|
|
+ PositionAllTypeId = ThrUnitId
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if Id != "" {
|
|
|
- where = where + " and Id like '%" + Id + "%'"
|
|
|
+ where = where + "and Id like '%" + Id + "%'"
|
|
|
}
|
|
|
|
|
|
if DepartmentId != "" {
|
|
|
@@ -68,8 +90,11 @@ func (this *LimsCheckEquipmentListController) GetEntityList() {
|
|
|
}
|
|
|
|
|
|
if PositionAllTypeId != "" {
|
|
|
- where = where + " and (PositionCheckId = '" + PositionAllTypeId + "' or PositionID = '" + PositionAllTypeId + "')"
|
|
|
+ where = where + " and (PositionCheckId in (" + PositionAllTypeId + ") or PositionID = '" + PositionAllTypeId + "')"
|
|
|
}
|
|
|
+ //if ThrUnitId != "" {
|
|
|
+ // where = where + "and ThrUnitId like '%" + ThrUnitId + "%'"
|
|
|
+ //}
|
|
|
|
|
|
if OrderNo != "" {
|
|
|
where = where + " and OrderNo like '%" + OrderNo + "%'"
|
|
|
@@ -129,9 +154,7 @@ func (this *LimsCheckEquipmentListController) GetEntityList() {
|
|
|
}
|
|
|
}
|
|
|
// 把安装位置取出来
|
|
|
- strPositionList := ""
|
|
|
- orgSvc := organize.GetOrganizeService(utils.DBE)
|
|
|
- positionSvc := limscustomerposition.GetLimsCustomerpositionService(utils.DBE)
|
|
|
+
|
|
|
if this.User.UintThirdId > 0 {
|
|
|
var entitys []limscustomerposition.LimsCustomerPosition
|
|
|
entitys = positionSvc.GetPositionCheckList(this.User.AccCode+LimsCustomerpositionName, strconv.Itoa(this.User.UintThirdId))
|
|
|
@@ -154,7 +177,7 @@ func (this *LimsCheckEquipmentListController) GetEntityList() {
|
|
|
}
|
|
|
strPositionList += "0"
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if len(strPositionList) > 0 {
|
|
|
where = where + " and PositionCheckId in (" + strPositionList + ")"
|
|
|
}
|